Description Usage Arguments Author(s) See Also Examples
View source: R/export_metadata.R
Writes a Styled Layer Description (SLD) file, that can be attached to a spatial layer contributed to GeoServer.
1 2 3 4 5 6 7 | metadata2SLD.SpatialPixels(obj,
Format_Information_Content = xmlValue(obj@xml[["//formcont"]]),
obj.name = normalizeFilename(deparse(substitute(obj))),
sld.file = set.file.extension(obj.name, ".sld"),
Citation_title = xmlValue(obj@xml[["//title"]]),
ColorMap_type = "intervals", opacity = 1,
brw.trg = 'Greys', target.var, ...)
|
obj |
object of class |
Format_Information_Content |
character; class of the object to be written to SLD file |
obj.name |
character; name of the layer |
sld.file |
character; name of the output file |
Citation_title |
character; title of the layer |
ColorMap_type |
character; type of the colorMap see https://docs.geoserver.org |
opacity |
logical; specifies the opacity |
brw.trg |
character; color scheme according to www.colorbrewer2.org; default to 'Greys' |
target.var |
character; target variable used to calculate the class-intervals |
... |
additional arguments |
Tomislav Hengl
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run: # generate missing metadata
data(eberg_grid)
library(sp)
coordinates(eberg_grid) <- ~x+y
gridded(eberg_grid) <- TRUE
proj4string(eberg_grid) <- CRS("+init=epsg:31467")
# with localy prepared metadata file:
eberg_TWI <- as(eberg_grid["TWISRT6"], "SpatialPixelsDataFrame")
eberg.md <- spMetadata(eberg_TWI, Target_variable="TWISRT6")
# export to SLD format:
metadata2SLD(eberg.md, "eberg_TWI.sld")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.