Skip to content

Read the per-point flags of the PinPoint sectioned layout - #63

Open
mahach666 wants to merge 1 commit into
feature/issue-11-recap-project-transformfrom
feature/issue-12-pinpoint-filterbits
Open

mahach666 wants to merge 1 commit into
feature/issue-11-recap-project-transformfrom
feature/issue-12-pinpoint-filterbits

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #12

Based on #62 (the branch feature/issue-11-recap-project-transform); merge the earlier pull requests first.

What changed

  • The FilterBits channel of the PinPoint sectioned layout is now read and validated (one flag byte per stored point,
    checked against the stored point count like the other channels). A wrong size fails with InvalidDataException.
  • The new PclReadOptions.ExcludeFilteredPoints (default false) excludes the points with a non-zero flag from the read;
    the rest keeps consecutive Index values. By default every stored point is returned, as before.
  • PinPointScan.HasFilterBits reports whether the data file holds the flags channel.

Files changed

  • src/PclIO/PclReadOptions.cs: the new ExcludeFilteredPoints option.
  • src/PclIO/Formats/PinPoint/PinPointPackedLayout.cs: FilterBits is a known channel (1 byte per point).
  • src/PclIO/Formats/PinPoint/PinPointDocument.cs: the flags stream is opened, validated and applied; HasFilterBits is new;
    the reader documentation updated.
  • tests/PclIO.Tests/PinPointPackedFixtures.cs: the fixture accepts flag bytes (filterBits).
  • tests/PclIO.Tests/PinPointPackedTests.cs: new tests for the default behaviour, the opt-in exclusion and a wrong-size channel.
  • README.md, docs/public-api.md, CHANGELOG.md: the new behaviour.

Tests

  • dotnet build — 0 warnings, 0 errors.
  • dotnet test — 622 passed, 0 failed, 10 skipped (the tests that need private scan files) on .NET 8 and .NET 10.

Limits

  • The exact meaning of the individual flag bits is not confirmed by test files (no vendor files are available under the
    clean-room rule), so any non-zero value counts as filtered. This is stated in the API documentation.
  • PointCount still counts all stored points; excluded points are dropped while reading, like the plausibility rule.
  • The table layout has no flags channel, so the option only affects the sectioned layout; RowColIndex stays unread.

@mahach666
mahach666 force-pushed the feature/issue-11-recap-project-transform branch from 26d664f to 0821a5b Compare November 17, 2026 15:01
@mahach666
mahach666 force-pushed the feature/issue-12-pinpoint-filterbits branch from afcc67f to 993e93c Compare November 17, 2026 15:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant