[Proj] Using a GDAL-generated NTV2-file

Frank Warmerdam warmerdam at pobox.com
Tue May 24 08:18:57 EST 2011


On 11-05-24 05:51 AM, Jan Hartmann wrote:
>
>
> On 05/21/11 18:06, Frank Warmerdam wrote:
>> Jan,
>>
>> I believe the problem is that the test.tif is south up. The NTv2 reader
>> in PROJ determines the size based on the extents and pixel size and gets
>> mixed up as the extents are upside down. You can flip test.tif with
>> gdalwarp.
>>
>> eg.
>> gdalwarp test.tif northup.tif
>>
>>
> Yes, now it works. Just to be sure: is the result of the flipping correct? The
> tif file was created from two point lists, each with a lat-lon coordinate and
> the displacement in arcseconds. Gdal_grid converted the lists into two grid
> files, with the upper boundary having a smaller latitude than the lower
> coordinate. That's OK, as latitude values decrease when going north, in
> contrast with projected coordinates.

Jan,

Ah, it's gdal_grid generated.  I had assumed it's habit of producing
south-up files would have been corrected by now.  It isn't a program
I've had any real input on.

I must contest your statement that "as latitude values decrease when
going north".

> Now, what happens when I use gdalwarp on this file? Is the complete file
> mirrored? Are the displacements at the right geographical location?

gdalwarp does a rectification to north up.  In a regular case like this
it should just amount to a mirroring but you might want to inspect it a
bit to be sure the corners are still the same, etc.

The proof will be in the pudding - if you get the right transformation.

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