LASHeader

Struct LASHeader 

Source
pub struct LASHeader {
Show 36 fields pub signature: String, pub source_id: u16, pub encoding: u16, pub project_id1: u32, pub project_id2: u16, pub project_id3: u16, pub project_id4: String, pub major_version: u8, pub minor_version: u8, pub system_identifier: String, pub generating_software: String, pub file_creation_day: u16, pub file_creation_year: u16, pub header_size: u16, pub offset_to_points: u32, pub num_variable_length_records: u32, pub point_data_format_id: u8, pub point_data_record_length: u16, pub num_points: u32, pub num_points_by_return: [u32; 5], pub x_scale_factor: f64, pub y_scale_factor: f64, pub z_scale_factor: f64, pub x_offset: f64, pub y_offset: f64, pub z_offset: 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, pub waveform_data_packet_offset: u64, pub extended_variable_length_record_offset: u64, pub extended_variable_length_size: u32, pub num_points_by_return_ll: [u64; 15],
}
Expand description

LAS Header Block Any field in the Public Header Block that is not required and is not used must be zero filled.

Fields§

§signature: String

File Signature (“LASF”) char[4] 4 bytes The file signature must contain the four characters “LASF”, and it is required by the LAS specification. These four characters can be checked by user software as a quick look initial determination of file type.

§source_id: u16

File Source ID unsigned short 2 bytes

File Source ID (Flight Line Number if this file was derived from an original flight line): This field should be set to a value between 1 and 65,535, inclusive. A value of zero (0) is interpreted to mean that an ID has not been assigned. In this case, processing software is free to assign any LAS 1.2 3 valid number. Note that this scheme allows a LIDAR project to contain up to 65,535 unique sources. A source can

§encoding: u16

Global Encoding unsigned short 2 bytes.

The meaning of GPS Time in the Point Records

  • 0 (not set) -> GPS time in the point record fields is GPS Week Time (the same as previous versions of LAS).
  • 1 (set) -> GPS Time is standard GPS Time (satellite GPS Time) minus 1 x 109. The offset moves the time back to near zero to improve floating point resolution.
§project_id1: u32

Project ID - GUID data 1 unsigned long 4 bytes. 0 means no project ID

§project_id2: u16

Project ID - GUID data 2 unsigned short 2 byte. 0 means no project ID

§project_id3: u16

Project ID - GUID data 3 unsigned short 2 byte. 0 means no project ID

§project_id4: String

Project ID - GUID data 4 unsigned char[8] 8 bytes. 0 means no project ID

§major_version: u8

Version Major unsigned char 1 byte

§minor_version: u8

Version Minor unsigned char 1 byte

§system_identifier: String

System Identifier char[32] 32 bytes

§generating_software: String

Generating Software char[32] 32 bytes

§file_creation_day: u16

File Creation Day Year unsigned short 2 bytes. 0 means no creation date

Day, expressed as an unsigned short, on which this file was created. Day is computed as the Greenwich Mean Time (GMT) day. January 1 is considered day 1.

§file_creation_year: u16

File Creation Day Year unsigned short 2 bytes. 0 means no creation date

The year, expressed as a four digit number, in which the file was created.

§header_size: u16

Header Size unsigned short 2 bytes

The size, in bytes, of the Public Header Block itself. In the event that the header is extended by a software application through the addition of data at the end of the header, the Header Size field must be updated with the new header size. Extension of the Public Header Block is discouraged; the Variable Length Records should be used whenever possible to add custom header data. In the event a generating software package adds data to the Public Header Block, this data must be placed at the end of the structure and the Header Size must be updated to reflect the new size.

§offset_to_points: u32

Offset to Point Data unsigned int 4 bytes

The actual number of bytes from the beginning of the file to the first field of the first point record data field. This data offset must be updated if any software adds data from the Public Header Block or adds/removes data to/from the Variable Length Records.

§num_variable_length_records: u32

Number of Variable Length Records unsigned int 4 bytes This field contains the current number of Variable Length Records. This number must be updated if the number of Variable Length Records changes at any time.

§point_data_format_id: u8

Point Data Format ID unsigned short 1 byte

The point data format ID corresponds to the point data record format type. LAS 1.4 defines types 0-10.

§point_data_record_length: u16

Point Data Record Length unsigned short 2 bytes

§num_points: u32

Number of point records unsigned long 4 bytes

§num_points_by_return: [u32; 5]

Number of points by return unsigned long[5] 20 bytes

§x_scale_factor: f64

X scale factor double 8 bytes

§y_scale_factor: f64

Y scale factor double 8 bytes

§z_scale_factor: f64

Z scale factor double 8 bytes

§x_offset: f64

X offset double 8 bytes

§y_offset: f64

Y offset double 8 bytes

§z_offset: f64

Z offset double 8 bytes

§max_x: f64

Max X double 8 bytes

§min_x: f64

Min X double 8 bytes

§max_y: f64

Max Y double 8 bytes

§min_y: f64

Min Y double 8 bytes

§max_z: f64

Max Z double 8 bytes

§min_z: f64

Min Z double 8 bytes

§waveform_data_packet_offset: u64

Start of Waveform Data Packet Record - Unsigned long long 8 bytes

§extended_variable_length_record_offset: u64

Start of first Extended Variable Length Record - unsigned long long 8 bytes

§extended_variable_length_size: u32

Number of Extended Variable Length Records - unsigned long 4 bytes

§num_points_by_return_ll: [u64; 15]

Number of points by return unsigned long long [15] 120 bytes *

Implementations§

Source§

impl LASHeader

Source

pub fn bbox(&self) -> BBox3D

Get the bounding box

Source

pub fn from_reader<T: Reader>(reader: &T) -> Self

Create from a reader

Trait Implementations§

Source§

impl Clone for LASHeader

Source§

fn clone(&self) -> LASHeader

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LASHeader

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LASHeader

Source§

fn default() -> LASHeader

Returns the “default value” for a type. Read more
Source§

impl PartialEq for LASHeader

Source§

fn eq(&self, other: &LASHeader) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for LASHeader

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V