Convert data grid rows and columns to latitude-longitude
[lat, lon] = setltln(Z, R, row, col)
[lat, lon, indxPointOutsideGrid] = setltln(Z, R, row, col)
latlon = setltln(Z, R, row, col)
[lat, lon] = setltln(Z, R, row, col) returns the latitude and
longitudes associated with the input row and column coordinates of the regular data grid
R can be a geographic raster reference object, a
referencing vector, or a referencing matrix.
R is a geographic raster reference object, its
RasterSize property must be consistent with
R is a referencing vector, it must be 1-by-3 with elements:
[cells/degree northern_latitude_limit western_longitude_limit]
Ris 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
Ris a referencing matrix, it must 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. Points falling outside the grid are ignored in
col. All input angles are in degrees.
[lat, lon, indxPointOutsideGrid] = setltln(Z, R, row,
the indices of the elements of the
that lie outside the input grid. The outputs
always ignore these points; the third output accounts for them.
latlon = setltln(Z, R, row, col) returns the coordinates in a single
two-column matrix of the form
Find the coordinates of row 45, column 65 of
load topo [lat,lon,indxPointOutsideGrid] = setltln(topo,topolegend,45,65) lat = -45.5000 lon = 64.5000 indxPointOutsideGrid =  % Empty because the point is valid