Skip to content

Commit

Permalink
added function distance_to_anomaly_gdal_ComputeProximity function for…
Browse files Browse the repository at this point in the history
… reduced run time.
  • Loading branch information
okolekar committed Sep 5, 2024
1 parent 059410c commit c422e64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eis_toolkit/raster_processing/distance_to_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ def distance_to_anomaly_gdal_ComputeProximity(
) -> Tuple[np.ndarray, profiles.Profile]:
"""Calculate distance from raster cell to nearest anomaly.
This function demonstrates superior performance compared to the distance_to_anomaly
and distance_to_anomaly_gdal functions, as it uses a low-level, C++-based API
within the GDAL library. By directly computing the proximity map from the
source dataset, it benefits from the core-level optimizations inherent to GDAL,
ensuring enhanced efficiency and speed.
The criteria for what is anomalous can be defined as a single number and
criteria text of "higher" or "lower". Alternatively, the definition can be
a range where values inside (criteria text of "within") or outside are
Expand Down

0 comments on commit c422e64

Please sign in to comment.