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.

georefpostings

Reference raster postings to geographic coordinates

Syntax

R = georefpostings()
R = georefpostings(latlim,lonlim,rasterSize)
R = georefpostings(latlim,lonlim,sampleSpacingInLatitude,sampleSpacingInLongitude)
R = georefpostings(latlim,lonlim,___,Name,Value)

Description

R = georefpostings() returns a default referencing object for a raster of regularly posted samples in geographic coordinates.

example

R = georefpostings(latlim,lonlim,rasterSize) constructs a referencing object for a raster spanning the specified limits in latitude and longitude, with the numbers of rows and columns specified by rasterSize.

example

R = georefpostings(latlim,lonlim,sampleSpacingInLatitude,sampleSpacingInLongitude) allows the geographic sample spacings to be set precisely. The geographic limits will be adjusted slightly, if necessary, to ensure an integer number of samples in each dimension.

example

R = georefpostings(latlim,lonlim,___,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 the dimensions of the raster.

latlim = [-90 90];
lonlim = [-180 180];
rasterSize = [181 361];

Create the referencing object specifying the raster size.

R = georefpostings(latlim,lonlim,rasterSize,'ColumnsStartFrom','north')
R = 
  GeographicPostingsReference with properties:

              LatitudeLimits: [-90 90]
             LongitudeLimits: [-180 180]
                  RasterSize: [181 361]
        RasterInterpretation: 'postings'
            ColumnsStartFrom: 'north'
               RowsStartFrom: 'west'
     SampleSpacingInLatitude: 1
    SampleSpacingInLongitude: 1
      RasterExtentInLatitude: 180
     RasterExtentInLongitude: 360
            XIntrinsicLimits: [1 361]
            YIntrinsicLimits: [1 181]
        CoordinateSystemType: 'geographic'
                   AngleUnit: 'degree'


Obtain the same result by specifying the sample spacing.

spacing = 1;

R = georefpostings(latlim,lonlim,spacing,spacing,'ColumnsStartFrom','north')
R = 
  GeographicPostingsReference with properties:

              LatitudeLimits: [-90 90]
             LongitudeLimits: [-180 180]
                  RasterSize: [181 361]
        RasterInterpretation: 'postings'
            ColumnsStartFrom: 'north'
               RowsStartFrom: 'west'
     SampleSpacingInLatitude: 1
    SampleSpacingInLongitude: 1
      RasterExtentInLatitude: 180
     RasterExtentInLongitude: 360
            XIntrinsicLimits: [1 361]
            YIntrinsicLimits: [1 181]
        CoordinateSystemType: 'geographic'
                   AngleUnit: 'degree'


Input Arguments

collapse all

Latitude limits in degrees, specified as a 1-by-2 numeric vector. The number of rows in the resulting raster is specified by rasterSize.

Example: latlim = [-90 90];

Data Types: double

Longitude limits in degrees, specified as a 1-by-2 numeric vector. The number of columns in the resulting raster is specified by rasterSize.

Example: lonlim = [-180 180];

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 = georefpostings(latlim,lonlim,rasterSize,'ColumnsStartFrom','north')

collapse all

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

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

Data Types: char

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

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

Data Types: char

Output Arguments

collapse all

Object that references raster postings to geographic coordinates, returned as a GeographicPostingsReference raster reference object.

Tips

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

Introduced in R2015b

Was this topic helpful?