intrinsicToGeographic
Transform intrinsic to geographic coordinates
Description
[
returns the geographic coordinates corresponding to intrinsic coordinates
(lat
,lon
] = intrinsicToGeographic(R
,xIntrinsic
,yIntrinsic
)xIntrinsic
, yIntrinsic
) in geographic
raster R
.
Examples
Find Geographic Coordinates from Intrinsic Coordinates
Find the geographic coordinates of cells within a raster by specifying a raster reference object and intrinsic coordinates.
First, load a geographic cells reference object for the Korean peninsula. To do this, load the korea5cR
variable from the korea5c
MAT-file. Then, specify the intrinsic coordinates of the cell in the lower-left corner. For this example, the lower-left corner is also the southwest corner because the ColumnsStartFrom
property of the reference object has a value of 'south'
and the RowsStartFrom
property has a value of 'west'
. Integer coordinates such as (1,1) indicate the center of a cell.
load korea5c korea5cR xIntrinsic = 1; yIntrinsic = 1;
Find the geographic coordinates.
[lat,lon] = intrinsicToGeographic(korea5cR,xIntrinsic,yIntrinsic)
lat = 30.0417
lon = 115.0417
You can reverse the operation by using the geographicToIntrinsic
function.
[xIntrinsic,yIntrinsic] = geographicToIntrinsic(korea5cR,lat,lon)
xIntrinsic = 1.0000
yIntrinsic = 1.0000
Input Arguments
R
— Geographic raster
GeographicCellsReference
or
GeographicPostingsReference
object
Geographic raster, specified as a GeographicCellsReference
or
GeographicPostingsReference
object.
xIntrinsic
— x-coordinates in intrinsic coordinate system
numeric array
x-coordinates in intrinsic coordinate system, specified
as a numeric array. xIntrinsic
coordinates can be
outside the bounds of the raster R
.
Data Types: single
| double
yIntrinsic
— y-coordinates in intrinsic coordinate system
numeric array
y-coordinates in intrinsic coordinate system, specified
as a numeric array. yIntrinsic
is the same size as
xIntrinsic
. yIntrinsic
coordinates can be outside the bounds of the raster
R
.
Data Types: single
| double
Output Arguments
lat
— Latitude coordinates
numeric array
Latitude coordinates, returned as a numeric array.
lat
is the same size as
xIntrinsic
.
When a point (xIntrinsic
(k),
yIntrinsic
(k)) is outside the
bounds of raster R
,
lat
(k) and
lon
(k) are extrapolated in the
geographic coordinate system. However, for any point that extrapolates to a
latitude beyond the poles (latitude outside the range [-90, 90] degrees),
lat
(k) and
lon
(k) are set to
NaN
.
Data Types: double
lon
— Longitude coordinates
numeric array
Longitude coordinates, returned as a numeric array.
lon
is the same size as
xIntrinsic
.
When a point (xIntrinsic
(k),
yIntrinsic
(k)) is outside the
bounds of raster R
,
lat
(k) and
lon
(k) are extrapolated in the
geographic coordinate system. However, for any point that extrapolates to a
latitude beyond the poles (latitude outside the range [-90, 90] degrees),
lat
(k) and
lon
(k) are set to
NaN
.
Data Types: double
Version History
Introduced in R2013b
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)