Skip to content

Convert spherical coordinates of E57 scans to Cartesian points - #69

Open
mahach666 wants to merge 2 commits into
feature/issue-17-e57-scaled-integersfrom
feature/issue-18-e57-spherical
Open

mahach666 wants to merge 2 commits into
feature/issue-17-e57-scaled-integersfrom
feature/issue-18-e57-spherical

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #18

Based on #68 (the branch feature/issue-17-e57-scaled-integers); merge the earlier pull requests first.

What changed

  • E57 scans that store spherical coordinates (sphericalRange, sphericalAzimuth, sphericalElevation) are now decoded:
    each triple is converted to a Cartesian point as the standard defines (range in the file's unit, azimuth and elevation in
    radians). Float and scaled-integer components both work, per component.
  • A prototype with a partial spherical triple, or with both Cartesian and spherical coordinates, lists normally and fails
    with NotSupportedException when its points are read, with a message that names the problem.

Files changed

  • src/PclIO/Formats/E57/E57Document.cs: spherical layout (streams, sizes, scaled-integer parameters), conversion in
    ReadPoints, record-count agreement for spherical streams, updated class documentation.
  • tests/PclIO.Tests/FormatTests.cs: new tests for float spherical decoding with the pose applied, for scaled-integer
    spherical components, for a partial triple, for a both-kinds prototype and for a partial spherical record.
  • README.md, CHANGELOG.md: the new behaviour.

Tests

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

Limits

  • A lone extra Cartesian field next to a complete spherical triple (or vice versa) is ignored; the complete representation
    decides. A file with two complete representations is rejected.
  • Spherical bounds are not interpreted; Bounds still comes from cartesianBounds when the file states it.

@mahach666
mahach666 force-pushed the feature/issue-17-e57-scaled-integers branch from fe2057c to b9c5f90 Compare November 17, 2026 15:01
@mahach666
mahach666 force-pushed the feature/issue-18-e57-spherical branch from 7350d6a to ee38a26 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