singleTile: Function to generate a single tile

Description Usage Arguments Details Value

View source: R/singleTile.R

Description

Function to generate a single tile

Usage

1
singleTile(rst, fcol, Z, X, Y, w = 512, h = w, ...)

Arguments

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

Details

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.

Value

a raw vector containing the png image


waternumbers/wmts documentation built on Dec. 23, 2021, 5:08 p.m.