| Title: | Write Imagery to Tiles |
|---|---|
| Description: | Create directory structure of image tiles. |
| Authors: | Michael D. Sumner [aut, cre] (ORCID: <https://orcid.org/0000-0002-2471-7511>), Klokan Petr Pridal [cph, aut] (wrote gdal2tiles.py and embedded html template copied here) |
| Maintainer: | Michael D. Sumner <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0.9003 |
| Built: | 2026-05-13 05:26:52 UTC |
| Source: | https://github.com/hypertidy/filearchy |
Create png or jpeg tiles from any GDAL DSN in slippy map format, this consists of
zoom level directories: 0/, 1/, 2/, etc that contain similar column diretories with
row files in them. The format is "z/x/y.png" with combinations of z = 0:maxzoom, x = 0:maxrow, y = 0:maxcol. Not every possible combination will exist, only those
that represent the data as input will be generated.
gdal_tiles( dsn, zoom = NULL, blocksize = 256L, profile = "mercator", output_dir = tempfile(), overwrite = FALSE, update = FALSE, dry_run = TRUE, xyz = FALSE, format = c("png", "jpeg"), write_html = TRUE, minmaxzoom = NA, title = "", copyright = "copyright ..." )gdal_tiles( dsn, zoom = NULL, blocksize = 256L, profile = "mercator", output_dir = tempfile(), overwrite = FALSE, update = FALSE, dry_run = TRUE, xyz = FALSE, format = c("png", "jpeg"), write_html = TRUE, minmaxzoom = NA, title = "", copyright = "copyright ..." )
dsn |
input dataset, file path, VRT string, or any DSN GDAL can open and warp from |
zoom |
zooms to render, can be a single number multiple (from 0:23) |
blocksize |
size of tiles, defaults to 256 |
profile |
domain to use, 'mercator', 'geodetic' (longlat), or 'raster' |
output_dir |
directory to write to, by default a tempdir is used |
overwrite |
clobber the output directory, delete it entirely if |
update |
if |
dry_run |
if |
xyz |
the row orientation default |
format |
'png' or 'jpeg' |
write_html |
|
minmaxzoom |
optional, two values to set the html index range independently of the rendered levels |
title |
title for HTML output |
copyright |
copyright statement for HTML output |
Currently we write a leaflet.html by default. Note that if you run with 'update' with a
different set of zooms in a previous run then the html will be overridden by a different
min and/or max zoom setting. The zoom range can be set independently of the generated or
existing tiles by using minmaxzoom.
the tile scheme, invisibly as a dataframe
dsn <- system.file("extdata/gebco_ovr5.vrt", package = "filearchy", mustWork = TRUE) ## parallelize here #future::plan(multicore) tiles <- gdal_tiles(dsn, dry_run = TRUE) if (!interactive()) unlink(tiles$path) #future::plan(sequential)dsn <- system.file("extdata/gebco_ovr5.vrt", package = "filearchy", mustWork = TRUE) ## parallelize here #future::plan(multicore) tiles <- gdal_tiles(dsn, dry_run = TRUE) if (!interactive()) unlink(tiles$path) #future::plan(sequential)