Opened 12 years ago

Closed 12 years ago

#4313 closed defect (invalid)

Coordinates are not properly maintained when convert to NITF

Reported by: peterzhang Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: major Keywords: NITF
Cc:

Description

I converted a Geotif file to NITF format with following command:

gdal_translate.exe -of NITF image.tif image.ntf

then I found corner coordinates are different between two files:

gdalinfo image.tif

Corner Coordinates: Upper Left ( -97.6909241, 30.3611906) ( 97d41'27.33"W, 30d21'40.29"N) Lower Left ( -97.6909241, 30.3471207) ( 97d41'27.33"W, 30d20'49.63"N) Upper Right ( -97.6747033, 30.3611906) ( 97d40'28.93"W, 30d21'40.29"N) Lower Right ( -97.6747033, 30.3471207) ( 97d40'28.93"W, 30d20'49.63"N) Center ( -97.6828137, 30.3541556) ( 97d40'58.13"W, 30d21'14.96"N)

gdalinfo image.ntf

Corner Coordinates: Upper Left ( -97.6908470, 30.3611246) ( 97d41'27.05"W, 30d21'40.05"N) Lower Left ( -97.6908470, 30.3472087) ( 97d41'27.05"W, 30d20'49.95"N) Upper Right ( -97.6747086, 30.3611246) ( 97d40'28.95"W, 30d21'40.05"N) Lower Right ( -97.6747086, 30.3472087) ( 97d40'28.95"W, 30d20'49.95"N) Center ( -97.6827778, 30.3541667) ( 97d40'58.00"W, 30d21'15.00"N)

It looks like coordinates info are not properly maintained.

Attachments (1)

image.tif (961.0 KB ) - added by peterzhang 12 years ago.

Download all attachments as: .zip

Change History (2)

by peterzhang, 12 years ago

Attachment: image.tif added

comment:1 by Even Rouault, 12 years ago

Component: UtilitiesGDAL_Raster
Milestone: 1.8.2
Priority: highnormal
Resolution: invalid
Status: newclosed

This is expected behaviour. By default, the NITF format stores coordinates with not enough significant digits. See http://gdal.org/frmt_nitf.html

A way of workarounding this is to force the writing of SDE TREs for higher precision :

gdal_translate  image.tif image.ntf -of NITF -co SDE_TRE=YES
Note: See TracTickets for help on using tickets.