Skip to content

Commit

Permalink
move import for gdal-dependent code into function call
Browse files Browse the repository at this point in the history
  • Loading branch information
iboates committed Jan 18, 2025
1 parent 2495ee0 commit c7a3082
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion geo/Geoserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from xmltodict import parse, unparse

# custom functions
from .Calculation_gdal import raster_value
from .Style import catagorize_xml, classified_xml, coverage_style_xml, outline_only_xml
from .supports import prepare_zip_file, is_valid_xml, is_surrounded_by_quotes

Expand Down Expand Up @@ -1611,6 +1610,9 @@ 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
"""

from .Calculation_gdal import raster_value

raster = raster_value(raster_path)
min_value = raster["min"]
max_value = raster["max"]
Expand Down

0 comments on commit c7a3082

Please sign in to comment.