limitm
(Removed) Determine latitude and longitude limits of regular data grid
limitm
has been removed. Instead, create a geographic raster
reference object, and query its LatitudeLimits
and
LongitudeLimits
properties. For more information, see Version History.
Syntax
[latlim,lonlim] = limitm(Z,R)
latlonlim = limitm(Z,R)
Description
[latlim,lonlim] = limitm(Z,R)
computes the latitude and longitude
limits of the geographic quadrangle bounding the regular data grid Z
spatially referenced by R
. R
can be a geographic
raster reference object, a referencing vector, or a referencing matrix.
If R
is a geographic raster reference object, its
RasterSize
property must be consistent with
size(Z)
.
If R
is a referencing vector, it must be 1-by-3 with elements:
[cells/degree northern_latitude_limit western_longitude_limit]
R
is a referencing matrix, it must be 3-by-2 and transform raster row
and column indices to/from geographic coordinates according to:
[lon lat] = [row col 1] * R
R
is a
referencing matrix, it must also define a (non-rotational, non-skewed) relationship in
which each column of the data grid falls along a meridian and each row falls along a
parallel. The output latlim
is a vector of the form
[southern_limit northern_limit]
and lonlim
is a
vector of the form [western_limit eastern_limit]
. All angles are in
units of degrees.latlonlim = limitm(Z,R)
concatenates latlim
and
lonlim
into a 1-by-4 row vector of the form:
[southern_limit northern_limit western_limit eastern_limit]
Examples
Load elevation raster data and a geographic cells reference object. Then, find the latitude and longitude limits.
load topo60c
[latlimits,lonlimits] = limitm(topo60c,topo60cR)
latlimits = -90 90 lonlimits = 0 360
The data set covers the whole globe, so the result is expected.