Skip to content

Commit 1510f8c

Browse files
authored
Merge pull request #160 from IGNF/dev
dev -> master pour version 1.15.4
2 parents 98aa715 + eb18ece commit 1510f8c

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.15.4
2+
- [fix] replace_area_plointcloud: better handling of source cloud with all points filtered
3+
14
# 1.15.3
25
- [fix] replace_area_plointcloud: handle DSM without 'nodata' value
36

pdaltools/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.15.3"
1+
__version__ = "1.15.4"
22

33

44
if __name__ == "__main__":

pdaltools/replace_area_in_pointcloud.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)