1. Conduid
  2. Science
  3. Geoserver Rest
MCP server · Science

Geoserver Rest

Python library for management of geospatial data in GeoServer.

52Fair

Scored 6 months ago · breakdown

About Geoserver Rest

Geoserver Rest is an MCP server in the Science category: python library for management of geospatial data in GeoServer.

Install

From source
git clone https://github.com/gicait/geoserver-rest

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Geoserver Rest

Powered by Claude · Grounded in docs

I know everything about Geoserver Rest. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Python wrapper for GeoServer REST API

Downloads

flake8 pre-commit

Full documentation

The documentation for this project is moved here: https://geoserver-rest.readthedocs.io/.

Overview

The geoserver-rest package is useful for the management of geospatial data in GeoServer. The package is useful for the creating, updating and deleting geoserver workspaces, stores, layers, and style files.

Installation

conda install -c conda-forge geoserver-rest

For the pip installation, check the official documentation of geoserver-rest

Some examples

Please check the https://geoserver-rest.readthedocs.io/ for full documentation.

# Import the library
from geo.Geoserver import Geoserver

# Initialize the library
geo = Geoserver('http://127.0.0.1:8080/geoserver', username='admin', password='geoserver')

# For creating workspace
geo.create_workspace(workspace='demo')

# For uploading raster data to the geoserver
geo.create_coveragestore(layer_name='layer1', path=r'path\to\raster\file.tif', workspace='demo')

# For creating postGIS connection and publish postGIS table
geo.create_featurestore(store_name='geo_data', workspace='demo', db='postgres', host='localhost', pg_user='postgres',
                        pg_password='admin')
geo.publish_featurestore(workspace='demo', store_name='geo_data', pg_table='geodata_table_name')

# For uploading SLD file and connect it with layer
geo.upload_style(path=r'path\to\sld\file.sld', workspace='demo')
geo.publish_style(layer_name='geoserver_layer_name', style_name='sld_file_name', workspace='demo')

# delete workspace
geo.delete_workspace(workspace='demo')

# delete layer
geo.delete_layer(layer_name='layer1', workspace='demo')

# delete style file
geo.delete_style(style_name='style1', workspace='demo')

To create the dynamic style you need to install the extra dependencies as, gdal, seaborn and matplotlib. The below functions will be only available after installing the full package geoserver-rest[all] or geoserver-rest[style],

# For creating the style file for raster data dynamically and connect it with layer
geo.create_coveragestyle(raster_path=r'path\to\raster\file.tiff', style_name='style_1', workspace='demo',
                         color_ramp='RdYiGn')
geo.publish_style(layer_name='geoserver_layer_name', style_name='raster_file_name', workspace='demo')

# For creating outline featurestyle
geo.create_outline_featurestyle(style_name='style1', color='#ff0000')

Contribution

Geoserver-rest is the open source library written in python and contributors are needed to keep this library moving forward. Any kind of contributions are welcome. Here are the basic rule for the new contributors:

  1. Please use the request library for the http request.
  2. One feature per pull request (If the PR is huge, you need to create a issue and discuss).
  3. Please add the update about your PR on the change log documentation as well.

Citation

Full paper is available here: https://doi.org/10.5194/isprs-archives-XLVI-4-W2-2021-91-2021

@Article{isprs-archives-XLVI-4-W2-2021-91-2021,
      AUTHOR = {Tek Bahadur Kshetri, Angsana Chaksana and Shraddha Sharma},
      TITLE = {THE ROLE OF OPEN-SOURCE PYTHON PACKAGE GEOSERVER-REST IN WEB-GIS DEVELOPMENT},
      JOURNAL = {The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences},
      VOLUME = {XLVI-4/W2-2021},
      YEAR = {2021},
      PAGES = {91--96},
      URL = {https://www.int-arch-photogramm-remote-sens-spatial-inf-sci.net/XLVI-4-W2-2021/91/2021/},
      DOI = {10.5194/isprs-archives-XLVI-4-W2-2021-91-2021}
  }

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Geoserver Rest

How do I install Geoserver Rest?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Geoserver Rest safe to use with an AI agent?

Its trust score is 52 out of 100 (fair). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Geoserver Rest still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.