diff --git a/minigrida/descriptors/fps.py b/minigrida/descriptors/fps.py index 83f2ba2..fee458d 100644 --- a/minigrida/descriptors/fps.py +++ b/minigrida/descriptors/fps.py @@ -20,6 +20,16 @@ def _feature_profiles(**kwargs): return sap.feature_profiles(**kwargs) +def _origin_profile(image, name): + return sap.Profiles([image], [{ + 'attribute': 'Origin', + 'filtering rule': None, + 'name': 'copy', + 'out feature': 'altitude', + 'profiles': [{'operation': 'copy feature altitude'}], + 'tree': {'adjacency': None, 'image_hash': None, 'image_name': name}}]) + + def run(gt, rasters, coords, remove, attributes, adjacency=4, feature='same', filtering='direct'): X = [] @@ -31,6 +41,7 @@ def run(gt, rasters, coords, remove, attributes, adjacency=4, # Compute EAP eap = [] for name, raster in rastersi.items(): + eap += [_origin_profile(raster, name)] eap += [_feature_profiles(image=raster, attribute=attributes, adjacency=adjacency,