genTiles: Function to generate tiles for 0.1 degree data

Description Usage Arguments Details

View source: R/genTiles.R

Description

Function to generate tiles for 0.1 degree data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
genTiles(
  rst,
  fcol,
  outdir = ".",
  minZ = 0,
  maxZ = 3,
  w = 512,
  h = w,
  lv = NULL,
  ...
)

Arguments

rst

a SpatRaster or file name to open as a Spatraster to generate tiles from

fcol

function to convert raster values into an RGBA matrix - see details

outdir

directory into which the tiles are written

minZ

lowest zoom level to generate

maxZ

maximum zoom level to generate

w

width of tiles in pixels

h

height of tiles in pixels

lv

values used to generage a legend. If NULL to legend is generated.

...

passed to terra project or terra resample

Details

This is naive generater. Defaults work well for plotting 0.1 degree data in a limited number of tiles. fcol should take a vector of n values and return an n hex colour values which should include transparency.


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