Add Cloud Optimised Geotiff (COG) to a leaflet map.
Usage
addCOG(
map,
url = NULL,
group = NULL,
layerId = NULL,
resolution = 96,
opacity = 0.8,
options = leaflet::tileOptions(),
colorOptions = NULL,
pixelValuesToColorFn = NULL,
autozoom = TRUE,
rgb = FALSE,
...
)
Arguments
- map
the map to add the COG to.
- url
url to the COG file to render.
- group
he name of the group this COG should belong to.
- layerId
the layerId.
- resolution
the target resolution for the simple nearest neighbor interpolation. Larger values will result in more detailed rendering, but may impact performance. Default is 96 (pixels).
- opacity
image opacity.
- options
see [leaflet](tileOptions).
- colorOptions
list defining the palette, breaks and na.color to be used. Currently not used.
- pixelValuesToColorFn
optional JS function to be passed to the browser. Can be used to fine tune and manipulate the color mapping. See examples & https://github.com/r-spatial/leafem/issues/25 for some examples. Currently not used.
- autozoom
whether to automatically zoom to the full extent of the layer. Default is
TRUE
.- rgb
logical, whether to render Geotiff as RGB. Currently not used.
- ...
currently not used.
Details
This function will overlay Cloud Optimised Geotiff data from a remote url on a leaflet map. Like `addGeotiff` it uses the leaflet plugin 'georaster-layer-for-leaflet' to render the data. See `addGeotiff` for a bit more detail what that means.