Package for GeoServer rest API
Project description
Python wrapper for GeoServer REST API
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')
# 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. Here are the basic rule for the new contributors:
- Please use the request library for the http request.
- One feature per pull request (If the PR is huge, you need to create a issue and discuss).
- 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}
}
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
Built Distribution
File details
Details for the file geoserver_rest-2.9.1.tar.gz
.
File metadata
- Download URL: geoserver_rest-2.9.1.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1b16b6c81f8b27308b332afc9dcb9c4adbb0329f15fa687d595151f0075de1b |
|
MD5 | 9aa94a38094a4bca691fe020bbf4a0b3 |
|
BLAKE2b-256 | 0a0fef66ae0c2ed25092848400b522e0a555e3232b9fa84b302f16dc2484b698 |
File details
Details for the file geoserver_rest-2.9.1-py3-none-any.whl
.
File metadata
- Download URL: geoserver_rest-2.9.1-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074aa679f3291340e75bb07b814d2ec919d906c263a81779c37a430761cc3720 |
|
MD5 | 672e006e3feec8d4b051ec38a3fcef2d |
|
BLAKE2b-256 | 865e9c19040b9540f9deb907b729ce281e699107c0f8814656355cb9fdb4ad27 |