Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

maprefpostings

Reference raster postings to map coordinates

Syntax

R = maprefpostings()
R = maprefpostings(xWorldLimits,yWorldLimits,rasterSize)
R = maprefpostings(xWorldLimits,yWorldLimits,sampleSpacingInWorldX,sampleSpacingInWorldY)
R = maprefpostings(xWorldLimits,yWorldLimits,___, Name,Value)

Description

R = maprefpostings() returns a default referencing object for a raster of regularly posted samples in planar (map) coordinates.

example

R = maprefpostings(xWorldLimits,yWorldLimits,rasterSize) constructs a referencing object for a raster spanning the specified limits in planar coordinates, with the numbers of rows and columns specified by rasterSize.

example

R = maprefpostings(xWorldLimits,yWorldLimits,sampleSpacingInWorldX,sampleSpacingInWorldY) allows the sample spacings to be set precisely. If necessary, maprefpostings adjusts the limits of the raster slightly to ensure an integer number of samples in each dimension.

R = maprefpostings(xWorldLimits,yWorldLimits,___, Name,Value) allows the directions of the columns and rows to be specified via name-value pairs.

Examples

collapse all

Define latitude and longitude limits and dimension of a grid. The example uses postings separated by 1/2 meter, referenced to a planar map coordinate system (the "world" system).

xWorldLimits = [207000 208000];
yWorldLimits = [912500 913000];
rasterSize = [1001 2001]
rasterSize = 

        1001        2001

Create the referencing object specifying the raster size.

R = maprefpostings(xWorldLimits,yWorldLimits,rasterSize)
R = 
  MapPostingsReference with properties:

             XWorldLimits: [207000 208000]
             YWorldLimits: [912500 913000]
               RasterSize: [1001 2001]
     RasterInterpretation: 'postings'
         ColumnsStartFrom: 'south'
            RowsStartFrom: 'west'
    SampleSpacingInWorldX: 1/2
    SampleSpacingInWorldY: 1/2
     RasterExtentInWorldX: 1000
     RasterExtentInWorldY: 500
         XIntrinsicLimits: [1 2001]
         YIntrinsicLimits: [1 1001]
       TransformationType: 'rectilinear'
     CoordinateSystemType: 'planar'


Obtain the same result by specifying the sample spacing.

spacing = 1/2;

R = maprefpostings(xWorldLimits,yWorldLimits,spacing,spacing)
R = 
  MapPostingsReference with properties:

             XWorldLimits: [207000 208000]
             YWorldLimits: [912500 913000]
               RasterSize: [1001 2001]
     RasterInterpretation: 'postings'
         ColumnsStartFrom: 'south'
            RowsStartFrom: 'west'
    SampleSpacingInWorldX: 1/2
    SampleSpacingInWorldY: 1/2
     RasterExtentInWorldX: 1000
     RasterExtentInWorldY: 500
         XIntrinsicLimits: [1 2001]
         YIntrinsicLimits: [1 1001]
       TransformationType: 'rectilinear'
     CoordinateSystemType: 'planar'


Input Arguments

collapse all

Limits in the x direction, specified as a 1-by-2 numeric vector.

Example: xWorldLimits = [207000 208000];

Data Types: double

Limits in the y direction, specified as a 1-by-2 numeric vector.

Example: yWorldLimits = [912500 913000];

Data Types: double

Size of the raster, specified as a 1-by-2 numeric vector.

Example: rasterSize = [180 360];

Data Types: double

Vertical spacing of posting, specified as a numeric scalar.

Example: spacing = 1.5

Data Types: double

Horizontal spacing of postings, specified as a numeric scalar.

Example: spacing = 1.5

Data Types: double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: R = maprefpostings(latlim,lonlim,rasterSize,'ColumnsStartFrom','north')

collapse all

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

Example: R = maprefpostings(latlim,lonlim,rasterSize,'ColumnsStartFrom','north')

Data Types: char

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

Example: R = maprefpostings(latlim,lonlim,rasterSize,'RowsStartFrom','east')

Data Types: char

Output Arguments

collapse all

Object that references raster postings to map coordinates, returned as a MapPostingsReference raster reference object.

Tips

  • To construct a map raster reference object from a world file matrix, use the maprasterref function.

Introduced in R2015b

Was this topic helpful?