[Proj] patch: fallback to 7/3 param transform when gridshift transform fails

Hamish hamish_b at yahoo.com
Wed Apr 16 02:21:27 PDT 2008


Craig de Stigter wrote:
> We came across some out-of-grid geometries when transforming from
> EPSG:27200 (New Zealand Map Grid). The results returned included
> INFs and NANs, which was hardly useful.
> 
> As a solution I wrote a patch for the pj_datum_transform function in
> Proj. The patch first tries to convert coordinates using the gridshift
> approach if available, but on failure will fall back to using the
> appropriate 3- or 7-parameter transform.


Yes, the distortion grid hugs the coast quite closely in places.
(regardless of file size issues, it's based on trig stations, so that's
hardly surprising)

I've experienced this in GRASS when plotting a lat/lon grid over a NZMG
location with the 'd.grid -g' or 'ps.map geogrid' modules. I had to
switch to the 7 term transform to get it to work. But then at a scale
where you're going far offshore switching away from the grid probably
doesn't make any difference. (for me it was just ~10-20km west of
Fiordland when it failed)

NZMG distortion gets very bad (totally wonky) far away from the main
coasts, if your data is from like the Kermadec, Chatham, or Auckland
Islands I think you probably should try hard to use something else.
(somewhen I made a screenshot of that)


One worry I have with the patch is that it makes the data of uneven
quality across the dataset. (but again NZMG/NZGD1949 is pretty much ????
at sea anyway, so maybe who cares?)



regards,
Hamish

Dept Marine Science
University of Otago




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




More information about the Proj mailing list