[Proj] grid-shift issues

Craig Bruce csbruce at cubewerx.com
Tue Oct 26 16:25:42 EDT 2004


I've run into a couple of problems using grid-shift files.  Firstly,
the grid-shifter appears to search the given list of +nadgrids in order
of appearance and uses the first one that matches.  The default order
encoded into the PROJ source code for NAD27 is:

  "nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat"

When I try to transform the point lon=-75.7, lat=45.4, which is in Ottawa,
Ontario, setting the PROJ_DEBUG environment variable shows that the
grid-shift file "conus" is used.  I have used a custom setting of:

  "nadgrids=@ntv2_0.gsb, at ntv1_can.dat, at alaska, at conus, at null"

This makes the call for the point properly use "ntv2_0".  However, our US
customers may not be happy with this string since "ntv1_can" (lat 40 to 84)
and "conus" (lat 20 to 50.25) overlap.  Is there some way that PROJ could
be made more intelligent about selecting the best grid-shift file to use?

Secondly, the following web page:

  http://www.remotesensing.org:16080/proj/gen_parms.html

indicates that a special grid-shift file called "null" is distributed
with PROJ releases after 4.4.6 that can be used to avoid fatal errors when
transforming a point not covered by any of the grid-shift files, but the
"null" grid-shift file does not seem to be present in PROJ release 4.4.8.

I reverse-engineered my own "null.lla" as:

World zero grid shift
   2   2   1  -180.00000   360.000000000000   -90.00000   180.000000000000
0: 0 0 0 0
1: 0 0 0 0

This file builds through nad2bin but it doesn't seem to work.  Where can
I get the official "null.lla"?

--------------------------+----------------------+--------------------------
Dr. Craig S. Bruce        | Ph 819-771-8303 x205 |             CubeWerx Inc.
Senior Software Developer |   Fax 819-771-8388   |  Gatineau, Québec, Canada
csbruce at cubewerx.com      |  http://csbruce.com/ |  http://www.cubewerx.com/
--------------------------+----------------------+--------------------------
 "If most financial analysts watched a puppy growing for the first month of
  its life, they would conclude that a year later it will be 400-foot-tall
                monster trashing downtown Tokyo." -- unknown



More information about the Proj mailing list