Las io#17
Merged
Merged
Conversation
- LasRayCloudWriter and LasWriter now write LAS 1.4 (version_minor=4, point formats 7 and 6 respectively) instead of LAS 1.2 - passthrough expanded from 6 to 8 bytes/point using LAS 1.4 extended fields (extended_return_number, extended_classification, extended_scan_angle etc.) - LAS 1.2 sources converted to 8-byte LAS 1.4 layout on read - Both LasWriter and LasRayCloudWriter destructors now patch the LAS 1.4 64-bit extended point count at header offset 247 in addition to the legacy 32-bit count at offset 107 - All tool output filenames now inherit the input file extension (.las, .laz, or .ply) instead of hardcoding .las - raysplitter splitGrid and splitColour output files also use input extension
LASzip rejects writes with version_minor=4 unless header_size is at least 235 (LAS 1.3+). Correct LAS 1.4 header is 375 bytes.
LASzip internally uses the LAS 1.2 default header size (227) when computing offset_to_point_data during VLR additions. After all VLRs are added, adjust offset_to_point_data by +148 (375-227) in LasRayCloudWriter, and set it explicitly to 375 for LasWriter and writeLas which have no VLRs. Also fix rayimport: always add _raycloud suffix so the output file never conflicts with the input file. Preserves .laz extension for .laz inputs.
All raycloudtools that read and write LAS/LAZ files now pass the original sensor extra-byte VLR through unchanged, so attributes like InternalTime, Amplitude, BeamDirection, etc. survive every pipeline step: rayimport, raydecimate, raycolour, raytranslate, raysplit (all split modes), raycombine, raysmooth, raydenoise. Key changes: - raylaz: add readLasExtraBytesVlr helper; stream passthrough bytes (8 std LAS fields + orig sensor bytes) alongside each point; fix has_tree_id_attr detection from VLR instead of byte count - raycloudwriter: accept extra_bytes_vlr in begin() and register attributes before opening the laszip writer - raycloud: convertCloud (used by raytranslate/rayrotate) now pre-reads VLR and routes passthrough bytes per chunk - raysplitter: all six split functions (split, splitPlane, splitCapsule, splitBox, splitGrid, splitColour) pre-read VLR, pass it to every CloudWriter::begin call, and copy passthrough bytes to each output sub-ray including clipped pieces - raydecimation: streaming raydecimate passes passthrough through - raycolour, raycombine, rayimport, rayterrain: same pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.