Skip to content

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

Draft
cwhite911 wants to merge 4 commits into
OSGeo:mainfrom
cwhite911:r-in-pdal-copc
Draft

r.in.pdal: Add COPC support#7213
cwhite911 wants to merge 4 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
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