NFW file causes NITF file to lose false northing
|Reported by:||jwderos||Owned by:||warmerdam|
|Severity:||normal||Keywords:||nitf hdr nfw|
I have an IKONOS NITF dataset with an image in Chile. The dataset includes an NFW file. When I run gdalinfo on the NITF in the context of the other IKONOS files, it loses the false northing value and puts the image in Canada's Baffin Bay. If I copy the NITF file elsewhere and run gdalinfo without the accompanying NFW file, the image has correct coordinates.
I think I have tracked down the bug to line 1463 of file "frmts/nitf/nitfdataset.cpp". To determine if the image is in the northern hemisphere, it adds up all of the latitudes and if the sum is less than zero, sets the isNorth flag to false. However, in the case of this scene, all of those values are positive due to a large false northing value. The code then moves the image into the northern hemisphere. I don't know how to extract the false northing value from the projection, so I just added a "0 &&" to the if statement so that NFW files will never be processed with NITF files.
Change History (7)
comment:6 Changed 6 years ago by
|Component:||default → GDAL_Raster|
|Keywords:||nitf hdr nfw added|
|Status:||new → closed|