Create Geographic and Non-Geographic Map Tiles

Creates geographic map tiles from geospatial map files or non-geographic map tiles from simple image files. This package provides a tile generator function for creating map tile sets for use with packages such as 'leaflet'. In addition to generating map tiles based on a common raster layer source, it also handles the non-geographic edge case, producing map tiles from arbitrary images. These map tiles, which have a non-geographic, simple coordinate reference system (CRS), can also be used with 'leaflet' when applying the simple CRS option. Map tiles can be created from an input file with any of the following extensions: tif, grd and nc for spatial maps and png, jpg and bmp for basic images. This package requires 'Python' and the 'gdal' library for 'Python'. 'Windows' users are recommended to install 'OSGeo4W' (< https://trac.osgeo.org/osgeo4w/>) as an easy way to obtain the required 'gdal' support for 'Python'.


tiler


Author: Matthew Leonawicz
License: MIT

CRAN status CRAN downloads Rdoc Travis-CI Build Status AppVeyor Build Status Coverage Status gitter

Create geographic and non-geographic map tiles

The tiler package provides a tile generator function for creating map tile sets for use with packages such as leaflet. In addition to generating map tiles based on a common raster layer source, it also handles the non-geographic edge case, producing map tiles from arbitrary images. These map tiles, which have a a non-geographic simple coordinate reference system, can also be used with leaflet when applying the simple CRS option.

Map tiles can be created from an input file with any of the following extensions: tif, grd and nc for spatial maps and png, jpg and bmp for basic images.

Installation

Install the development version from GitHub with:

devtools::install_github("leonawicz/tiler")

For non-geographic tiles, using a png file is recommended for quality and file size. jpg may yield a lower quality result, while a large, high resolution bmp file may have an enormous file size compared to png.

jpg and bmp are optionally supported by tiler. This means they are not installed and imported with tiler. It is assumed the user will provide png images. If using jpg or bmp and the packages jpeg or bmp are not installed, respectively, tile will print a message to the console notfying of the required package installations.

System requirements

This package requires Python and the gdal library for Python. Windows users are recommended to install OSGeo4W as an easy way to obtain the required gdal support for Python in Windows.

Examples

See the introduction vignette for more details and examples.

Reference

Complete package reference and function documentation


Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

News

tiler 0.2.0

  • All three gdal2tiles* scripts have been updated to accept a command line argument when called by R that provides a path for any temporary files, i.e., tmp.*.vrt files created by the gdal2tiles* scripts. These were previously accumulating in the system temp folder. The new temporary directory is a sub-directory inside tempdir(). Therefore, it is cleaned up when exiting R. Nevertheless, tile also force deletes this subdirectory immediately after its internal system call to one of the gdal2tiles* scripts returns, so the temporary sub-directory does not even exist for the full duration of the tile call.
  • Added functions tile_viewer and view_tiles and other supporting functions for generating HTML Leaflet tile preview web page.
  • Added arguments to tile. tile now generates previewer by default.
  • Added unit tests.
  • Updated vignette.

tiler 0.1.6 (Release date: 2018-06-06)

  • Made minor formatting changes per CRAN request for resubmission.

tiler 0.1.5

  • Refactored tile, added arguments including resume and format, changed some argument names.
  • Added default support for XYZ format tiles in addition to TMS. This brings in another version of gdal2tiles.
  • Updated documentation.
  • Added unit tests.

tiler 0.1.0

  • Created tile function for generating map tiles from geographic or non-geographic maps/images.
  • Created readme with basic example.
  • Added initial introduction vignette.
  • Added robust unit tests and other external examples and spot testing of edge cases.

tiler 0.0.0.9000

  • Added initial package scaffolding.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("tiler")

0.2.1 by Matthew Leonawicz, 3 months ago


https://github.com/ropensci/tiler


Report a bug at https://github.com/ropensci/tiler/issues


Browse source code at https://github.com/cran/tiler


Authors: Matthew Leonawicz [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports sp, rgdal, raster, png

Suggests testthat, knitr, rmarkdown, lintr, covr, jpeg, bmp, leaflet

System requirements: Python (>= 2.7), python-gdal library (For Windows, gdal installed via OSGeo4W <https://trac.osgeo.org/osgeo4w/> recommended) clipboard


See at CRAN