[GRASS-dev] A function for obtaining UTM coordinate

Glynn Clements glynn at gclements.plus.com
Fri Jul 25 15:03:06 EDT 2008


roberto caselli wrote:

> I need a GRASS function for obtaining for each cell its UTM
> coordinate.

In C, G_col_to_easting() and G_row_to_northing() translate col/row
coordinates to geographic or cartographic coordinates. Note that the
arguments are floating point values, so you need to use e.g. col+0.5
and row+0.5 if you want the coordinate of the cell's centre.

In r.mapcalc, the x() and y() functions return the coordinates of the
cell's centre.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list