src.geoserver.raster_layers
Functions for serving raster layers via geoserver.
Attributes
Functions
|
Create a GeoServer Layer from a GeoServer store, making it ready to serve. |
|
Upload a GeoTiff file to GeoServer, ready for serving to clients. |
Create a GeoServer style for rasters using the viridis color scale. |
Module Contents
- src.geoserver.raster_layers.log
- src.geoserver.raster_layers._xml_header
- src.geoserver.raster_layers.create_layer_from_gtiff_store(geoserver_url: str, layer_name: str, workspace_name: str) None
Create a GeoServer Layer from a GeoServer store, making it ready to serve.
- Parameters:
geoserver_url (str) – The URL to the geoserver instance.
layer_name (str) – Defines the name of the layer in GeoServer.
workspace_name (str) – The name of the existing GeoServer workspace that the store is to be added to.
- Raises:
HTTPError – If geoserver responds with an error, raises it as an exception since it is unexpected.
- src.geoserver.raster_layers.add_gtiff_to_geoserver(gtiff_filepath: pathlib.Path, workspace_name: str, model_id: int) None
Upload a GeoTiff file to GeoServer, ready for serving to clients.
- Parameters:
gtiff_filepath (pathlib.Path) – The filepath to the GeoTiff file to be served.
workspace_name (str) – The name of the existing GeoServer workspace that the store is to be added to.
model_id (int) – The id of the model being added, to facilitate layer naming.
- src.geoserver.raster_layers.create_viridis_style_if_not_exists() None
Create a GeoServer style for rasters using the viridis color scale.