[GRASS-dev] A function for obtaining UTM coordinate

roberto caselli roberto.caselli at yahoo.it
Sat Jul 26 09:22:28 EDT 2008


Ok, row and col are known, but when I call 
G_col_to_easting or G_row_to_northing, they return lat/lon coordinates.
So I don't know how to tell to these functions that I want UTM coordinates.



--- Sab 26/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: Sabato 26 luglio 2008, 15:13

roberto caselli wrote:

> 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

If it is actually a cell of a GRASS raster map, then you also know its
row and column, which you can use with these functions.

If you want to transform arbitrary lat/lon coordinates to or from the
cartographic coordinate system used by the current location, see the
source code for v.proj for example code.

OTOH, if this doesn't actually involve GRASS in any way, you are
probably better off using the PROJ library directly. The only reason
to use the GRASS interface is if you want to use the projection
information from a location's PROJ_INFO file.

-- 
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/4cc54d42/attachment.html


More information about the grass-dev mailing list