[Proj] Creating a nadgrid shift file

molnar at sas.elte.hu molnar at sas.elte.hu
Fri Jan 18 05:43:22 EST 2013


Dear Jan,
After your post, I tried to do it in the opposit way.
I used "gdal_translate" to convert my .gsb file to geotiff. (The .gsb
works perfectly with "cs2cs".)
I checked the geotiff and its location is perfect (so no obvious problem
with the negative longitude values), but the cell values are like
3.40e+38, so I expect a byte order problem.

If really this byte order problem couses the errors, maybe you can avoid it:
-- converting your .tif file first to raw binary with a "GDAL virtual
format" metadata file
-- edit the "ByteOrder" parameter from MSB to LSB or vica versa in the
.vrt metadata file
-- convert the raw binary back to geotiff
-- gdal_translate it to ntv2-format
Good luck!
Gabor



> (Sorry for crossposting, don't know if it is a gdal or proj problem )
>
> This has been discussed on this list some time ago. I have been able to
> create a working nadgrid file with gdal, but it doesn't return the right
> coordinates. I did it as follows:
>
> - create a 4 band, float32 geotif, each pixel with the displacements in
> lat, lon (arcseconds), errorx and errory (both zero)
> - gdal-translate it to ntv2-format.
>
> The displacements in the geotiff are correct, and proj returns shifted
> coordinates when using the ntv2-file, but not on the right location. I'm
> really out of my wits. Could it have something to do with ntv2 using
> negative lon-values east of Greenwich? Any help would be appreciated.
>
> Jan
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj



More information about the Proj mailing list