#2526 closed defect (fixed)
NITF driver unnecessarily excludes complex float 32 as a valid format
Reported by: | jdfergason | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | GDAL_Raster | Version: | 1.5.0 |
Severity: | normal | Keywords: | |
Cc: | Shawn.Gong@… |
Description
The NITF driver warns about CFloat32 datatypes all though the standard fully supports them and they work fine if used. A patch to correct this is attached.
Attachments (1)
Change History (8)
follow-up: 2 comment:1 by , 16 years ago
by , 16 years ago
Attachment: | gdal-1.5.2-nitf_patch.diff added |
---|
patch to nitfdataset.cpp that allows GDT_CFloat32 and GDT_CFloat64
comment:2 by , 16 years ago
Replying to rouault:
Forgot to attach the patch ?
Sorry, my computer crashed in the middle of attaching... I hate windows :(
comment:3 by , 16 years ago
Are you sure that it is enough ? I've not read the NITF spec about complex values, but I fear that the byte-swapping on little-endian hosts is not properly done with just that patch.
I imagine that for CFLoat32 the order in the NITF file is (real part in float32 big-endian, complex part in float32 big-endian). But if we apply the byte-swapping on the 8 bytes with NITFSwapWords, we'll get (complex part in float32 little-endian, real part in float32 little-endian).
comment:4 by , 16 years ago
No, I'm not sure. I have just tried it out on a few files and they work OK. I will look at a little more closely.
comment:6 by , 15 years ago
Cc: | added |
---|---|
Milestone: | → 1.7.0 |
Resolution: | → fixed |
Status: | new → closed |
In trunk (r17789) : "NITF : Add support for CFloat32 read&write. Note that it is untested. Real and imaginary order was determined from spec and report from http://article.gmane.org/gmane.comp.gis.gdal.devel/19730"
Shawn, I'd appreciate feedback if you could test.
comment:7 by , 15 years ago
Previous commit was certainly wrong as byte swapping was concerned. Hopefully fixed by r17790
Forgot to attach the patch ?