主要内容

vertcrs

R2026b

Vertical coordinate reference system object

Since R2026b

Description

A vertical coordinate reference system (CRS) provides information that assigns height values or z-coordinates to physical locations. Vertical CRSs consist of a datum, an axis direction, and a linear unit of measurement.

Geographic and projected CRS objects use vertical CRS objects to represent the 3-D part of compound CRSs and 3-D geographic CRSs. For more information about geographic CRS objects, see geocrs. For more information about projected CRS objects, see projcrs.

Creation

You can get a vertical CRS object in these ways:

  • Query the VerticalCRS property of a projcrs or geocrs object. For example, import data by using the readgeoraster or readgeotable function, and then query the VerticalCRS property of the CRS object that is associated with the imported data.

  • Use the vertcrs function (described here).

Description

v = vertcrs(code) creates a vertical CRS object using the EPSG code specified by code.

example

v = vertcrs(code,Authority=authority) creates a vertical CRS object using the specified code and authority.

v = vertcrs(wkt) creates a vertical CRS object using a specified well-known text (WKT) string representation.

Input Arguments

expand all

Vertical CRS code, specified as a positive integer, string scalar, or character vector. By default, the vertcrs function assumes the code argument refers to an EPSG code. To specify other types of codes, use the Authority name-value argument.

To refer to an EPSG or ESRI code, specify this argument as a positive integer. To refer to an IGNF code, specify this argument as a string scalar or character vector.

For information about valid EPSG, ESRI, and IGNF codes, see the Spatial Reference home page.

Organization that manages the definition of the CRS, specified as "EPSG", "ESRI", or "IGNF". Each organization maintains a list of codes associated with specific CRSs.

If you do not specify an authority, then the vertcrs function uses "EPSG".

Well-known text (WKT), specified as a string scalar or character vector. You can use well-known text in either the WKT 1 or WKT 2 standard.

Properties

expand all

This property is read-only.

CRS name, represented as a string scalar.

Data Types: string

This property is read-only.

Datum name, represented as a string scalar. The datum identifies the reference surface from which to measure heights or depths.

Data Types: string

This property is read-only.

Axis orientation, represented as one of these values:

  • "up" — Positive values represent heights above the datum.

  • "down" — Positive values represent depths below the datum.

Data Types: string

This property is read-only.

Length unit, represented as a string scalar. Possible values include "meter" and "U.S. survey foot".

Data Types: string

Object Functions

wktstringWell-known text string
isequalCompare projcrs, geocrs, or vertcrs objects for equivalence

Examples

collapse all

Create a vertical CRS object by specifying an EPSG code.

vcrs = vertcrs(3855)
vcrs = 
  vertcrs with properties:

          Name: "EGM2008 height"
         Datum: "EGM2008 geoid"
     Direction: "up"
    LengthUnit: "meter"

Read elevation data [1] into the workspace as an array and a geographic reference object. Get the vertical CRS by querying the VerticalCRS property of the geographic CRS that is stored in the reference object.

[Z,R] = readgeoraster("n39_w106_3arc_v2.dt1");
vcrs = R.GeographicCRS.VerticalCRS
vcrs = 
  vertcrs with properties:

          Name: "EGM96 height"
         Datum: "EGM96 geoid"
     Direction: "up"
    LengthUnit: "meter"

[1] The elevation data used in this example is from the US Geological Survey.

Version History

Introduced in R2026b

See Also

Objects