serveTiles: Start a serving serving tiles from a raster data set with...

Description Usage Arguments Details

View source: R/serveTiles.R

Description

Start a serving serving tiles from a raster data set with time attribute

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
serveTiles(
  dataFile,
  fcol,
  lv = NULL,
  cachePath = NULL,
  staticPath = NULL,
  fplot = function(t, v) {     plot(t, v) },
  ferror = function(err) {     err$message },
  port = NULL,
  clearCache = FALSE
)

Arguments

dataFile

file containing spatial data to be read by terra::rast

fcol

function for returning colours

lv

values for drawing in legend

cachePath

path to directory for storing cached files

staticPath

path for serving static assets from

fplot

function to plot a timeseries of data (see details)

ferror

function to process errors and return messages (see details)

port

port to serve data on

clearCache

logical, should cache be cleared if file changes

Details

For a decription of fcol and lv see scaleImage. fplot shoudl take as its first input a POSIXct vector and as for its second a numeric vector of the same length and return a plot. ferror creates the response body contents from the standard R err object.


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