tile_index | R Documentation |
Creates a polygon tile index of a raster. Attributes of this polygon layer can be used to define pseudo-tiles or perhaps better named virtual-tiles
tile_index(rFile, pxCount)
rFile |
Character, location of the raster file to index |
pxCount |
Specify how many pixels the tile should be in both x and y directions (long. and lat.) |
r1 <- raster::raster(ncol=200, nrow=200, xmn=547000, xmx=552000, ymn=5985000, ymx=5990000) raster::crs(r1) <- "+init=EPSG:3157" r1 <- raster::setValues(r1, seq(1:length(r1))) raster::writeRaster(r1, "e:/tmp/tmp.tif", overwrite = TRUE) # call function tiles <- tile_index("e:/tmp/tmp.tif", pxCount = 50) mapview::mapview(tiles, alpha = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.