[Proj] grid-shift issues

Frank Warmerdam warmerdam at pobox.com
Sat Oct 30 00:16:11 EDT 2004

Craig Bruce wrote:
> I suppose that is a hairy problem.  We could just get the politicians
> together to redefine the border as being 44° all the way across the
> continent.


I sense this solution could be a hard sell in some quarters.

>>I have attached null.lla.  It is the PROJ CVS tree.  I don't think any of
>>the grid shift files are in the PROJ.4 source tarball are they?  It may
>>be that the build version of null is also missing from the last grid
>>shift file snapshot.  If so, let me know and I will put up a new one.
> It is not present in this file, which I presume is the latest:
>   ftp://ftp.remotesensing.org/pub/proj/proj-nad27-1.1.tar.gz

OK, I will post a proj-nad27-1.2.tar.gz with the null.lla as well shortly.

> But, your "null" file also doesn't seem to be selected.  Here is some
> output from my program the first time a transformation is called:
> This is strange, since it seems to load the "null" file to use but then
> says that it failed to find a grid shift table.  (I get the same result
> with no '@' in front of "null".)

I have determined this was a bug in nad_cvt.c with adjlon() being applied to
a longitude that had already been made relative to the grid origin.  The bug
only manifests for grids wider than 180 degrees, and values that are past the
180 mark.

warmerda at gdal2200[325]% cvs diff -r1.2 -r1.3 nad_cvt.c
Index: nad_cvt.c
RCS file: /cvs/maptools/cvsroot/proj/src/nad_cvt.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -r1.2 -r1.3
<       tb.lam = adjlon(tb.lam);
 >       tb.lam = adjlon(tb.lam - PI) + PI;

The change is in CVS now, and will be in the PROJ 4.4.9 release out within
a matter of minutes (I hope).

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Proj mailing list