[GRASS5] Projection transform

Morten Hulden morten at ngb.se
Wed Jan 23 13:26:12 EST 2002


On Wed, 23 Jan 2002, Lee Wilson and Associates wrote:

> Morten Hulden wrote:
> 
> > I hope anyone who tackles m.proj[2] will consider that there also is
> > common code with g.setproj.
> > 
> > A few years ago when I added support for more projections in g.setproj, I
> > also made corresponding changes in m.proj and merged the init routines
> > into the gis library. Now these program have started to drift apart again
> > - basic datum shift support has partially been added to g.setproj but not
> > to m.proj.
> > 
> > I believe , based on the similarity of the code and some old module
> > no longer present in the current distro, that in the ancient past (long
> > before I started to use grass) g.setproj and m.proj was the same program.
> 
> Now g.setproj and m.proj don't even perform similar tasks.  g.setproj
> lets the user set the projection information associated with a database
> location and m.proj converts coordinates between different projections. 
> I guess I don't see much reason why these tasks should be merged.

Please don't misunderstand. I don't mean they should be merged. They 
_were_ merged, but there were obvious reasons to split them. Nevertheless, 
there is a lot of common code. Both use geo.h and geo_init.c, and main.c 
(in g.setproj) is very similar to process.c (in m.proj).

What I mean is they should be maintained in sync and common code should be
put in a library. If g.setproj asks questions on datum settings, same
questions should be asked in m.proj.

They perform different tasks, yes, but both programs generate proj-options 
based on user input and default settings for the projection in question. 
They differ in that g.setproj uses the settings to generate a PROJ_INFO 
file, while m.proj uses them directly to do a projection of a single 
point.

Morten Hulden





More information about the grass-dev mailing list