pub struct LasHeader {Show 23 fields
pub version: LasVersion,
pub system_id: [u8; 32],
pub generating_software: [u8; 32],
pub file_creation_day: u16,
pub file_creation_year: u16,
pub header_size: u16,
pub offset_to_point_data: u32,
pub number_of_vlrs: u32,
pub point_data_format_id: u8,
pub point_data_record_length: u16,
pub number_of_point_records: u64,
pub scale_x: f64,
pub scale_y: f64,
pub scale_z: f64,
pub offset_x: f64,
pub offset_y: f64,
pub offset_z: f64,
pub max_x: f64,
pub min_x: f64,
pub max_y: f64,
pub min_y: f64,
pub max_z: f64,
pub min_z: f64,
}Expand description
Parsed LAS public header block.
Field offsets and sizes are taken from the LAS 1.4 specification.
Fields§
§version: LasVersionLAS format version.
system_id: [u8; 32]System identifier (32 bytes, null-padded ASCII).
generating_software: [u8; 32]Generating software string (32 bytes, null-padded ASCII).
file_creation_day: u16File creation day-of-year.
file_creation_year: u16File creation year.
header_size: u16Size of the public header block in bytes.
offset_to_point_data: u32Byte offset from the start of the file to point data.
number_of_vlrs: u32Number of variable length records.
point_data_format_id: u8Point data format ID (0–10).
point_data_record_length: u16Size of a single point record in bytes.
number_of_point_records: u64Total number of point records in the file.
scale_x: f64Scale factor applied to raw X integer coordinates.
scale_y: f64Scale factor applied to raw Y integer coordinates.
scale_z: f64Scale factor applied to raw Z integer coordinates.
offset_x: f64X coordinate offset.
offset_y: f64Y coordinate offset.
offset_z: f64Z coordinate offset.
max_x: f64Maximum X value.
min_x: f64Minimum X value.
max_y: f64Maximum Y value.
min_y: f64Minimum Y value.
max_z: f64Maximum Z value.
min_z: f64Minimum Z value.
Implementations§
Source§impl LasHeader
impl LasHeader
Sourcepub fn parse(data: &[u8]) -> Result<Self, CopcError>
pub fn parse(data: &[u8]) -> Result<Self, CopcError>
Parse a LAS public header from a byte slice.
The slice must contain at least 227 bytes (the LAS 1.0–1.3 header size).
§Errors
Returns CopcError::InvalidFormat when the data is too short or the
magic is wrong, and CopcError::UnsupportedVersion for unknown version
bytes.