Description Usage Arguments Details Value
Function to generate a single tile
1 | singleTile(rst, fcol, Z, X, Y, w = 512, h = w, ...)
|
rst |
a SpatRaster object to generate tiles from |
fcol |
function to convert raster values into an hex colour scheme |
Z |
zoom level |
X |
value of the tile |
Y |
value of the tile |
w |
width of tiles in pixels |
h |
height of tiles in pixels |
... |
passed to terra project or terra resample |
This uses the terra library to project rst
onto the correct tile area. Tiles are then generated by applying the function fcol. fcol should take a vector of n values and return an n hex colour values which should include transparency.
a raw vector containing the png image
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.