Skip to main content

Package for GeoServer rest API

Project description

Downloads License: MIT

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(lyr_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', sld_version='1.0.0')

# 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')

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

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

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

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.

Acknowledgements

Created and managed by Tek Bahadur Kshetri for the activites of Geoinformatics Center of Asian Institute of Technology, Thailand.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoserver-rest-1.5.5.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

geoserver_rest-1.5.5-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file geoserver-rest-1.5.5.tar.gz.

File metadata

  • Download URL: geoserver-rest-1.5.5.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for geoserver-rest-1.5.5.tar.gz
Algorithm Hash digest
SHA256 8ad7c089aca38783ec340e165919ff65f2fa16dbd3c1ca56e49c339e97890c30
MD5 e5523976b6accf322a62ef6cf8239b96
BLAKE2b-256 a2c6d3ff0e01d4bca096f0ca904e3a5eb5d3477b95ca54eaaa9bdfdfac0aa2bb

See more details on using hashes here.

File details

Details for the file geoserver_rest-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: geoserver_rest-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for geoserver_rest-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3b37295aa35c00e58baa9eb07c8143a8f728909d8854a1c2512a44649ed59b8a
MD5 7e99d631bd50888d181f1a5a3584b2d2
BLAKE2b-256 8e0dcfc5cf5bae53f62cba457b2c3def98ce5c1702f20762e54f3b01868e263d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page