geojson_addZ | R Documentation |
Use geoserver API to recover the Z for given set of points stored in GeoJSON file. Geoserver API can lead to Timeout.
geojson_addZ( geojson.path = paste0(system.file(package = "eamenaR"), "/extdata/caravanserail.geojson"), geojson.out = NA, ids = "EAMENA ID", elevation.api = "gmrt_point", timeout = 30, sleep = 0.3, dirOut = paste0(system.file(package = "eamenaR"), "/results/"), verbose = TRUE )
geojson.path |
path of GeoJSON file. By default 'caravanserail.geojson'. |
geojson.out |
name of output file. By default NA, will add suffix 'Z' to name of GeoJSON file (variable 'geojson.path'). |
ids |
field having the unique keys, to remove duplicated geometries. By default "EAMENA ID". |
elevation.api |
the geoserver API used to collect the elevation, by default 'gmrt_point' (https://www.gmrt.org). Another option is 'gmrt_profile', and 'open-elevation' (https://api.open-elevation.com/). |
timeout |
the threshold below which the expectation of a response is accepted, in seconds. By default, 30. |
sleep |
the time delay between two API request in seconds. By default 0.3. |
dirOut |
the folder where outputs will be saved. By default: '/results'. If folder doesn't exist, it will be created. |
verbose |
if TRUE (by default): verbose. |
df <- geojson_addZ() # using 'open-elevation' as API df <- geojson_addZ(elevation.api = 'open-elevation')