Skip to content

Commit

Permalink
Bugfix in common.py: Did not work for data with a nodata value differ…
Browse files Browse the repository at this point in the history
…ent to -10000. Fixed line which replaced nan values with -10000, instead of the user-defined default_nan_values of the SfM photogrammetric software.
  • Loading branch information
jllovell committed Dec 12, 2024
1 parent 6289af9 commit 5cc1286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sandpyper/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ def extract_from_folder(
if mode == "dsm":
nan_out = np.count_nonzero(np.isnan(np.array(gdf.z).astype("f")))
nan_raster = np.count_nonzero(gdf.z == nan_values)
gdf.z.replace(-10000, np.nan, inplace=True)
gdf.z.replace(nan_values, np.nan, inplace=True)

elif mode == "ortho":
nan_out = np.count_nonzero(
Expand Down

0 comments on commit 5cc1286

Please sign in to comment.