readVLR
Read variable length record from LAS or LAZ file
Description
Examples
Read VLR Data from LAZ File
Create a lasFileReader
object for a LAZ file. Then, use the readVLR
function to read variable length record (VLR) data from the LAZ file.
Create a lasFileReader
object to access the LAZ file data.
path = fullfile(toolboxdir("lidar"),"lidardata", ... "las","aerialLidarData.laz"); lasReader = lasFileReader(path);
Read VLR data from the LAZ file using the readVLR
function.
vlr = readVLR(lasReader,2112);
Display the VLR data.
disp(vlr)
RecordID: 2112 UserID: 'liblas' Description: 'OGR variant of OpenGIS WKT SRS' Data: 'COMPD_CS["NAD83 / UTM zone 16N + VERT_CS",PROJCS["NAD83 / UTM zone 16N",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26916"],AXIS["Easting",EAST],AXIS["Northing",NORTH]],VERT_CS["NAVD88 height",VERT_DATUM["North American Vertical Datum 1988",2005,AUTHORITY["EPSG","5103"],EXTENSION["PROJ4_GRIDS","g2003conus.gtx,g2003alaska.gtx,g2003h01.gtx,g2003p01.gtx"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Up",UP],AUTHORITY["EPSG","5703"]]]'
Input Arguments
lasReader
— LAS or LAZ file reader
lasFileReader
object
LAS or LAZ file reader, specified as a lasFileReader
object.
recordID
— Record ID
positive integer
Record ID, specified as a positive integer.
Output Arguments
vlr
— Variable length record
structure
Variable length record, returned as a structure. The structure contains these fields:
RecordID
— Record ID of the VLR, returned as a positive integer.UserID
— User ID that created the VLR, returned as a string scalar.Description
— Text description of the VLR, returned as a string scalar.
The structure also contains the VLR data, either as raw byte values or in a form determined by the record ID of the VLR, in one of these fields. For more information on the VLR header, or the various types of records, see the ASPRS LASER (LAS) File Format Exchange Activities page.
RawByteData
— Raw bytes of data stored in the VLR, returned as an integer vector. The length of the vector is equal to the Record Length After Header value in the corresponding VLR header.Data
— Parsed data for standard VLR records. The value of this field depends on the contents of the VLR and corresponds to its record ID. These are the values for the record IDs that return aData
field:Record ID Description 0 Data of the Classification Lookup record, returned as a character vector or string scalar.
3 ASCII data of the Text Area Description record, returned as a character vector or string scalar.
100-354 Data of the Waveform Packet Descriptor record, returned as a structure containing these fields:
BitsPerSample
— Number of bits for each sample in the range 2 to 32 bits.CompressionType
— Compression algorithm for waveform packets. Value 0 represents no compression. Reserved for future use.NumberOfSamples
— Number of samples in decompressed waveform packet.TemporalSpacing
— Temporal sample spacing in picoseconds.DigitizerGain
— Digitizer gain to use to convert raw digitized value to an absolute digitizer voltage.DigitizerOffset
— Digitizer offset to use to convert raw digitized value to an absolute digitizer voltage.
2111 ASCII data of the OGS Math Transform WKT record, returned as a character vector or string scalar.
2112 ASCII data of the OGS Coordinate System WKT record, returned as a character vector or string scalar.
34735 GeoTiff key values of the GeoKeyDirectoryTag record, returned as a structure containing these fields:
KeyDirectoryVersion
— Key directory version number, returned as 1.KeyRevision
— Key revision number, returned as 1.MinorRevision
— Minor revision number, returned as 0.NumberOfKeys
— Number of keys, returned as a scalar.KeyEntries
— Structure for each key containing these fields:KeyID
— Key ID for each GeoTIFF data.TIFFTagLocation
— Location of the data for the specified key ID.Count
— Number of characters in GeoAsciiParamsTag string value. Otherwise it returns 1.ValueOffset
— Value depends on theTIFFTagLocation
field.
34736 Data of the GeoDoubleParamsTag record, returned as a numeric vector of type double
.34737 ASCII data of the GeoAsciiParamsTag record, returned as a character vector or string scalar.
Data Types: struct
Version History
See Also
Functions
Objects
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)