projcrs

Projected coordinate reference system

Description

A projected coordinate reference system (CRS) provides information that assigns Cartesian x and y map coordinates to physical locations. Projected CRSs consist of a geographic CRS and several parameters that are used to transform coordinates to and from the geographic CRS. For more information about geographic CRSs, see geocrs.

Creation

There are several ways to create projected CRS objects, including:

  • Import raster data by using readgeoraster, and then query the ProjectedCRS property of the returned raster reference object.

  • Get information about a shapefile by using the shapeinfo function, and then query the CoordinateReferenceSystem field of the returned structure.

  • Use the projcrs function (described here).

Description

example

p = projcrs(code) creates a projected CRS object using the EPSG code specified by code.

example

p = projcrs(code,'Authority',authority) creates a projected CRS object using the specified code and authority.

example

p = projcrs(wkt) creates a projected CRS object using the well-known text (WKT) string representation specified by wkt.

Input Arguments

expand all

Projected CRS code, specified as a positive integer, string scalar, or character vector. By default, the projcrs function assumes the code argument is an EPSG code. To specify other types of codes, use the 'Authority' name-value pair.

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

For information on valid EPSG codes, see the EPSG home page.

Authority, specified as 'EPSG', 'ESRI', or 'IGNF'. This argument specifies which authority the projcrs function uses to determine the properties of the created projected CRS object. If you do not specify an authority, then the projcrs function uses 'EPSG'.

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

The parameters listed in the ProjectionParameters property use the WKT 2 standard, even if the argument uses the WKT 1 standard.

Properties

expand all

This property is read-only.

CRS name, returned as a string scalar.

Data Types: string

This property is read-only.

Geographic CRS, returned as a geocrs object. A geographic CRS consists of a datum (including its ellipsoid), prime meridian, and angular unit of measurement.

This property is read-only.

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

Data Types: string

This property is read-only.

Projection method, returned as a string scalar. Possible values include "Lambert Conic Conformal (2SP)" and "Transverse Mercator".

Data Types: string

This property is read-only.

Projection parameters, returned as a ProjectionParameters object. The parameters in a ProjectionParameters object use the WKT 2 standard, even if the supplied wkt argument uses the WKT 1 standard.

You can query individual projection parameters using dot notation. For example, create a projcrs object and access the LatitudeOfFalseOrigin parameter.

p = projcrs(26986);
p.ProjectionParameters.LatitudeOfFalseOrigin

This table describes common projection parameters, including those used by the Lambert Conformal Conic and Transverse Mercator projection methods. Different projections may have parameters other than the ones listed here.

ParameterDescription
EastingAtFalseOrigin

Easting at the false origin, returned as a number in the units specified by LengthUnit. A projected CRS often uses a false origin such that all coordinates within the CRS have positive values. The easting at the false origin is with respect to the grid origin at (0, 0).

FalseEasting

False easting, returned as a number in the units specified by LengthUnit. A projected CRS often uses a false easting to shift the y-axis of the map grid so that the x-coordinates have positive values.

FalseNorthing

False northing, returned as a number in the units specified by LengthUnit. A projected CRS often uses a false northing to shift the x-axis of the map grid so that the y-coordinates have positive values.

LatitudeOf1stStandardParallel

Latitude of the first standard parallel, returned as a number. Units are typically in degrees. Standard parallels are the parallels at which the cone or cylinder used in a conic or cylindrical projection intersects the reference spheroid.

LatitudeOf2ndStandardParallel

Latitude of the second standard parallel, returned as a number. Units are typically in degrees. Standard parallels are the parallels at which the cone or cylinder used in a conic or cylindrical projection intersects the reference spheroid.

LatitudeOfFalseOrigin

Latitude of false origin, returned as a number. A projected CRS typically uses a false origin such that all coordinates within the CRS have positive values.

LatitudeOfNaturalOrigin

Latitude of the natural origin, returned as a number. Units are typically in degrees. The natural origin is the grid origin without the shift by a false northing or easting.

LongitudeOfFalseOrigin

Longitude of false origin, returned as a number. A projected CRS typically uses a false origin such that all coordinates within the CRS have positive values.

LongitudeOfNaturalOrigin

Longitude of the natural origin, returned as a number. Units are typically in degrees. The natural origin is the grid origin without the shift by a false northing or easting.

NorthingAtFalseOrigin

Northing at the false origin, returned as a number in the units specified by LengthUnit. A projected CRS typically uses a false origin such that all coordinates within the CRS have positive values. The northing at the false origin is with respect to the grid origin at (0, 0).

ScaleFactorAtNaturalOrigin

Scale factor at natural origin, returned as a number with no units. The natural origin is the grid origin without the shift by a false northing or easting. A projected CRS typically uses a scale factor (a number close to 1) to balance out scale distortion across the area covered by the coordinate system.

Object Functions

projfwdProject latitude-longitude coordinates to x-y map coordinates
projinvUnproject x-y map coordinates to latitude-longitude coordinates
wktstringWell-known text string

Examples

collapse all

Create a projected CRS object by specifying an EPSG code.

p = projcrs(5325)
p = 
  projcrs with properties:

                    Name: "ISN2004 / Lambert 2004"
           GeographicCRS: [1x1 geocrs]
        ProjectionMethod: "Lambert Conic Conformal (2SP)"
              LengthUnit: "meter"
    ProjectionParameters: [1x1 map.crs.ProjectionParameters]

Create a projected CRS object from an ESRI code by using the 'Authority' name-value pair.

p = projcrs(53026,'Authority','ESRI')
p = 
  projcrs with properties:

                    Name: "Sphere_Stereographic"
           GeographicCRS: [1x1 geocrs]
        ProjectionMethod: "Stereographic"
              LengthUnit: "meter"
    ProjectionParameters: [1x1 map.crs.ProjectionParameters]

Create a projected CRS object from an IGNF code by using the 'Authority' name-value pair. Specify the code using a string or character vector.

p = projcrs('UTM39SW84','Authority','IGNF')
p = 
  projcrs with properties:

                    Name: "WGS84 UTM SUD FUSEAU 39"
           GeographicCRS: [1x1 geocrs]
        ProjectionMethod: "Transverse Mercator"
              LengthUnit: "meter"
    ProjectionParameters: [1x1 map.crs.ProjectionParameters]

Import a WKT projection file as a character vector by using the fileread function. Then create a projected CRS object by specifying the vector.

wkt = fileread('MtWashington-ft.prj');
p = projcrs(wkt)
p = 
  projcrs with properties:

                    Name: "UTM Zone 19, Northern Hemisphere"
           GeographicCRS: [1x1 geocrs]
        ProjectionMethod: "Transverse Mercator"
              LengthUnit: "meter"
    ProjectionParameters: [1x1 map.crs.ProjectionParameters]

Import raster data as an array and a map reference object using the readgeoraster function. Then, get the projected CRS by querying the ProjectedCRS property of the reference object.

[Z,R] = readgeoraster('boston.tif');
R.ProjectedCRS
ans = 
  projcrs with properties:

                    Name: "NAD83 / Massachusetts Mainland"
           GeographicCRS: [1x1 geocrs]
        ProjectionMethod: "Lambert Conic Conformal (2SP)"
              LengthUnit: "U.S. survey foot"
    ProjectionParameters: [1x1 map.crs.ProjectionParameters]

Alternatively, return information about the same file as a RasterInfo object using the georasterinfo function. Then, get the projected CRS by querying the CoordinateReferenceSystem property of the object.

info = georasterinfo('boston.tif');
info.CoordinateReferenceSystem
ans = 
  projcrs with properties:

                    Name: "NAD83 / Massachusetts Mainland"
           GeographicCRS: [1x1 geocrs]
        ProjectionMethod: "Lambert Conic Conformal (2SP)"
              LengthUnit: "U.S. survey foot"
    ProjectionParameters: [1x1 map.crs.ProjectionParameters]

Get projection parameters for a projected CRS by creating a projcrs object and querying its ProjectionParameters property.

p = projcrs(26986);
parameters = p.ProjectionParameters
parameters = 
  ProjectionParameters object with parameters:

            LatitudeOfFalseOrigin: 41
           LongitudeOfFalseOrigin: -71.5
    LatitudeOf1stStandardParallel: 42.6833333333333
    LatitudeOf2ndStandardParallel: 41.7166666666667
             EastingAtFalseOrigin: 200000
            NorthingAtFalseOrigin: 750000

Query individual projection parameters by using dot notation.

f = parameters.EastingAtFalseOrigin
f = 200000

Tips

Even when the property values of two projcrs objects are the same, the WKT for the objects might be different. As a result, when you compare two projcrs or ProjectionParameters objects by using the isequal function, the function might return 0 (false), even when the property and parameter values are the same. Compare projcrs or ProjectionParameters objects by directly comparing their property and parameter values instead.

See Also

Functions

Objects

External Websites

Introduced in R2020b