Skip to content

r.in.pdal: Add COPC support - #7213

Merged
cwhite911 merged 8 commits into
OSGeo:mainfrom
cwhite911:r-in-pdal-copc
Sep 9, 2026
Merged

cwhite911 merged 8 commits into
OSGeo:mainfrom
cwhite911:r-in-pdal-copc

Conversation

@cwhite911

@cwhite911 cwhite911 commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Adds COPC support to r.in.pdal.

  • Detect the CRS of COPC inputs: the point table SRS is not populated before execute(), so fall back to the reader stages. The -p file info output now prints the projection.
  • When the computational region is smaller than the point cloud and no reprojection is requested, pass the region bounds to readers.copc so the COPC spatial index skips data outside the region. The GRASS spatial filter still does the exact clip.
  • Add a point_table_capacity option (validated >= 1) for tuning the PDAL streaming buffer.
  • Initialize all GrassRasterWriter members explicitly. base_segment_ was previously uninitialized and read in processOne(), undefined behavior that could corrupt imported values when no base raster was given.
  • Count points on the region edge and report them once instead of one message per point.
  • pytest tests cover COPC import, region-bounds pruning, and point_table_capacity.

@cwhite911
cwhite911 requested a review from wenzeslaus March 24, 2026 17:56
@github-actions github-actions Bot added raster Related to raster data processing C++ Related code is in C++ module labels Mar 24, 2026
@petrasovaa

Copy link
Copy Markdown
Contributor

I have #6465 open, see if there is some overlap.

@cwhite911

Copy link
Copy Markdown
Contributor Author

There is some overlap with accessing the CRS information that would make more sense as part of the other PR, but this PR is still addressing other issues. I will add a review with my suggested addition to PR #6465

@cwhite911 cwhite911 self-assigned this Jul 30, 2026
When importing into a region smaller than the point cloud, pass the
region bounds to readers.copc so its octree index skips nodes outside
the region instead of decoding every point. Bounds are evaluated in the
file's CRS, which is expected to match the project's CRS, so the
pushdown is skipped when reprojection is requested. The GRASS spatial
filter is kept for the exact per-point clip.
@cwhite911 cwhite911 changed the title r.in.pdal: Added support for COPCs r.in.pdal: Add COPC support Aug 1, 2026
@cwhite911

Copy link
Copy Markdown
Contributor Author

I have #6465 open, see if there is some overlap.

Yes. I'll wait for #6465 to merge and then make any necessary changes here afterwards

@github-actions github-actions Bot added Python Related code is in Python HTML Related code is in HTML docs markdown Related to markdown, markdown files tests Related to Test Suite labels Aug 1, 2026
@cwhite911
cwhite911 requested a review from petrasovaa August 4, 2026 01:38
@cwhite911
cwhite911 marked this pull request as ready for review August 24, 2026 18:48
# Conflicts:
#	raster/r.in.pdal/main.cpp
#	raster/r.in.pdal/r.in.pdal.html
#	raster/r.in.pdal/r.in.pdal.md

@petrasovaa petrasovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor points from AI review:

  • The "Filtered spatially N points." statistic silently changes meaning for COPC inputs, since the reader now prunes before GrassLidarFilter sees the points.
  • "The compressed LAS (.laz) format can be imported only if PDAL has been compiled with LASzip support" is inaccurate — PDAL reads LAZ via LASzip or lazperf, and lazperf is the default in current builds.

Comment thread raster/r.in.pdal/info.cpp Resolved
@cwhite911
cwhite911 requested a review from petrasovaa September 5, 2026 02:09
@cwhite911
cwhite911 enabled auto-merge (squash) September 9, 2026 21:06
@cwhite911
cwhite911 merged commit aafd8a3 into OSGeo:main Sep 9, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++ Related code is in C++ docs HTML Related code is in HTML markdown Related to markdown, markdown files module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants