Main Content

hasCRSData

Check if LAS or LAZ file has CRS data

Since R2022a

Description

flag = hasCRSData(lasReader) returns a logical 1 (true) if the specified LAS or LAZ file lasReader contains a coordinate reference system (CRS) data. Otherwise, it returns a logical 0 (false).

example

Examples

collapse all

Create a lasFileReader object for a LAZ file. Then, use the hasCRSData function to check if the LAZ file contains CRS data to read.

Create a lasFileReader object to access the LAZ file data.

path = fullfile(toolboxdir("lidar"),"lidardata", ...
    "las","aerialLidarData.laz");
lasReader = lasFileReader(path);

Check for CRS data in the LAZ file by using the hasCRSData function.

flag = hasCRSData(lasReader);
disp(flag)
   1

Input Arguments

collapse all

LAS or LAZ file reader, specified as a lasFileReader object.

Version History

Introduced in R2022a