[gdal-dev] gdal_translate alters NITF's metadata

Shawn Gong SGONG at mdacorporation.com
Fri Apr 20 12:20:59 EDT 2012


Hi list,

I use gdal 1.9.0 

I have a NITF image that has 12 bands. The first 8 are I and Q of a quad-pol complex.
I ran "gdal_translate -of NITF -b 9 -b 12 -b 10 -b 11 pp1.NTF test" to get rid of them and keep the last 4 magnitude bands.

However the NITF tags are altered, e.g. the NITF_ISORCE and NITF_IDATIM

Have you seen this? 
I also see "Warning 1: FHDR=NITF02.1 not supported, switching to NITF02.10."  Can this be the cause?

Thanks,
Shawn
-------------- next part --------------
Driver: NITF/National Imagery Transmission Format
Files: test
Size is 4337, 2980
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AUTHORITY["EPSG","4326"]]
Origin = (-76.105048143450176,45.520048161202489)
Pixel Size = (0.000096286900369,-0.000096322404983)
Metadata:
  NITF_ABPP=32
  NITF_CCS_COLUMN=0
  NITF_CCS_ROW=0
  NITF_CLEVEL=05
  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=G
  NITF_IDATIM=20021216151629
  NITF_IDLVL=1
  NITF_IGEOLO=453112N0760618W453112N0754115W451359N0754115W451359N0760618W
  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=R
  NITF_STYPE=BF01
  NITF_TGTID=
Corner Coordinates:
Upper Left  ( -76.1050481,  45.5200482) ( 76d 6'18.17"W, 45d31'12.17"N)
Lower Left  ( -76.1050481,  45.2330074) ( 76d 6'18.17"W, 45d13'58.83"N)
Upper Right ( -75.6874519,  45.5200482) ( 75d41'14.83"W, 45d31'12.17"N)
Lower Right ( -75.6874519,  45.2330074) ( 75d41'14.83"W, 45d13'58.83"N)
Center      ( -75.8962500,  45.3765278) ( 75d53'46.50"W, 45d22'35.50"N)
Band 1 Block=4337x1 Type=Float32, ColorInterp=Gray
Band 2 Block=4337x1 Type=Float32, ColorInterp=Gray
Band 3 Block=4337x1 Type=Float32, ColorInterp=Gray
Band 4 Block=4337x1 Type=Float32, ColorInterp=Gray
-------------- next part --------------
Driver: NITF/National Imagery Transmission Format
Files: pp1.ntf
Size is 4337, 2980
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AUTHORITY["EPSG","4326"]]
Origin = (-76.105048143450176,45.520048161202489)
Pixel Size = (0.000096286900369,-0.000096322404983)
Metadata:
  NITF_ABPP=32
  NITF_CCS_COLUMN=0
  NITF_CCS_ROW=0
  NITF_CLEVEL=05
  NITF_ENCRYP=0
  NITF_FBKGC= 48, 48, 48
  NITF_FDT=20120420094325
  NITF_FHDR=NITF02.10
  NITF_FSCATP=
  NITF_FSCAUT=
  NITF_FSCLAS=U
  NITF_FSCLSY=
  NITF_FSCLTX=
  NITF_FSCODE=
  NITF_FSCOP=00001
  NITF_FSCPYS=00001
  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=MS
  NITF_ICORDS=G
  NITF_IDATIM=20080526112157
  NITF_IDLVL=1
  NITF_IGEOLO=453112N0760618W453112N0754115W451359N0754115W451359N0760618W
  NITF_IID1=0000000001
  NITF_IID2=
  NITF_ILOC_COLUMN=0
  NITF_ILOC_ROW=0
  NITF_IMAG=1.0 
  NITF_IMODE=B
  NITF_IREP=MULTI
  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=RADARSAT-2
  NITF_ISREL=
  NITF_ISSRDT=
  NITF_ONAME=PCI Geomatics
  NITF_OPHONE=+1(905)764-0614
  NITF_OSTAID=0000000001
  NITF_PJUST=R
  NITF_PVTYPE=R
  NITF_STYPE=BF01
  NITF_TGTID=
Corner Coordinates:
Upper Left  ( -76.1050481,  45.5200482) ( 76d 6'18.17"W, 45d31'12.17"N)
Lower Left  ( -76.1050481,  45.2330074) ( 76d 6'18.17"W, 45d13'58.83"N)
Upper Right ( -75.6874519,  45.5200482) ( 75d41'14.83"W, 45d31'12.17"N)
Lower Right ( -75.6874519,  45.2330074) ( 75d41'14.83"W, 45d13'58.83"N)
Center      ( -75.8962500,  45.3765278) ( 75d53'46.50"W, 45d22'35.50"N)
Band 1 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 2 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 3 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 4 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 5 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 6 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 7 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 8 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 9 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 10 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 11 Block=4337x1 Type=Float32, ColorInterp=Undefined
Band 12 Block=4337x1 Type=Float32, ColorInterp=Undefined


More information about the gdal-dev mailing list