[gdal-dev] NITF geotransform data erratic

Nigus, Steve steve.nigus at flightsafety.com
Thu Jul 20 09:18:28 PDT 2023


I am doing a real-time SAR spot simulation where the SAR orbits a target point and saves a series of the georeferenced spot image files.  My initial implementation generated non-GDAL GeoTIFF or JPEG files.  I use a least-squares algorithm to develop the 6 affine geotransform values.  This all works fine, and the files display nicely in my GIS viewer.   I have since brought in GDAL 2.2.3 to create NITF files.  Unfortunately, over 30% of the NITF files lose the geotransform info.  Rather, they show generic GCPs.  The "good" NITF files display OK in my GIS viewer.  As a sanity test, I took a series of non-GDAL GeoTIFF files and ran them through gdal_translate to NITF.  Interestingly, around 30% of the NITF files again dropped the geotransform data.  I've attached below gdalinfo reports of a gdal_translate input GeoTIFF file and the output NITF file for a failing example.  My geotransform data appears to be well-behaved.  Question:  What could cause geotransform data to be rejected?  Thanks.....


Non-GDAL gdal_translate input GeoTIFF file:

$ gdalinfo sar2023071722525322.tif
Driver: GTiff/GeoTIFF
Files: sar2023071722525322.tif
Size is 1024, 1024
Coordinate System is:
PROJCS["VITAL SAR Simulation",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
GeoTransform =
  586659.1336352756, -0.2027675805429681, -0.2274441341933198
  2969181.096499263, -0.2274441341933198, 0.2027675805429681
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  586659.134, 2969181.096) ( 80d 7'40.06"W, 26d50'29.50"N)
Lower Left  (  586426.231, 2969388.731) ( 80d 7'48.44"W, 26d50'36.30"N)
Upper Right (  586451.500, 2968948.194) ( 80d 7'47.64"W, 26d50'21.98"N)
Lower Right (  586218.597, 2969155.828) ( 80d 7'56.02"W, 26d50'28.78"N)
Center      (  586438.865, 2969168.462) ( 80d 7'48.04"W, 26d50'29.14"N)
Band 1 Block=1024x8 Type=Byte, ColorInterp=Gray

gdal_translate output NITF file:

$ gdalinfo sar2023071722525322.nitf
Driver: NITF/National Imagery Transmission Format
Files: sar2023071722525322.nitf
Size is 1024, 1024
Coordinate System is `'
GCP Projection =
PROJCS["UTM Zone 17, Northern Hemisphere",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
GCP[  0]: Id=UpperLeft, Info=
          (0.5,0.5) -> (586659,2969181,0)
GCP[  1]: Id=UpperRight, Info=
          (1023.5,0.5) -> (586451,2968948,0)
GCP[  2]: Id=LowerRight, Info=
          (1023.5,1023.5) -> (586219,2969156,0)
GCP[  3]: Id=LowerLeft, Info=
          (0.5,1023.5) -> (586426,2969389,0)
Metadata:
  NITF_ABPP=08
  NITF_CCS_COLUMN=0
  NITF_CCS_ROW=0
  NITF_CLEVEL=03
  NITF_ENCRYP=0
  NITF_FBKGC=  0,  0,  0
  NITF_FDT=20021216151629
  NITF_FHDR=NITF02.10
  NITF_FSCATP=
  NITF_FSCAUT=
  NITF_FSCLAS=U
  NITF_FSCLSY=
  NITF_FSCLTX=
  NITF_FSCODE=
  NITF_FSCOP=00000
  NITF_FSCPYS=00000
  NITF_FSCRSN=
  NITF_FSCTLH=
  NITF_FSCTLN=
  NITF_FSDCDT=
  NITF_FSDCTP=
  NITF_FSDCXM=
  NITF_FSDG=
NITF_FSDGDT=
  NITF_FSREL=
  NITF_FSSRDT=
  NITF_FTITLE=
  NITF_IALVL=0
  NITF_IC=NC
  NITF_ICAT=VIS
  NITF_ICORDS=N
  NITF_IDATIM=20021216151629
  NITF_IDLVL=1
  NITF_IGEOLO=175866592969181175864512968948175862192969156175864262969389
  NITF_IID1=Missing
  NITF_IID2=
  NITF_ILOC_COLUMN=0
  NITF_ILOC_ROW=0
  NITF_IMAG=1.0
  NITF_IMODE=B
  NITF_IREP=MONO
  NITF_ISCATP=
  NITF_ISCAUT=
  NITF_ISCLAS=U
  NITF_ISCLSY=
  NITF_ISCLTX=
  NITF_ISCODE=
  NITF_ISCRSN=
  NITF_ISCTLH=
  NITF_ISCTLN=
  NITF_ISDCDT=
  NITF_ISDCTP=
  NITF_ISDCXM=
  NITF_ISDG=
  NITF_ISDGDT=
  NITF_ISORCE=Unknown
  NITF_ISREL=
  NITF_ISSRDT=
  NITF_ONAME=
  NITF_OPHONE=
  NITF_OSTAID=GDAL
  NITF_PJUST=R
  NITF_PVTYPE=INT
  NITF_STYPE=BF01
  NITF_TGTID=
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 1024.0)
Upper Right ( 1024.0,    0.0)
Lower Right ( 1024.0, 1024.0)
Center      (  512.0,  512.0)
Band 1 Block=1024x1 Type=Byte, ColorInterp=Gray


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230720/b9a8dc52/attachment-0001.htm>


More information about the gdal-dev mailing list