Main Content

readCRS

Read coordinate reference system data from E57 file

Since R2023a

    Description

    example

    crs = readCRS(e57Reader) reads the coordinate reference system data from the E57 file specified by the e57FileReader object e57Reader.

    This function requires Mapping Toolbox™.

    Examples

    collapse all

    Download a ZIP file containing an E57 file, and then unzip the file.

    zipFile = matlab.internal.examples.downloadSupportFile("lidar","data/e57ParkingLot.zip");
    saveFolder = fileparts(zipFile);
    e57FileName = [saveFolder filesep 'parkingLot.e57'];
    if ~exist(e57FileName,"file")
        unzip(zipFile,saveFolder)
    end

    Create an e57FileReader object using the downloaded E57 file.

    e57Reader = e57FileReader(e57FileName);

    Check for CRS data in the E57 file by using the hasCRSData function. If the file contains CRS data, read the CRS data by using the readCRS function.

    if hasCRSData(e57Reader)
        crs = readCRS(e57Reader);
        disp(crs)
    else
        disp("No CRS data available.")
    end
    No CRS data available.
    

    Input Arguments

    collapse all

    E57 file reader, specified as an e57FileReader object.

    Output Arguments

    collapse all

    Coordinate reference system (CRS), returned as a projcrs (Mapping Toolbox) object.

    Version History

    Introduced in R2023a