Main Content

hasGPSData

Check if LAS or LAZ file has GPS data

Since R2022a

Description

example

flag = hasGPSData(lasReader) returns a logical 1 (true) if the specified LAS or LAZ file lasReader contains a GPS data. Otherwise, it returns a logical 0 (false).

Examples

collapse all

Create a lasFileReader object for a LAZ file. Then, use the hasGPSData function to check if the LAZ file contains GPS 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 GPS data in the LAZ file by using the hasGPSData function.

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

Input Arguments

collapse all

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

Version History

Introduced in R2022a