From c7a308255cca745b8d75cffb82e133d02523a2f9 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sat, 18 Jan 2025 14:19:09 +0100 Subject: [PATCH] move import for gdal-dependent code into function call --- geo/Geoserver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geo/Geoserver.py b/geo/Geoserver.py index 905f7fe..aaa9bca 100644 --- a/geo/Geoserver.py +++ b/geo/Geoserver.py @@ -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 @@ -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"]