API
ColorTypes.RGB
— MethodThe RGB color associated with this point
LASDatasets.ClassificationLookup
— Typestruct ClassificationLookup
A lookup record for classification labels. Each class has a short description telling you what it is.
class_description_map::Dict{UInt8, String}
: Mapping of each class to a description
ClassificationLookup(class_description_map)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/registered_vlrs.jl:14
.
ClassificationLookup(class_descriptions)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/registered_vlrs.jl:22
.
LASDatasets.ExtendedPointRecord
— Typestruct ExtendedPointRecord{TPoint, Names, Types} <: LASDatasets.LasRecord
A LAS record that has a LAS point and extra user-defined point fields. Note that these must be documented as ExtraBytes
VLRs in the LAS file
point::Any
: The LAS point stored in this recorduser_fields::LASDatasets.UserFields
: Extra user fields associated with this point
LASDatasets.ExtraBytes
— Typestruct ExtraBytes{TData}
Extra Bytes record that documents an extra field present for a point in a LAS file
options::UInt8
: Specifies whether the min/max range, scale factor and offset for this field is set/meaningful and whether there is a special value to be interpreted as "NO_DATA"name::String
: Name of the extra fieldno_data::Any
: A value that's used if the "NO_DATA" flag is set inoptions
. Use this if the point doesn't have data for this typemin_val::Any
: Minimum value for this field, zero if not usingmax_val::Any
: Maximum value for this field, zero if not usingscale::Any
: Scale factor applied to this field, zero if not usingoffset::Any
: Offset applied to this field, zero if not usingdescription::String
: Description of this extra field
LASDatasets.ExtraBytesCollection
— Typestruct ExtraBytesCollection
A collection of Extra Bytes records that gets packed into a VLR
extra_bytes::Vector{ExtraBytes}
: Collection of Extra Bytes Records, each documenting one user field in the dataset
ExtraBytesCollection(extra_bytes)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/registered_vlrs.jl:228
.
ExtraBytesCollection()
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/registered_vlrs.jl:233
.
LASDatasets.FullRecord
— Typestruct FullRecord{TPoint, Names, Types, N} <: LASDatasets.LasRecord
A LAS record that has a LAS point, extra user-defined fields and additional undocumented extra bytes
point::Any
: The LAS point stored in this recorduser_fields::LASDatasets.UserFields
: Extra user fields associated with this pointundoc_bytes::StaticArraysCore.SVector{N, UInt8} where N
: Array of extra bytes after the point that haven't been documented in the VLRs
LASDatasets.GeoAsciiParamsTag
— Typestruct GeoAsciiParamsTag
An array of ASCII data that contains many strings separated by null terminator characters in ascii_params
. These are referenced by position from the data in a GeoKeys
record
LASDatasets.GeoDoubleParamsTag
— Typestruct GeoDoubleParamsTag
A collection of values double_params
that are referenced by tag sets in a GeoKeys
record
LASDatasets.GeoKeys
— Typestruct GeoKeys
Contains the TIFF keys that defines a coordinate system. A complete description can be found in the GeoTIFF format specification.
As per the spec:
key_directory_version = 1
alwayskey_revision = 1
alwaysminor_revision = 0
always
This may change in future LAS spec versions
LASDatasets.GeoKeys
— MethodCreate GeoKeys from EPSG code. Assumes CRS is projected and in metres.
LASDatasets.KeyEntry
— Typestruct KeyEntry
A key entry for a piece o0f GeoTIFF data
keyid::UInt16
: Defined key ID for each piece of GeoTIFF data. IDs contained in the GeoTIFF specificationtiff_tag_location::UInt16
: Indicates where the data for this key is locatedcount::UInt16
: Number of characters in string for values of GeoAsciiParamsTag, otherwise is 1value_offset::UInt16
: Contents vary depending on value fortiff_tag_location
above
LASDatasets.LASDataset
— Typestruct LASDataset
A wrapper around a LAS dataset. Contains point cloud data in tabular format as well as metadata and VLR's/EVLR's
header::LasHeader
: The header from the LAS file the points were extracted frompointcloud::TypedTables.FlexTable
: Point cloud data stored in a Tabular format for conveniencevlrs::Vector{LasVariableLengthRecord}
: Collection of Variable Length Records from the LAS fileevlrs::Vector{LasVariableLengthRecord}
: Collection of Extended Variable Length Records from the LAS fileuser_defined_bytes::Vector{UInt8}
: Extra user bytes packed between the Header block and the first VLR of the source LAS fileunit_conversion::StaticArraysCore.SVector{3, Float64}
: Unit conversion factors applied to each axis when the dataset is ingested. This is reversed when you save the dataset to keep header/coordinate system information consistent
LASDatasets.LASDataset
— MethodLASDataset(
pointcloud::AbstractVector{<:NamedTuple};
vlrs,
evlrs,
user_defined_bytes,
scale
) -> LASDataset
Create a LASDataset from a pointcloud and optionally vlrs/evlrs/userdefinedbytes, NO header required.
LASDatasets.LasHeader
— Typemutable struct LasHeader
A LAS Header containing metadata regarding information in a LAS file See full specification here
las_version::VersionNumber
: The LAS spec version this header was written infile_source_id::UInt16
: Numeric identifier for the source that made this file. Set to 0 if the ID is unassignedglobal_encoding::UInt16
: A bit field used to indicate global properties. See the spec for more infoguid_1::UInt32
: First member of the Project GUIDguid_2::UInt16
: Second member of the Project GUIDguid_3::UInt16
: Third member of the Project GUIDguid_4::NTuple{8, UInt8}
: Fourth member of the Project GUIDsystem_id::NTuple{32, UInt8}
: A unique identifier indicating how the data was createdsoftware_id::NTuple{32, UInt8}
: Identifier for the software that created the LAS filecreation_dayofyear::UInt16
: The Greenwich Mean Time (GMT) day of the year (as an unsigned short) on which the file was createdcreation_year::UInt16
: Four digit number for the year the file was createdheader_size::UInt16
: Size (in bytes) of the public header block in the LAS file. This varies depending on which LAS version was used to write it. For LAS v1.4 it's 375 bytesdata_offset::UInt32
: Offset to the point data (in bytes) from the start of the file to the first field of the first point recordn_vlr::UInt32
: Number of Variable Length Records (VLR's) in the LAS file. These come after the header and before the point recordsdata_format_id::UInt8
: Point data record format stored in the LAS file. LAS v1.4 supports formats 0-10data_record_length::UInt16
: Size in bytes of a point data recordlegacy_record_count::UInt32
: For maintaining legacy compatibility, the number of point records in the file (must not exceedtypemax(UInt32)
). Only populated for point records 0-5legacy_point_return_count::NTuple{5, UInt32}
: For maintaining legacy compatibility, the number of points per return (max of 5 returns, counts must not exceedtypemax(UInt32)
). Only populated for point records 0-5spatial_info::SpatialInfo
: Spatial information describing the bounding range of the points, their offsets and any scaling factor applied to themwaveform_record_start::UInt64
: Offset in bytes from the start of the file to the first byte of the Waveform Data Package Reckordevlr_start::UInt64
: Offset in bytes from the start of the file to the first byte of the first Extended Variable Length Record (EVLR)n_evlr::UInt32
: Number of EVLR's in the LAS filerecord_count::UInt64
: Number of point records saved in this file (can't exceedtypemax(UInt64)
). This is populated for LAS v1.4point_return_count::NTuple{15, UInt64}
: Number of points per return saved in this file (15 returns total, counts can't exceedtypemax(UInt64)
). This is populated for LAS v1.4
LASDatasets.LasPoint
— TypeAn abstract type of LasPoint. Implemented by concrete types for formats that are supported in the spec
LASDatasets.LasPoint0
— TypeASPRS LAS point data record format 0
LASDatasets.LasPoint1
— TypeASPRS LAS point data record format 1
LASDatasets.LasPoint10
— TypeASPRS LAS point data record format 10
LASDatasets.LasPoint2
— TypeASPRS LAS point data record format 2
LASDatasets.LasPoint3
— TypeASPRS LAS point data record format 3
LASDatasets.LasPoint4
— TypeASPRS LAS point data record format 4
LASDatasets.LasPoint5
— TypeASPRS LAS point data record format 5
LASDatasets.LasPoint6
— TypeASPRS LAS point data record format 6
LASDatasets.LasPoint7
— TypeASPRS LAS point data record format 7
LASDatasets.LasPoint8
— TypeASPRS LAS point data record format 8
LASDatasets.LasPoint9
— TypeASPRS LAS point data record format 9
LASDatasets.LasRecord
— Typeabstract type LasRecord
An abstract form of a LAS record. These are points with some additional information possibly included
LASDatasets.LasVariableLengthRecord
— Typemutable struct LasVariableLengthRecord{TData}
A variable length record included in a LAS file. This stores a particular data type TData
in the record, which can be a known VLR such as a WKT transform or a custom struct. To properly define I/O methods for VLR's of custom structs, you must register which user and record ID's this struct type will use using
@register_vlr_type TData user_id record_ids
And overload the methods read_vlr_data
and write_vlr_data
for your type TData
See the LAS v1.4 spec here for more details.
reserved::UInt16
user_id::String
record_id::UInt16
: Numerical ID assigned to this record typedescription::String
data::Any
extended::Bool
LASDatasets.OGC_WKT
— Typestruct OGC_WKT
A Coordinate System WKT record specified by the Open Geospatial Consortium (OGC) spec
wkt_str::String
: The WKT formatted string for the coordinate systemnb::Int64
: Number of bytes in the WKT stringunit::Union{Missing, String}
: Units applied along the horizontal (XY) plane in this coordinate systemvert_unit::Union{Missing, String}
: Units applied along the vertical (Z) axis in this coordinate system. Note: this will not in general match the horizontal coordinate
LASDatasets.PointRecord
— Typestruct PointRecord{TPoint} <: LASDatasets.LasRecord
A LAS record that only has a point
point::Any
: The LAS point stored in this record
LASDatasets.SpatialInfo
— Typestruct SpatialInfo
A wrapper around the spatial information for points in a LAS dataset, specifically the bounding box, overall translation and scaling factors applied to each point
LASDatasets.TextAreaDescription
— Typestruct TextAreaDescription
A wrapper around a text area description, which is used for providing a textual description of the content of the LAS file
txt::String
: Text describing the content of the LAS file
LASDatasets.UndocPointRecord
— Typestruct UndocPointRecord{TPoint, N} <: LASDatasets.LasRecord
A LAS record that has a point as well as additional undocumented bytes (i.e. that don't have an associated ExtraBytes
VLR)
point::Any
: The LAS point stored in this recordundoc_bytes::StaticArraysCore.SVector{N, UInt8} where N
: Array of extra bytes after the point that haven't been documented in the VLRs
LASDatasets.UserFields
— Typestruct UserFields{Names, Types}
A collection of user-defined non-standard point fields in LAS These will be documented in the "Extra Bytes" VLR of your LAS file
values::NamedTuple{Names, Types} where {Names, Types}
: Mapping of field names to values. Note that values must match the corresponding field type included in theUserFields
Type
parameter
UserFields(values)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:12
.
UserFields(fields)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:16
.
LASDatasets.WaveformPacketDescriptor
— Typestruct WaveformPacketDescriptor
A Wave Packet Descriptor which contains information that describes the configuration of the waveform packets. Since systems may be configured differently at different times throughout a job, the LAS file supports 255 Waveform Packet Descriptors
bits_per_sample::UInt8
: Number of bits per sample. 2 to 32 bits per sample are supportedcompression_type::UInt8
: Indicates the compression algorithm used for the waveform packets associated with this descriptor. A value of 0 indicates no compression. Zero is the only value currently supportednum_samples::UInt32
: Number of samples associated to this packet type. This always corresponds to the decompressed waveform packettemporal_sample_spacing::UInt32
: The temporal sample spacing in picoseconds. Example values might be 500, 1000, 2000, and so on, representing digitizer frequencies of 2 GHz, 1 GHz, and 500 MHz respectively.digitizer_gain::Float64
: The digitizer gain used to convert the raw digitized value to an absolute digitizer voltage using the formula: 𝑉𝑂𝐿𝑇𝑆 = 𝑂𝐹𝐹𝑆𝐸𝑇 + 𝐺𝐴𝐼𝑁 * 𝑅𝑎𝑤𝑊𝑎𝑣𝑒𝑓𝑜𝑟𝑚𝐴𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒
digitizer_offset::Float64
: The digitizer offset used to convert the raw digitized value to an absolute digitizer using formula above
ColorTypes.blue
— MethodThe blue image channel value associated with this point
ColorTypes.green
— MethodThe green image channel value associated with this point
ColorTypes.red
— MethodThe red image channel value associated with this point
LASDatasets.add_column!
— Methodadd_column!(
las::LASDataset,
column::Symbol,
values::AbstractArray{T, 1}
)
Add a column with name column
and set of values
to a las
dataset
LASDatasets.add_extra_bytes!
— Methodadd_extra_bytes!(
las::LASDataset,
col_name::Symbol,
_::Type{T},
extra_bytes_vlr::LasVariableLengthRecord{ExtraBytesCollection}
) -> Int64
Add an extra bytes VLR to a LAS dataset to document an extra user-field for points
Arguments
las
: LAS dataset to add extra bytes tocol_name
: Name to save the user field asT
: Data type for the user field (must be a base type as specified in the spec or a static vector of one of these types)extra_bytes_vlr
: An Extra Bytes Collection VLR that already exists in the dataset
LASDatasets.add_extra_bytes_to_collection!
— Methodadd_extra_bytes_to_collection!(
collection::ExtraBytesCollection,
col_name::Symbol,
_::Type{T}
) -> Vector{ExtraBytes}
Construct an extra bytes VLR with a field name col_name
and data type T
LASDatasets.add_points!
— Methodadd_points!(
las::LASDataset,
points::AbstractVector{<:NamedTuple}
)
Add a collection of points
to a LASDataset
, las
. Updates header information to ensure dataset consistency
LASDatasets.add_vlr!
— Methodadd_vlr!(
las::LASDataset,
vlr::LasVariableLengthRecord
) -> Union{Nothing, Int64}
Add a vlr
into the set of VLRs in a LAS dataset las
. Note that this will modify the header content of las
, including updating its LAS version to v1.4 if vlr
is extended
LASDatasets.check_data_against_record_id
— Methodcheck_data_against_record_id(
data,
user_id::String,
record_id::Integer,
extended::Bool
)
Check that the user_id
and record_id
given are appropriate for a known VLR type data entry data
LASDatasets.check_user_type
— Methodcheck_user_type(_::Type{T})
Verify that a user field data type T
is supported as an extra byte type
LASDatasets.classification
— MethodClassification value as defined in the ASPRS classification table.
LASDatasets.conversion_from_vlrs
— Methodconversion_from_vlrs(
wkt::OGC_WKT;
convert_x_y_units,
convert_z_units
) -> Union{Missing, StaticArraysCore.SVector{3, Float64}}
Given an OGC WKT coordinate system wkt
, attempt to parse conversion units (to metres) with optional operator supplied overrides. Can opt to convert all axes units or just the vertical.
LASDatasets.convert_units!
— Methodconvert_units!(
pointcloud::AbstractVector{<:NamedTuple},
vlrs::Vector{LasVariableLengthRecord},
convert_x_y_units::Union{Missing, String},
convert_z_units::Union{Missing, String};
verbose
) -> StaticArraysCore.SVector{3, Float64}
Convert the position units of some pointcloud
data into metres based upon the coordinate units in the LAS file's vlrs
. Can override the unit conversion by manually specifying a unit to convert on the XY-plane, convert_x_y_units
, and/or a unit to convert on the z-axis convert_z_units
(missing if not overriding)
LASDatasets.creation_day_of_year
— Methodcreation_day_of_year(h::LasHeader) -> UInt16
Get the creation day of the year from a header h
LASDatasets.creation_year
— Methodcreation_year(h::LasHeader) -> UInt16
Get the creation year from a header h
LASDatasets.data_type
— Methoddata_type(_::ExtraBytes{TData}) -> Any
Get the data type of an ExtraBytes
record
LASDatasets.data_type_from_ids
— Methoddata_type_from_ids(
user_id::String,
record_id::Integer
) -> DataType
Get the data type associated with a particular user_id
and record_id
. This is used to automatically parse VLR data types on reading NOTE: If the user and record ID combination hasn't been registered, will default to Vector{UInt8}
and the VLR data will be returned as raw bytes.
LASDatasets.edge_of_flight_line
— MethodIf true, it is the last point before the scanner changes direction.
LASDatasets.evlr_start
— Methodevlr_start(header::LasHeader) -> UInt64
Get the offset in bytes to the first EVLR in a LAS file from a header header
LASDatasets.extract_vlr_type
— Methodextract_vlr_type(
vlrs::Vector{<:LasVariableLengthRecord},
user_id::String,
record_id::Integer
) -> Union{Nothing, LasVariableLengthRecord}
Extract the VLR with a user_id
and record_id
from a collection of VLRs, vlrs
LASDatasets.file_source_id
— Methodfile_source_id(h::LasHeader) -> UInt16
Get the file source ID specification version from a header h
LASDatasets.flag_byte
— MethodFlag byte, as represented in the point data, built up from components
LASDatasets.flag_byte
— MethodFlag byte, contains return number, number of returns, scan direction flag and edge of flight line
LASDatasets.get_cols_and_extractors
— Methodget_cols_and_extractors(
_::Type{TPoint<:LasPoint},
required_columns,
xyz::SpatialInfo
) -> Tuple{Any, Any}
Helper function that gets the compatible column names from a user-requested set of columns and a particular point format
Arguments
TPoint
: Type ofLasPoint
format to check column compatibility forrequired_columns
: Set of columns requested by the user (if empty, use all columns included in the formatTPoint
)xyz
: Spatial information used to apply scaling/offset factors to point positions
LASDatasets.get_evlrs
— Methodget_evlrs(
las::LASDataset
) -> Vector{LasVariableLengthRecord}
Extract the set of Extended Variable Length Records from a LASDataset
las
LASDatasets.get_extra_bytes
— Methodget_extra_bytes(
collection::ExtraBytesCollection
) -> Vector{ExtraBytes}
Helper function that gets the set of Extra Bytes records from an Extra Bytes collection
LASDatasets.get_field_name
— Functionget_field_name(extractor::Extractor{TColumn}, point_type::Type{TPoint}) where {TPoint, TColumn}
Gets the field name in the point_type
for column TColumn
.
LASDatasets.get_header
— Methodget_header(las::LASDataset) -> LasHeader
Extract the header information from a LASDataset
las
LASDatasets.get_header_size_from_version
— Methodget_header_size_from_version(
las_version::VersionNumber
) -> Int64
Get the header size (in bytes) for a given LAS version (as found in each version's spec)
LASDatasets.get_las_version_from_data
— Methodget_las_version_from_data(
pc::AbstractVector{<:NamedTuple},
point_type
) -> VersionNumber
Find out the minimum las version that you can use to write the data.
LASDatasets.get_num_undocumented_bytes
— FunctionHelper function to get the number of undocumented extra bytes associated with a LAS point record
get_num_undocumented_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:126
.
get_num_undocumented_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:158
.
get_num_undocumented_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:187
.
get_num_undocumented_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:216
.
LASDatasets.get_num_user_field_bytes
— FunctionHelper function to get the number of bytes making up user-defined fields associated with a LAS point record
get_num_user_field_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:125
.
get_num_user_field_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:155
.
get_num_user_field_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:186
.
get_num_user_field_bytes(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:213
.
LASDatasets.get_number_of_points_by_return
— Methodget_number_of_points_by_return(
header::LasHeader
) -> Union{NTuple{5, UInt32}, NTuple{15, UInt64}}
Get the number of points per return for a header header
LASDatasets.get_point
— Methodget_point(record::LASDatasets.LasRecord) -> Any
Helper function to get the LAS point from a LAS point record
get_point(record)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:75
.
LASDatasets.get_point_format
— FunctionHelper function to get the LAS point format associated with a LAS point record
get_point_format(table)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:19
.
get_point_format(columns)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:21
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:230
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:231
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:232
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:233
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:234
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:235
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:236
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:237
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:238
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:239
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:240
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:241
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:253
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:124
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:154
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:185
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/records.jl:212
.
LASDatasets.get_point_format
— Methodget_point_format(table::AbstractVector{<:NamedTuple}) -> Any
Get the minimum point format that is compatible with the contents of a point cloud in a table
LASDatasets.get_point_format
— Methodget_point_format(
_::Type{TPoint<:LasPoint}
) -> Type{LasPoint10}
Get the concrete point format struct from an abstract LasPoint
type
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:230
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:231
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:232
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:233
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:234
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:235
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:236
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:237
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:238
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:239
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:240
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:241
.
get_point_format(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:253
.
LASDatasets.get_point_format_id
— Methodget_point_format_id(_::Type{T<:LasPoint{N}}) -> Any
Get the numeric format ID corresponding to a particular point format
get_point_format_id(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:250
.
get_point_format_id(_)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/points.jl:251
.
LASDatasets.get_pointcloud
— Methodget_pointcloud(las::LASDataset) -> TypedTables.FlexTable
Extract point cloud data as a Table from a LASDataset
las
LASDatasets.get_record_bytes
— Methodget_record_bytes(
records::StructArrays.StructArray{TRecord<:LASDatasets.LasRecord, 1},
vlrs::Vector{LasVariableLengthRecord}
) -> Any
Construct an array of bytes that correctly encodes the information stored in a set of LAS records
according to the spec
LASDatasets.get_unit_conversion
— Methodget_unit_conversion(
las::LASDataset
) -> StaticArraysCore.SVector{3, Float64}
Get the unit factor conversion that was applied to this dataset when ingested
LASDatasets.get_user_defined_bytes
— Methodget_user_defined_bytes(las::LASDataset) -> Vector{UInt8}
Extract the set of user-defined bytes from a LASDataset
las
LASDatasets.get_user_field_map
— Methodget_user_field_map(
user_fields::Union{Tuple, Vector}
) -> Dict{Symbol, Vector{Symbol}}
Helper function that maps a user field name to the set of user field names in the Extra Bytes VLRs that are entries for this field. If a user field is a scalar, this will simply map user_field => [user_field]
. If it is a vector, it will map col => ["col [0]", "col [1]", ..., "col [N]"]
LASDatasets.get_user_fields_for_table
— Methodget_user_fields_for_table(
records::Array{TRecord<:Union{LASDatasets.ExtendedPointRecord, LASDatasets.FullRecord}, 1},
Names::Tuple,
required_columns
) -> Tuple{Vector{Symbol}, Tuple}
Helper function that finds the names of user-defined point fields that have been requested by a user and group them together if they form arrays in the output data. Note according to spec that user-defined array field names must be of the form col [0], col[1], ..., col[N]
where N
is the dimension of the user field
LASDatasets.get_vlrs
— Methodget_vlrs(las::LASDataset) -> Vector{LasVariableLengthRecord}
Extract the set of Variable Length Records from a LASDataset
las
LASDatasets.global_encoding
— Methodglobal_encoding(h::LasHeader) -> UInt16
Get the global properties bit vector from a header h
LASDatasets.group_user_fields
— Methodgroup_user_fields(
raw_user_data::Dict{Symbol, Vector},
user_field_map::Dict{Symbol, Vector{Symbol}}
) -> Tuple
Helper function that groups raw user field data into either a vector of scalars or vector of vectors
Arguments
raw_user_data
: Maps the raw user field names (as they appear in the Extra Bytes VLRs, e.g. "col" for scalar or "col [n]" for entry in array) to their data in each point recorduser_field_map
: Maps each user field base name to the collection of raw user field names composing it
LASDatasets.header_size
— Methodheader_size(h::LasHeader) -> Int64
Get the size of a header h
in bytes
LASDatasets.is_external_waveform
— Methodis_external_waveform(header::LasHeader) -> Bool
Returns whether a LAS file with header header
has waveform data in an external file
LASDatasets.is_internal_waveform
— Methodis_internal_waveform(header::LasHeader) -> Bool
Returns whether a LAS file with header header
has waveform data stored in the LAS file
LASDatasets.is_srs
— MethodTest whether a vlr is a GeoKeyDirectoryTag, GeoDoubleParamsTag or GeoAsciiParamsTag
LASDatasets.is_standard_gps
— MethodIf true, GPS Time is standard GPS Time (satellite GPS Time) minus 1e9. If false, GPS Time is GPS Week Time.
Note that not all software sets this encoding correctly.
LASDatasets.is_wkt
— MethodCheck if the projection information is in WKT format (true) or GeoTIFF (false)
LASDatasets.key_point
— MethodIf true, this point is considered to be a model key-point.
LASDatasets.las_record
— Methodlas_record(
::Type{TPoint<:LasPoint},
p::NamedTuple,
xyz::SpatialInfo,
undoc_bytes::StaticArraysCore.SArray{Tuple{N}, UInt8, 1, N}
) -> Union{LASDatasets.PointRecord, LASDatasets.UndocPointRecord}
las_record(
::Type{TPoint<:LasPoint},
p::NamedTuple,
xyz::SpatialInfo,
undoc_bytes::StaticArraysCore.SArray{Tuple{N}, UInt8, 1, N},
user_fields
) -> Union{LASDatasets.ExtendedPointRecord, LASDatasets.FullRecord, LASDatasets.PointRecord, LASDatasets.UndocPointRecord}
Construct a LAS record for a point in a tabular point cloud
Arguments
TPoint
: Type of the LAS point to construct from this point datap
: Point entry in a tabular point cloudxyz
: Spatial information about scaling, offsets and bounding ranges of the point clouduser_fields
: Tuple of user-defined fields to append to the point record (empty if not using). Note: these must match what's in your pointp
. Default()
LASDatasets.las_version
— Methodlas_version(h::LasHeader) -> VersionNumber
Get the LAS specification version from a header h
LASDatasets.laspoint
— FunctionA convenience function that creates a LasPoint from a given struct and some spatial information
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:7
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:197
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:228
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:260
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:295
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:332
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:376
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:447
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:481
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:521
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:563
.
laspoint(_, p, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/parse_points.jl:611
.
LASDatasets.lasversion_for_point
— FunctionGet the LAS spec version that matches the point type T
LASDatasets.load_header
— Methodload_header(file_name::AbstractString) -> LasHeader
Ingest a LAS header from a file
LASDatasets.load_las
— Methodload_las(file_name::AbstractString; ...) -> LASDataset
load_las(
file_name::AbstractString,
fields;
kwargs...
) -> LASDataset
Load a LAS dataset from a source file
Arguments
file_name
: Name of the LAS file to extract data fromfields
: Name of the LAS point fields to extract as columns in the output data. If set tonothing
, ingest all available columns. DefaultDEFAULT_LAS_COLUMNS
LASDatasets.load_pointcloud
— Functionload_pointcloud(
file_name::AbstractString;
...
) -> TypedTables.FlexTable
load_pointcloud(
file_name::AbstractString,
fields::Union{Nothing, AbstractVector{Symbol}};
kwargs...
) -> TypedTables.FlexTable
Ingest LAS point data in a tabular format
LASDatasets.load_vlrs
— Methodload_vlrs(
file_name::AbstractString,
header::LasHeader
) -> Any
Ingest a set of variable length records from a LAS file
load_vlrs(file_name, header)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/read.jl:57
.
LASDatasets.make_consistent_header!
— Methodmake_consistent_header!(
header::LasHeader,
pointcloud::AbstractVector{<:NamedTuple},
vlrs::Vector{<:LasVariableLengthRecord},
evlrs::Vector{<:LasVariableLengthRecord},
user_defined_bytes::Vector{UInt8}
)
Ensure that a LAS header
is consistent with a given pointcloud
data coupled with sets of vlrs
, evlrs
and user_defined_bytes
LASDatasets.make_consistent_header
— Methodmake_consistent_header(
pointcloud::AbstractVector{<:NamedTuple},
point_format::Type{TPoint<:LasPoint},
vlrs::Vector{<:LasVariableLengthRecord},
evlrs::Vector{<:LasVariableLengthRecord},
user_defined_bytes::Vector{UInt8},
scale::Union{Real, AxisInfo, StaticArraysCore.SVector{3, <:Real}}
) -> LasHeader
Construct a LAS header that is consistent with a given pointcloud
data in a specific LAS point_format
, coupled with sets of vlrs
, evlrs
and user_defined_bytes
LASDatasets.make_table
— Methodmake_table(
records::Array{LASDatasets.PointRecord{TPoint<:LasPoint}, 1},
required_columns,
xyz::SpatialInfo
) -> TypedTables.Table{_A, _B, NamedTuple{names, T}} where {_A<:NamedTuple, _B, names, T<:Tuple{Vararg{AbstractArray{<:Any, _B}}}}
Convert a collection of LAS point records into a Table
with the desired columns
Arguments
records
: A collection ofLasRecord
s that have been read from a LAS filerequired_columns
: Set of columns to include in the table being constructedxyz
: Spatial information used to apply scaling/offset factors to point positions
make_table(records, required_columns, xyz)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/read.jl:143
.
LASDatasets.merge_column!
— Methodmerge_column!(
las::LASDataset,
column::Symbol,
values::AbstractVector
) -> Any
Merge a column with name column
and a set of values
into a las
dataset
LASDatasets.name
— Methodname(e::ExtraBytes) -> String
Get the name of an additional user field that's documented by an extra bytes record e
LASDatasets.num_return_channels
— Methodnum_return_channels(h::LasHeader) -> Int64
Get the number of return channels in a LAS file from a header h
LASDatasets.number_of_evlrs
— Methodnumber_of_evlrs(h::LasHeader) -> Int64
Get the number of Extended Variable Length Records in a LAS file from a header h
LASDatasets.number_of_points
— Methodnumber_of_points(h::LasHeader) -> Int64
Get the number of points in a LAS file from a header h
LASDatasets.number_of_returns
— MethodThe total number of returns for a given pulse.
LASDatasets.number_of_vlrs
— Methodnumber_of_vlrs(h::LasHeader) -> Int64
Get the number of Variable Length Records in a LAS file from a header h
LASDatasets.official_record_ids
— Methodofficial_record_ids(_::Type{TData}) -> Any
The registered record IDs associated to VLRs of this record type TData
LASDatasets.official_user_id
— Methodofficial_user_id(_::Type{TData}) -> String
The registered user ID associated to VLRs of this record type TData
. Currently assuming one user ID per data type
LASDatasets.overlap
— MethodIf true, this point is classified as an overlapping point with another data set
LASDatasets.point_data_offset
— Methodpoint_data_offset(h::LasHeader) -> Int64
Get the offset to the first point record in a LAS file specified by a header h
LASDatasets.point_format
— Methodpoint_format(header::LasHeader) -> Any
Get the LAS point format from a header header
LASDatasets.point_record_length
— Methodpoint_record_length(h::LasHeader) -> Int64
Get the number of bytes assigned to each point record in a LAS file specified by a header h
LASDatasets.raw_classification
— MethodRaw classification byte in LAS1.1-1.3, as represented in the point data, is built up from components
LASDatasets.read_final_fields
— Methodread_final_fields(
io::IO,
las_version::VersionNumber,
is_at_least_v14::Bool
) -> Tuple{Any, Tuple{Vararg{UInt32}}, SpatialInfo, Any, Any, Any, Any, Tuple{Vararg{UInt64}}}
Helper function that reads the last few fields (from legacy record count to point return count) of a LAS header from an io
LASDatasets.read_las_data
— Methodread_las_data(io; ...) -> LASDataset
read_las_data(
io::IO,
required_columns;
convert_to_metres,
convert_x_y_units,
convert_z_units
) -> LASDataset
Read LAS data from an IO source
Arguments
io
: IO Channel to read the data in fromrequired_columns
: Point record fields to extract as columns in the output data, defaultDEFAULT_LAS_COLUMNS
Keyword Arguments
convrt_to_metres
: Flag indicating that point coordinates will be converted to metres upon reading, default trueconvert_x_y_units
: Name of the units used to measure point coordinates in the LAS file that will be converted to metres when ingested. Set tomissing
for no conversion (defaultmissing
)convert_z_units
: Name of the units on the z-axis in the LAS file that will be converted to metres when ingested. Set tomissing
for no conversion (defaultmissing
)
LASDatasets.read_vlr_data
— Methodread_vlr_data(
io::IO,
_::Type{TData},
nb::Integer
) -> GeoDoubleParamsTag
Read data of type TData
that belongs to a VLR by readig nb
bytes from an io
. By default this will call Base.read
, but for more specific read methods this will need to be overloaded for your type
LASDatasets.readstring
— Methodreadstring(io, nb::Integer) -> Any
Read a string from nb
bytes from an IO channel io
LASDatasets.record_format
— Functionrecord_format(header::LasHeader) -> Type
record_format(
header::LasHeader,
extra_bytes::Vector{<:ExtraBytes}
) -> Type
Get the appropriate LAS record format for a LAS header
and a (possibly empty) set of extra_bytes
that document any optional user fields to include
LASDatasets.remove_points!
— Methodremove_points!(
las::LASDataset,
idxs::Union{AbstractUnitRange, AbstractVector{<:Integer}}
)
Remove a set of points stored at indices idxs
from a las
dataset. Updates header information to ensure consistency
LASDatasets.remove_vlr!
— Methodremove_vlr!(
las::LASDataset,
vlr::LasVariableLengthRecord
) -> Union{Nothing, Int64}
Remove a vlr
from set of VLRs in a LAS dataset las
. Note that this will modify the header content of las
LASDatasets.save_las
— Methodsave_las(
file_name::AbstractString,
pointcloud::AbstractVector{<:NamedTuple};
vlrs,
evlrs,
user_defined_bytes,
scale,
kwargs...
)
Saves a pointcloud to LAS or LAZ. The appropriate LAS version and point format is inferred from the contents of your point cloud
Arguments
file_name
: Name of the LAS file to save the data intopointcloud
: Point cloud data in a tabular format
Keyword Arguments
vlrs
: Collection of Variable Length Records to write to the LAS file, defaultLasVariableLengthRecord[]
evlrs
: Collection of Extended Variable Length Records to write to the LAS file, defaultLasVariableLengthRecord[]
user_defined_bytes
: Any user-defined bytes to write in between the VLRs and point records, defaultUInt8[]
scale
: Scaling factor applied to points on writing, defaultLASDatasets.POINT_SCALE
save_las(
file_name,
pointcloud;
vlrs,
evlrs,
user_defined_bytes,
scale,
kwargs...
)
defined at /home/runner/work/LASDatasets.jl/LASDatasets.jl/src/write.jl:18
.
LASDatasets.scale
— Methodscale(h::LasHeader, axis::Symbol) -> Float64
Get the scale for point positions in a LAS file from a header h
along an axis
(x, y or z)
LASDatasets.scale
— Methodscale(h::LasHeader) -> AxisInfo{Float64}
Get the scale for point positions in a LAS file from a header h
along all axes
LASDatasets.scan_angle
— MethodAngle at which the laser point was output, including the roll of the aircraft.
LASDatasets.scan_direction
— MethodIf true, the scanner mirror was traveling from left to right at the time of the output pulse.
LASDatasets.set_evlr_start!
— Methodset_evlr_start!(header, offset::Integer) -> Integer
Set the offset (in bytes) into the LAS file where the first EVLR occurs
LASDatasets.set_gps_standard_time_bit!
— Methodset_gps_standard_time_bit!(header::LasHeader) -> UInt16
Sets the bit flag indicating that the header header
is in GPS standard time
LASDatasets.set_gps_week_time_bit!
— Methodset_gps_week_time_bit!(header::LasHeader) -> UInt16
Sets the bit flag indicating that the header header
is in GPS week time
LASDatasets.set_las_version!
— Methodset_las_version!(h::LasHeader, v::VersionNumber)
Set the LAS specification version in a header h
to version v
LASDatasets.set_num_evlr!
— Methodset_num_evlr!(header::LasHeader, n::Integer) -> UInt64
Set the number of Extended Variable Length Records in a LAS file with a header header
LASDatasets.set_num_vlr!
— Methodset_num_vlr!(header::LasHeader, n::Integer) -> UInt64
Set the number of Variable Length Records in a LAS file with a header header
LASDatasets.set_number_of_points_by_return!
— Methodset_number_of_points_by_return!(
header::LasHeader,
points_per_return::NTuple{N, Integer}
)
Set the number of points per return for a header header
to the values points_per_return
LASDatasets.set_point_data_offset!
— Methodset_point_data_offset!(
header::LasHeader,
offset::Integer
) -> UInt32
Set offset to the first point record in a LAS file with a header header
LASDatasets.set_point_format!
— Methodset_point_format!(h::LasHeader, _::Type{TPoint<:LasPoint})
Set the point format in a header h
to a new value, TPoint
LASDatasets.set_point_record_count!
— Methodset_point_record_count!(
header::LasHeader,
num_points::Integer
)
Set the number of points in a LAS file with a header header
LASDatasets.set_point_record_length!
— Methodset_point_record_length!(
header::LasHeader,
length::Integer
) -> UInt16
Set the number of bytes associated to each point record in a LAS file with a header header
LASDatasets.set_spatial_info!
— Methodset_spatial_info!(
header::LasHeader,
info::SpatialInfo
) -> SpatialInfo
Set the spatial information associated to points in a LAS file with a header header
LASDatasets.set_superseded!
— Methodset_superseded!(
las::LASDataset,
vlr::LasVariableLengthRecord
) -> UInt16
Mark a VLR vlr
as superseded in a dataset las
LASDatasets.set_superseded!
— Methodset_superseded!(vlr::LasVariableLengthRecord) -> UInt16
Mark a VLR as "superseded", meaning it has been replaced by a newer record when modifying the LAS file. Note: The LAS spec only allows for 1 superseded record per LAS file
LASDatasets.set_synthetic_return_numbers_bit!
— Methodset_synthetic_return_numbers_bit!(
header::LasHeader
) -> UInt16
Sets the bit flag indicating that the header header
has synthetically-generated return numbers
LASDatasets.set_waveform_external_bit!
— Methodset_waveform_external_bit!(header::LasHeader) -> UInt16
Sets the bit flag indicating that the header header
has external waveform records
LASDatasets.set_waveform_internal_bit!
— Methodset_waveform_internal_bit!(header::LasHeader) -> UInt16
Sets the bit flag indicating that the header header
has internal waveform records
LASDatasets.set_wkt_bit!
— Methodset_wkt_bit!(header::LasHeader) -> UInt16
Sets the bit flag indicating that the LAS file with header header
has its coordinate reference system set as a WKT
LASDatasets.software_id
— Methodsoftware_id(h::LasHeader) -> String
Get the software ID from a header h
LASDatasets.spatial_info
— Methodspatial_info(h::LasHeader) -> SpatialInfo
Get the spatial information for point positions in a LAS file from a header h
. This includes the offsets/scale factors applied to points and bounding box information
LASDatasets.split_column_name
— Methodsplit_column_name(col::Symbol, dim::Integer) -> Any
Helper function that returns a list of extra bytes VLR field names for each entry in a user-defined array with column name col
and dimension dim
LASDatasets.synthetic
— MethodIf true, the point was not created from lidar collection
LASDatasets.system_id
— Methodsystem_id(h::LasHeader) -> String
Get the system ID from a header h
LASDatasets.units_to_conversion
— Functionunits_to_conversion(
unit::Union{Missing, String}
) -> Union{Missing, StaticArraysCore.SVector{3, Float64}}
units_to_conversion(
unit::Union{Missing, String},
v_unit::Union{Missing, String}
) -> Missing
Parse the specified units into a conversion vector.
LASDatasets.unset_synthetic_return_numbers_bit!
— Methodunset_synthetic_return_numbers_bit!(
header::LasHeader
) -> UInt16
Sets the bit flag indicating that the header header
does not have synthetically-generated return numbers
LASDatasets.unset_waveform_bits!
— Methodunset_waveform_bits!(header::LasHeader) -> UInt16
Unset all bit flags in a header
to do with waveform information
LASDatasets.unset_wkt_bit!
— Methodunset_wkt_bit!(header::LasHeader) -> UInt16
Sets the bit flag indicating that the LAS file with header header
doesn't have its coordinate reference system set as a WKT
LASDatasets.update_evlr_offset!
— Methodupdate_evlr_offset!(header::LasHeader) -> Int64
Update the offset (in Bytes) to the first EVLR in a LASDataset
las
LASDatasets.waveform_record_start
— Methodwaveform_record_start(header::LasHeader) -> UInt64
Get the offset in bytes to the first waveform record for a LAS file with header header
LASDatasets.withheld
— MethodIf true, this point should not be included in processing
LASDatasets.write_las
— Methodwrite_las(
io::IO,
pointcloud::AbstractVector{<:NamedTuple},
point_format::Type{TPoint},
vlrs::Vector{<:LasVariableLengthRecord},
evlrs::Vector{<:LasVariableLengthRecord},
user_defined_bytes::Vector{UInt8},
scale::Real
)
Write a pointcloud and additional VLR's and user-defined bytes to an IO stream in a LAS format
Arguments
io
: IO channel to write the data topointcloud
: Pointcloud data in a tabular format to writevlrs
: Collection of Variable Length Records to write toio
evlrs
: Collection of Extended Variable Length Records to write toio
user_defined_bytes
: Any user-defined bytes to write in between the VLRs and point recordsscale
: Scaling factor applied to points on writing
LASDatasets.write_vlr_data
— Methodwrite_vlr_data(io::IO, data) -> Any
Write data of type TData
that belongs to a VLR to an io
. By default this will call Base.write
, but for more specific write methods this will need to be overloaded for your type
LASDatasets.writestring
— Methodwritestring(io, str::AbstractString, nb::Integer) -> Any
Write a string str
to an IO channel io
, writing exactly nb
bytes (padding if str
is too short)
LASDatasets.xcoord
— MethodX coordinate (Float64), apply scale and offset according to the header
LASDatasets.xcoord
— MethodX value (Int32), as represented in the point data, reversing the offset and scale from the header
LASDatasets.ycoord
— MethodY coordinate (Float64), apply scale and offset according to the header
LASDatasets.ycoord
— MethodY value (Int32), as represented in the point data, reversing the offset and scale from the header
LASDatasets.zcoord
— MethodZ coordinate (Float64), apply scale and offset according to the header
LASDatasets.zcoord
— MethodZ value (Int32), as represented in the point data, reversing the offset and scale from the header
LASDatasets.@register_vlr_type
— MacroRegister a new VLR data type type
by associating it with an official user_id
and set of record_ids