Main Content

pix2latlon

(Removed) Convert pixel coordinates to latitude-longitude coordinates

The pix2latlon function has been removed. Use the intrinsicToGeographic function instead. For more information, see Version History.

Syntax

[lat, lon] = pix2latlon(R,row,col)

Description

[lat, lon] = pix2latlon(R,row,col) calculates latitude-longitude coordinates lat, lon from pixel coordinates row, col. R is either a 3-by-2 referencing matrix that transforms intrinsic pixel coordinates to geographic coordinates, or a geographic raster reference object. row and col are vectors or arrays of matching size. The outputs lat and lon have the same size as row and col.

Examples

Find the latitude and longitude of the upper left outer corner of a gridded data set.

load korea5c
[UL_lat,UL_lon] = pix2latlon(korea5cR,0.5,0.5)

The output appears as follows:

UL_lat =

    30


UL_lon =

   115

Version History

Introduced before R2006a

expand all