Skip to content

Commit e3f9a1c

Browse files
FixIssue303
1 parent cafd405 commit e3f9a1c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gemgis/visualization.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ def convert_to_rgb(array: np.ndarray) -> np.ndarray:
797797
def drape_array_over_dem(array: np.ndarray,
798798
dem: Union[rasterio.io.DatasetReader, np.ndarray],
799799
extent: List[Union[float, int]] = None,
800-
zmax: Union[float, int] = 1000,
800+
zmax: Union[float, int] = 10000,
801801
resize_array: bool =True):
802802
"""Creating grid and texture to drape array over a digital elevation model
803803
@@ -834,6 +834,10 @@ def drape_array_over_dem(array: np.ndarray,
834834
.. versionchanged:: 1.1
835835
Function now allows rasters with different sizes and resizes one of the rasters automatically
836836
837+
.. versionchanged:: 1.1.2
838+
Edit zmax value and fixing a bug with the scikit-image resize function,
839+
see https://github.com/cgre-aachen/gemgis/issues/303
840+
837841
Example
838842
_______
839843
@@ -921,10 +925,12 @@ def drape_array_over_dem(array: np.ndarray,
921925

922926
if resize_array:
923927
array = resize(image=array,
928+
preserve_range=True,
924929
output_shape=(dem.shape[0],
925930
dem.shape[1]))
926931
else:
927932
dem = resize(image=dem,
933+
preserve_range=True,
928934
output_shape=(array.shape[0],
929935
array.shape[1]))
930936

0 commit comments

Comments
 (0)