Publishes a vector layer to GeoServer. The layer source must have previously been defined as a GeoSever datastore.
Usage
publish_layer(gso, layer, title)
# S3 method for class 'geoserver'
publish_layer(gso, layer, title = NULL)
Value
An integer:
0
if the operation was successful or if the layer already exists.1
if an error occurred.
See also
Other publish to GeoServer:
geoserver()
,
publish_bands()
,
publish_layer_set()
,
publish_raster()
,
register_datastore_postgis()
Examples
if (FALSE) { # \dontrun{
gso <- geoserver(
url = "http://localhost:8080/geoserver",
user = "admin",
password = "geoserver",
workspace = "sigugr_test"
)
gso <- gso |>
register_datastore_postgis(
"sigugr-postgis",
db_name = 'sigugr_example',
host = 'localhost',
port = 5432,
db_user = 'user',
db_password = 'password',
schema = "public"
)
gso |>
publish_layer(layer = 'sigugr_layer')
} # }