Provides functionality for managing GeoServer coverages via the REST API.
All functions require a GeoserverConfig.Connection as their first argument.
Summary
Functions
Creates a new coverage (raster layer) in the specified coverage store.
Deletes a coverage layer from a workspace and coverage store.
Fetches a single coverage by name from the given workspace and coverage store.
Lists all coverages for a given workspace and coverage store.
Updates an existing coverage (raster layer) in the specified coverage store.
Functions
Creates a new coverage (raster layer) in the specified coverage store.
Parameters
conn— aGeoserverConfig.Connectionworkspace— the workspace namecoverage_store— the coverage store namecoverage_name— desired name of the coverageparams— metadata map with keys::title,:srs,:native_bbox,:latlon_bbox,:grid, and optionally:description,:abstract,:native_crs,:metadata,:enabledfile_path— URL or file path of the GeoTIFF/COG
Returns
{:ok, coverage_name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, reason}}on transport error
Deletes a coverage layer from a workspace and coverage store.
Parameters
conn— aGeoserverConfig.Connectionworkspace— the workspace namecoverage_store— the coverage store namecoverage_name— name of the coverage to deleterecurse— iftrue, also deletes linked resources (default:false)
Returns
{:ok, coverage_name}on success{:error, {:not_found, coverage_name}}when the coverage does not exist{:error, {:http_error, status, body}}on other HTTP failure{:error, {:request_failed, reason}}on transport error
Fetches a single coverage by name from the given workspace and coverage store.
Returns
{:ok, coverage}on success (a map with coverage details){:error, {:http_error, status, body}}on non-200 response{:error, {:request_failed, reason}}on transport error
Lists all coverages for a given workspace and coverage store.
Returns
{:ok, [coverage]}on success{:error, :unexpected_format, body}when the response body is unrecognised{:error, {:http_error, status, body}}on non-200 response{:error, {:request_failed, reason}}on transport error
Updates an existing coverage (raster layer) in the specified coverage store.
Parameters
conn— aGeoserverConfig.Connectionworkspace— the workspace namecoverage_store— the coverage store namecoverage_name— name of the coverage to updateparams— map with fields to update::title,:description,:abstract,:enabled,:srs,:native_bbox,:latlon_bbox,:metadata,:keywords
Returns
{:ok, coverage_name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, reason}}on transport error