Skip to content

Commit

Permalink
Merge pull request #127 from gicait/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
iamtekson authored Sep 20, 2023
2 parents 7d7d9a9 + 35d7c68 commit 5a3db89
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ sphinxcontrib-openapi==0.7.0
geopandas
seaborn
requests
xmltodict
2 changes: 1 addition & 1 deletion docs/source/geo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The ``Geoserver`` class


The ``Style`` functions
----------------
------------------------

.. automodule:: geo.Style
:members:
Expand Down
15 changes: 8 additions & 7 deletions geo/Geoserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ def create_coveragestore(
file_type: str = "GeoTIFF",
content_type: str = "image/tiff",
):
"""
Creates the coveragestore; Data will uploaded to the server.
"""Creates the coveragestore; Data will uploaded to the server.
Parameters
----------
Expand All @@ -367,6 +366,7 @@ def create_coveragestore(
-----
the path to the file and file_type indicating it is a geotiff, arcgrid or other raster type
"""

if path is None:
raise Exception("You must provide the full path to the raster")

Expand Down Expand Up @@ -1104,8 +1104,7 @@ def upload_style(
workspace: Optional[str] = None,
sld_version: str = "1.0.0",
):
"""
"""Uploads a style file to geoserver.
Parameters
----------
path : str
Expand Down Expand Up @@ -1169,16 +1168,15 @@ def create_coveragestyle(
cmap_type: str = "ramp",
number_of_classes: int = 5,
):
"""
"""Dynamically create style for raster.
Parameters
----------
raster_path : str
style_name : str, optional
workspace : str
color_ramp : str
cmap_type : str
# TODO: This should be a set of the available options : {"ramp", "linear", ... }
cmap_type : str TODO: This should be a set of the available options : {"ramp", "linear", ... }
number_of_classes : int
overwrite : bool
Expand All @@ -1188,6 +1186,7 @@ def create_coveragestyle(
This function will dynamically create the style file for raster.
Inputs: name of file, workspace, cmap_type (two options: values, range), ncolors: determines the number of class, min for minimum value of the raster, max for the max value of raster
"""

raster = raster_value(raster_path)
min_value = raster["min"]
max_value = raster["max"]
Expand Down Expand Up @@ -1697,6 +1696,7 @@ def create_datastore(
-----
If you have PostGIS datastore, please use create_featurestore function
"""

if workspace is None:
workspace = "default"

Expand Down Expand Up @@ -1754,6 +1754,7 @@ def create_shp_datastore(
-----
The layer name will be assigned according to the shp name
"""

if path is None:
raise Exception("You must provide a full path to shapefile")

Expand Down

0 comments on commit 5a3db89

Please sign in to comment.