Skip to main content

Package for GeoServer rest API

Reason this release was yanked:

Some import issue

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(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', 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')

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}
  }

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.

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-2.3.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

geoserver_rest-2.3.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geoserver-rest-2.3.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for geoserver-rest-2.3.0.tar.gz
Algorithm Hash digest
SHA256 0bcdb3a024a887b5bd64d80156729027879b10d4427874cfe589dcfdec07a0dd
MD5 0e412d64a05d6e5cc710ebfbab77c629
BLAKE2b-256 b084a1c13d259ac79e1d873ad4a7bbc08cceb58f4744ee74b1afa4f8d2845cc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geoserver_rest-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for geoserver_rest-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f19d479533f7f0a1491d01cd9af2223368c6da05ebbd6de1c127882d7abc1df1
MD5 2630eb3df6c18243e30705f4d6b329f0
BLAKE2b-256 189ec2d0e999380df717c80c3665a1074ae61edf5e5e22c879066028bfd3f116

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