Provides functions to manage GeoServer feature types (vector layers) via its REST API.
Feature types are vector-based spatial resources that originate from datastores. This module handles listing, creating, updating, and deleting feature types.
Summary
Functions
Creates a new feature type (vector layer) in the specified datastore.
Deletes a feature type from the given datastore.
Lists all feature types in a given datastore and workspace.
Updates an existing feature type.
Functions
Creates a new feature type (vector layer) in the specified datastore.
Parameters
params: Map containing feature type configuration including:title: Human-readable titledescription: Descriptionabstract: Abstract textsrs: Coordinate reference system (e.g., "EPSG:4326")native_crs: Native CRSnative_bbox: Native bounding box as %{minx: x, maxx: x, miny: y, maxy: y}latlon_bbox: Lat/lon bounding boxenabled: Boolean (default: true)keywords: List of keywordsmetadata: Additional metadata
Returns
{:ok, feature_type_name}on success{:error, reason}on failure
Deletes a feature type from the given datastore.
Parameters
recurse: If true, also deletes dependent layers (default: false)
Returns
{:ok, feature_type_name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, message}}on transport error
Lists all feature types in a given datastore and workspace.
Parameters
list: Optional parameter to filter results. Can be::configured- Only configured feature types (default):available- Only available but not configured feature types:available_with_geom- Available feature types with geometry:all- All feature types
Returns
{:ok, [feature_types]}on success{:error, {:http_error, status, body}}on non-200 response{:error, exception}on transport error
Updates an existing feature type.
Parameters
params: Map containing updated feature type propertiesrecalculate: Optional parameter to recalculate bounding boxes
Returns
{:ok, feature_type_name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, message}}on transport error