[GRASS-dev] A function for obtaining UTM coordinate

roberto caselli roberto.caselli at yahoo.it
Sat Jul 26 04:15:10 EDT 2008


This is the prototype of the function 
double G_col_to_easting           
          (
          double 
           col, 
        
        
          

          

          const struct Cell_head * 
           window 
        
        
          

          )
          
For each cell I know the geographic decimal coordinate (for example -78.847804 , -2.814949) but what I'd like to know is its UTM coordinate (x=739254.864 , y=9688649.285594).

I don't know how using G_col_to_easting and G_row_to_northing to have these translations

--- Ven 25/7/08, Glynn Clements <glynn a gclements.plus.com> ha scritto:
Da: Glynn Clements <glynn a gclements.plus.com>
Oggetto: Re: [GRASS-dev] A function for obtaining UTM coordinate
A: roberto.caselli a yahoo.it
Cc: grass-dev a lists.osgeo.org
Data: Venerdì 25 luglio 2008, 21:03

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 a gclements.plus.com>



      Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l&#39;home page che piace a te!
www.yahoo.it/latuapagina
-------------- parte successiva --------------
Un allegato HTML � stato rimosso...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20080726/2c434fd2/attachment.html


More information about the grass-dev mailing list