[gdal-dev] gdal NITF complex driver question

Gong, Shawn (Contractor) Shawn.Gong at drdc-rddc.gc.ca
Fri Jul 10 09:54:24 EDT 2009


Thanks Even.

I will try the patch and report back.

Shawn


-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: Thursday, July 09, 2009 5:08 PM
To: gdal-dev at lists.osgeo.org
Cc: Gong, Shawn (Contractor)
Subject: Re: [gdal-dev] gdal NITF complex driver question

Shawn,

I'm not surprised. Someone already provided quite the same patch in 
http://trac.osgeo.org/gdal/ticket/2526 but I had a doubt about missing 
swapping of real and imaginary fields. As I couldn't test not having test 
data, this wasn't applied.

Could you also apply the attached patch to nitfimage.c (from trunk) and 
confirm if it does correct byte-swapping ? Anyway, attaching test data to the 
above ticket would be really great to avoid blind guessing !

Best regards,
Even


Le Thursday 09 July 2009 22:40:11 Gong, Shawn (Contractor), vous avez écrit :
> hi list,
>
> We made a slight modification in gdal/frmts/nitf/nitfdataset.cpp to add
> support for RADARSAT-2 NITF Single Look Complex format.
>
> in NITFRasterBand::NITFRasterBand( NITFDataset *poDS, int nBand )
> /* --------------------------------------------------------------------
> */
> /*      Translate data type(s).
> */
> /* --------------------------------------------------------------------
> */
> added:
>     else if( psImage->nBitsPerSample == 64
>              && EQUAL(psImage->szPVType,"C") )
>         eDataType = GDT_CFloat32;
>
>
> However we found that the real and imaginary fields come out switched.
> i.e. the gdal driver put Q in front of I.
> We used OpenEV and gdal_translate to confirm that.
>
> Any thoughts and help are appreciated.
>
> thanks,
> Shawn




More information about the gdal-dev mailing list