Skip to content

Set point_source_ID per scan when exporting LAZ/LAS#428

Merged
JanuszBedkowski merged 1 commit into
MapsHD:mainfrom
piorkoo:pointSourceID
May 14, 2026
Merged

Set point_source_ID per scan when exporting LAZ/LAS#428
JanuszBedkowski merged 1 commit into
MapsHD:mainfrom
piorkoo:pointSourceID

Conversation

@piorkoo
Copy link
Copy Markdown

@piorkoo piorkoo commented May 12, 2026

Summary

  • Each exported point now carries point_source_ID equal to the source scan's index in point_clouds_container.point_clouds, so merged exports remain attributable to their source scan.
  • Covered export paths: Save all marked scans → Local scan / Global scan (save_all_to_las), Separate global scans (laz/las) (save_separately_to_lassave_processed_pc), and Save all marked trajectories (save_trajectories_to_lazexportLaz).
  • Capped at 65535 (limit of unsigned short) with a stderr warning when the session contains more scans. Indexing follows position in the full point_clouds vector — hidden scans keep their original ID.

Test plan

  • Rebuild multi_view_tls_registration (CMake).
  • Load a session with ≥ 3 scans, export Global scan to .laz; verify in CloudCompare or lasinfo -histo point_source that point_source_ID values match scan indices.
  • Repeat with Local scan (IDs unchanged by transform).
  • Run Separate global scans (laz) — each output file should have a single uniform point_source_ID equal to its scan index.
  • Run Save all marked trajectories → Save all as las/laz files — trajectory points inherit psid per scan.
  • Verify backward compatibility: existing exports still open (point format 1, record length 28 unchanged).

🤖 Generated with Claude Code

Each exported point now carries point_source_ID equal to its scan's
index in point_clouds_container.point_clouds, so merged exports
(Local/Global scan), Separate global scans, and trajectory exports
remain attributable to their source scan. Capped at 65535 with a
stderr warning when the session has more scans.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@michalpelka
Copy link
Copy Markdown
Contributor

I like code, lets run CI.

@JanuszBedkowski JanuszBedkowski merged commit 54d0fcf into MapsHD:main May 14, 2026
7 checks passed
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.

3 participants