GeographicCellsReference

Reference raster cells to geographic coordinates

Description

A geographic cells raster reference object encapsulates the relationship between a geographic coordinate system and a system of intrinsic coordinates anchored to the columns and rows of a 2-D spatially referenced raster grid or image.

The raster must be sampled regularly in latitude and longitude, and its columns and rows must be aligned with meridians and parallels, respectively. For more information about coordinate systems, see Intrinsic Coordinate System.

Creation

You can use any of the following functions to create a GeographicCellsReference object to reference a regular raster of cells to geographic coordinates.

For example, to construct a geographic raster reference object with default property settings, use this command:

R = georefcells()
R = 

  GeographicCellsReference with properties:

             LatitudeLimits: [0.5 2.5]
            LongitudeLimits: [0.5 2.5]
                 RasterSize: [2 2]
       RasterInterpretation: 'cells'
           ColumnsStartFrom: 'south'
              RowsStartFrom: 'west'
       CellExtentInLatitude: 1
      CellExtentInLongitude: 1
     RasterExtentInLatitude: 2
    RasterExtentInLongitude: 2
           XIntrinsicLimits: [0.5 2.5]
           YIntrinsicLimits: [0.5 2.5]
       CoordinateSystemType: 'geographic'
                  AngleUnit: 'degree'

Properties

expand all

Latitude limits of the geographic quadrangle bounding the georeferenced raster, specified as a two-element vector of the form [southern_limit northern_limit].

Example: [-90 90]

Data Types: double

Longitude limits of the geographic quadrangle bounding the georeferenced raster, specified as a two-element vector of the form [western_limit eastern_limit].

Example: [-100 180]

Data Types: double

Number of rows and columns of the raster or image associated with the referencing object, specified as a two-element vector, [m n], where m represents the number of rows and n the number of columns. For convenience, you can assign a size vector having more than two elements. This enables assignments like R.RasterSize = size(RGB), where RGB is m-by-n-by-3. In cases like this, the object stores only the first two elements of the size vector and ignores the higher (nonspatial) dimensions.

Example: [200 300]

Data Types: double

This property is read-only.

Geometric nature of the raster, specified as 'cells'. The value 'cells' indicates that the raster comprises a grid of quadrangular cells, and is bounded on all sides by cell edges. For an m-by-n raster, points with an intrinsic x-coordinate of 1 or n or an intrinsic y-coordinate of 1 or m fall within the raster, not on its edges.

Data Types: char

Unit of measurement used for angle-valued properties, specified as 'degree'.

Cannot be set.

Data Types: char

Edge from which column indexing starts, specified as 'south' or 'north'.

Example: 'south'

Data Types: char

Edge from which row indexing starts, specified as 'west' or 'east'.

Example: 'east'

Data Types: char

Extent in latitude of individual cells, specified as a positive numeric scalar. Distance, in units of latitude, between the northern and southern limits of a single raster cell. The value is the same for all cells in the raster.

Example: 2.5

Data Types: double

Extent in longitude of individual cells, specified as a positive numeric scalar. Distance, in units of longitude, between the western and eastern limits of a single raster cell. The value is always positive, and is the same for all cells in the raster.

Example: 2.5

Data Types: double

This property is read-only.

Latitude extent ("height") of the quadrangle covered by the raster, specified as a positive numeric scalar.

Example: 2

Data Types: double

This property is read-only.

Longitude extent ("width") of the quadrangle covered by the raster, specified as a positive numeric scalar.

Data Types: double

This property is read-only.

Raster limits in intrinsic x coordinates, specified as a two-element row vector of positive integers, [xMin xMax]. For an m-by-n raster, XIntrinsicLimits equals [0.5, m+0.5], because the RasterInterpretation is 'cells'.

Example: [0.5 2.5]

Data Types: double

This property is read-only.

Raster limits in intrinsic y coordinates, specified as a two-element row vector of positive integers, [yMin yMax]. For an m-by-n raster, YIntrinsicLimits equals [0.5, n+0.5], because the RasterInterpretation is 'cells'.

Data Types: double

This property is read-only.

Type of coordinate system to which the image or raster is referenced, specified as 'geographic'.

Data Types: char

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

Object Functions

containsDetermine if geographic or map raster contains points
geographicToDiscrete Transform geographic to discrete coordinates
geographicToIntrinsic Transform geographic to intrinsic coordinates
intrinsicToGeographic Transform intrinsic to geographic coordinates
intrinsicXToLongitudeConvert from intrinsic x to longitude coordinates
intrinsicYToLatitudeConvert from intrinsic y to latitude coordinates
latitudeToIntrinsicYConvert from latitude to intrinsic y coordinates
longitudeToIntrinsicXConvert from longitude to intrinsic x coordinates
sizesMatchDetermine if geographic or map raster object and image or raster are size-compatible
worldFileMatrixReturn world file parameters for transformation

More About

expand all

Introduced in R2013b