
Export open GIS style XML
ps_export_style.RdExport open GIS style XML
Arguments
- x
Object whose values inform default raster breaks.
- file
Output QML or SLD file.
- format
QGIS QML or standards-based SLD.
- layer_type
Styled layer type.
- field
Attribute used for labels or support categories.
- units
Optional label units.
- palette
Colors or color function.
- breaks
Optional explicit continuous breaks.
- overwrite
Permit replacement of an existing file.
Value
A potentiomap_style_export manifest. Optional properties can render
differently among GIS versions.
Examples
r <- terra::rast(nrows = 2, ncols = 2, xmin = 0, xmax = 2,
ymin = 0, ymax = 2, crs = "EPSG:26920", vals = 1:4)
file <- tempfile(fileext = ".qml")
style <- ps_export_style(r, file, "qml", "head_raster", units = "m")
style$manifest
#> file format layer_type field units
#> 1 /tmp/Rtmp0c0xKz/file1dab37268740.qml qml head_raster <NA> m
#> break_count xml_root validated
#> 1 7 qgis TRUE
# GIS versions can render optional style properties differently.