MapPostingsReference

Reference raster postings to map coordinates

Description

A map postings raster reference object encapsulates the relationship between a planar map coordinate system and a system of intrinsic coordinates anchored to the columns and rows of a 2-D spatially referenced grid of point samples (or “postings”).

Typically, the raster is sampled regularly in the planar world x- and world y-coordinates of the map system, such that the intrinsic x and world xaxes align and the intrinsic y and world y axes align. When this is true, the relationship between the two systems is rectilinear. More generally, and much more rarely, their relationship is affine. The affine relationship allows for a possible rotation (and skew). In either case, rectilinear or affine, the sample spacing from row to row need not equal the sample spacing from column to column. For more information about coordinate systems, see Intrinsic Coordinate System.

Creation

You can use any of the following functions to create a MapPostingsReference object to reference a regular raster of posted samples to planar (map) coordinates.

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

R = maprefpostings()
R = 

  MapPostingsReference with properties:

             XWorldLimits: [0.5 2.5]
             YWorldLimits: [0.5 2.5]
               RasterSize: [2 2]
     RasterInterpretation: 'postings'
         ColumnsStartFrom: 'south'
            RowsStartFrom: 'west'
    SampleSpacingInWorldX: 2
    SampleSpacingInWorldY: 2
     RasterExtentInWorldX: 2
     RasterExtentInWorldY: 2
         XIntrinsicLimits: [1 2]
         YIntrinsicLimits: [1 2]
       TransformationType: 'rectilinear'
     CoordinateSystemType: 'planar'

Properties

expand all

Limits of raster in world x-coordinates, specified as a two-element row vector of the form [xMin xMax].

The value of the ProjectedCRS property determines the length units for the raster. This code shows how to find the length units for a raster associated with the map postings reference object R.

R.ProjectedCRS.LengthUnit

Example: [207000 209000]

Data Types: double

Limits of raster in world y-coordinates, specified as a two-element row vector of the form [yMin yMax].

The value of the ProjectedCRS property determines the length units for the raster. This code shows how to find the length units for a raster associated with the map postings reference object R.

R.ProjectedCRS.LengthUnit

Example: [911000 913000]

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. m and n must be positive in all cases and must be 2 or greater.

Example: [200 300]

Data Types: double

Geometric nature of the raster, specified as 'postings'. The value 'postings' indicates that the raster comprises a grid of sample points, where rows or columns of samples run along the edge of the grid. 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 right on an edge (or corner) of the raster.

Cannot be set.

Data Types: char

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

Example: ColumnsStartFrom: 'south'

Data Types: char

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

Example: RowsStartFrom: 'east'

Data Types: char

East-west distance between adjacent postings, specified as a positive numeric scalar. The value is constant throughout the raster.

Example: 2.5

Data Types: double

North-south distance between adjacent postings, specified as a positive numeric scalar. The value is constant throughout the raster.

Example: 2.5

Data Types: double

This property is read-only.

Extent of the full raster or image as measured in the world system in a direction parallel to its rows, specified as a positive numeric scalar. In the case of a rectilinear geometry, which is most typical, this is the horizontal direction (east-west).

Data Types: double

This property is read-only.

Extent of the full raster or image as measured in the world system in a direction parallel to its columns. In the case of a rectilinear geometry, which is most typical, this is the vertical direction (north-south).

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 [1 m], because the RasterInterpretation is 'postings'.

Example: [2 4]

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 with RasterInterpretation equal to 'postings', YIntrinsicLimits equals [1 m].

Data Types: double

This property is read-only.

Type of geometric relationship between the intrinsic coordinate system and the world coordinate system, specified as either 'rectilinear' or 'affine'. Its value is 'rectilinear' when world x depends only on intrinsic x and vice versa, and world y depends only on intrinsic y and vice versa. When the value is 'rectilinear', the image displays without rotation in the world system, although it might be flipped. Otherwise, the value is 'affine'.

Data Types: char

This property is read-only.

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

Data Types: char

Projected coordinate reference system (CRS), specified as a projcrs object. A projected CRS consists of a geographic CRS and several parameters that are used to transform coordinates to and from the geographic CRS.

The value of ProjectedCRS determines the length units for the raster. To find the length units, query the LengthUnit property of the projcrs object.

Object Functions

containsDetermine if geographic or map raster contains points
firstCornerXReturn world x-coordinate of map raster index (1,1)
firstCornerYReturn world y-coordinate of map raster index (1,1)
intrinsicToWorld Transform intrinsic to planar world coordinates
sizesMatchDetermine if geographic or map raster object and image or raster are size-compatible
worldFileMatrixReturn world file parameters for transformation
worldToDiscrete Transform planar world to discrete coordinates
worldToIntrinsicTransform planar world to intrinsic coordinates

More About

expand all

Introduced in R2013b