@@ -159,7 +159,8 @@ def replace_area(
159159 pipeline_target |= pdal .Filter .overlay (column = "fid" , dimension = "geometryFid" , datasource = replacement_area )
160160 # Keep only points out of the area
161161 pipeline_target |= pdal .Filter .expression (expression = "geometryFid==-1" , tag = "A" )
162- pipeline_target .execute ()
162+ target_count = pipeline_target .execute ()
163+ print ("Step 1: target count: " , target_count )
163164
164165 # get input dimensions dtype from target
165166 if pipeline_target .arrays :
@@ -190,10 +191,11 @@ def replace_area(
190191 pipeline_source |= pdal .Filter .overlay (column = "fid" , dimension = "geometryFid" , datasource = replacement_area )
191192 # Keep only points in the area
192193 pipeline_source |= pdal .Filter .expression (expression = "geometryFid>=0" , tag = "B" )
193- pipeline_source .execute ()
194+ source_count = pipeline_source .execute ()
195+ print ("Step 2: source count: " , source_count )
194196
195197 # add source to the result
196- if pipeline_source . arrays :
198+ if source_count :
197199 # eventually add dimensions in source to have same dimensions as target cloud
198200 # we do that in numpy (instead of PDAL filter) to keep dimension types
199201 source_cloud_crop = pipeline_source .arrays [0 ]
0 commit comments