[GRASS5] Another question on the projection transform

Markus Neteler neteler at itc.it
Fri Jan 25 04:01:03 EST 2002


On Thu, Jan 24, 2002 at 08:49:36PM -0800, zhang ji wrote:
> Hi all,
> 
> I have another question on the projection transform.
> Does the function in m.proj can be accessed throught
> the libgis.a? I mean does there existing the common
> API in the grass library which can be directly used 
> to do some projection transform, for example, i can
> specify what the input projection ,input lat/long and
> the output projection with the ellipsoids, and the
> function can return the output northing/easting?

Hi,

you may have a look at g.region code, -l flag. It
reads the current region boundary coordinates in
current projection and transforms to latitude-longitude.
Using the PROJ functions as done there you can
re-project values in a program. Also r.sunmask is
using some PROJ functions.

You have to include
$(GPROJLIB)
into the LIBES line of Gmakefile.

A command line version is m.proj2 for shell scripts.

 Markus



More information about the grass-dev mailing list