Skip to content

Commit

Permalink
clip at -1000, not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Dec 16, 2018
1 parent e5c250d commit 0d0e55b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions sardem/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ def load_elevation(filename):
dem_img = data.reshape((1201, 1201))
else:
raise ValueError("Invalid .hgt data size: must be square size 1201 or 3601")
# TODO: do we always want this? Not sure
dem_img = np.clip(dem_img, 0, None)
# TODO: Verify that the min real value will be above -1000
min_valid = -1000
# Set NaN values to 0
dem_img[dem_img < min_valid] = 0

return dem_img

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="sardem",
version="0.2.4",
version="0.2.5",
author="Scott Staniewicz",
author_email="scott.stanie@utexas.com",
description="Create upsampled DEMs for InSAR processing",
Expand Down

0 comments on commit 0d0e55b

Please sign in to comment.