tile_index: Tile index.

View source: R/tile_index.R

tile_indexR Documentation

Tile index.

Description

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

Usage

tile_index(rFile, pxCount)

Arguments

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.)

Examples

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)

ColinChisholm/PEMGeneratr documentation built on March 12, 2023, 12:52 p.m.