Commit 062dfede authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed issue #43 (AttributeError in case COREG_LOCAL.tieP_filter_level = 0).


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 9d2371be
Pipeline #15128 passed with stage
in 2 minutes and 35 seconds
......@@ -420,6 +420,7 @@ class Tie_Point_Grid(object):
TPR = Tie_Point_Refiner(GDF[GDF.ABS_SHIFT != self.outFillVal], **self.outlDetect_settings)
GDF_filt, new_columns = TPR.run_filtering(level=self.tieP_filter_level)
GDF = GDF.merge(GDF_filt[['POINT_ID'] + new_columns], on='POINT_ID', how="outer")
GDF = GDF.replace([np.nan, None], int(self.outFillVal)) # fillna fails with geopandas==0.6.0
self.CoRegPoints_table = GDF
......@@ -428,6 +429,7 @@ class Tie_Point_Grid(object):
if GDF.empty:
warnings.warn('No valid GCPs could by identified.')
else:
if self.tieP_filter_level > 0:
print("%d valid tie points remain after filtering." % len(GDF[GDF.OUTLIER.__eq__(False)]))
return self.CoRegPoints_table
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment