From 2bf1a89fa73c6b48f97d61a8c4196f8ca80116d4 Mon Sep 17 00:00:00 2001 From: iamtekson Date: Thu, 23 Jan 2025 17:32:09 -0700 Subject: [PATCH] update readme.md for extra dependency --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bacb97e..f95c4ea 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The `geoserver-rest` package is useful for the management of geospatial data in ## Installation ```python -conda install -c conda-forge geoserver-rest +conda install -c conda-forge geoserver-rest[all] ``` For the `pip` installation, check the [official documentation of geoserver-rest](https://geoserver-rest.readthedocs.io/en/latest/installation.html) @@ -50,19 +50,27 @@ geo.publish_featurestore(workspace='demo', store_name='geo_data', pg_table='geod 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') +geo.delete_layer(layer_name='layer1', workspace='demo') # delete style file -geo.delete_style(style_name='kamal2', workspace='demo') +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]`, + +```python +# 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 @@ -73,7 +81,6 @@ Geoserver-rest is the open source library written in python and contributors are 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](https://github.com/gicait/geoserver-rest/blob/master/docs/source/change_log.rst#master-branch) as well. - ## Citation Full paper is available here: https://doi.org/10.5194/isprs-archives-XLVI-4-W2-2021-91-2021 @@ -90,4 +97,3 @@ Full paper is available here: https://doi.org/10.5194/isprs-archives-XLVI-4-W2-2 DOI = {10.5194/isprs-archives-XLVI-4-W2-2021-91-2021} } ``` -