[GRASS5] Re: [Bug 834] cs2cs: grid file causes first coord to bork

Hamish hamish_nospam at yahoo.com
Wed Apr 20 19:52:02 EDT 2005

[v.in.garmin with datum grid file fails to do datum transform]

> http://bugzilla.remotesensing.org/show_bug.cgi?id=834

> ------- It appears that the following occurs if the nzgd2kgrid005.gsb
> file isn't being found.  

note the file name is nzgd2kgrid0005.gsb, with three "0"s.

> So, in a sense the bug isn't that the first point fails, but that the 
> subsequent points succeed. 
> I'm going to make a second pass on this a bit later to dig into why 
> after the first failure, points start succeeding (presumably without
> actually applying a transform). 

Yes, having a closer look in the track data it is off by 175m. akk.
As far as the GRASS 6 v.in.garmin module goes, this error breaks
downloading waypoints but silently puts the downloaded track data in the
wrong place. :/ I'll add a check so that case breaks too.

> In the meantime, Hamish, you should ensure that you have the grid file
> somewhere appropriate such as in /usr/local/share/proj or you have
> the PROJ_LIB environment variable pointing somewhere the file can be
> found.

It is where GRASS installed it, ie $GISBASE/etc/nad/nzgd2kgrid0005.gsb,
or where it lives in the GRASS source tree, lib/proj/nzgd2kgrid0005.gsb.

I take it that PROJ_LIB needs to be set at *PROJ4's* compile time?

But how to deal with the fact that GRASS supplies the grid after the
fact? Setting PROJ_LIB="$GISBASE/etc/nad" at run time does not fix it

The Debian package, e.g., can place the file or a link to it in
/usr/share/proj/ (and that fixes the problem), but that doesn't solve 
the common issue; it would be nice if GRASS could set something so
add-on grids could be used which are not supplied by the distribution's
proj package..

Things work fine with the grid if you use GRASS's internal proj
functions, it is just cs2cs that fails.


More information about the grass-dev mailing list