Skip to contents

Publishes a GeoTIFF raster file to a workspace and data store on a GeoServer instance.

Usage

publish_raster(gso, raster, layer)

# S3 method for class 'geoserver'
publish_raster(gso, raster, layer = NULL)

Arguments

gso

An object of class `geoserver` containing GeoServer connection details.

raster

A character string specifying the file path to the GeoTIFF raster file to be uploaded.

layer

A string, the name of the layer to publish. If it is `NULL`, which is the default value, the layer name is derived from the filename.

Value

An integer:

  • 0 if the operation was successful or if the layer already exists.

  • 1 if an error occurred.

See also

Examples

if (FALSE) { # \dontrun{
gso <- geoserver(
  url = "http://localhost:8080/geoserver",
  user = "admin",
  password = "geoserver",
  workspace = "sigugr_test"
)

source_tif <- system.file("extdata/sat.tif", package = "sigugr")

gso |>
  publish_raster(source_tif, "sat-tiff")
} # }