[gdal-dev] Complex valued NoData

Even Rouault even.rouault at spatialys.com
Wed Jul 25 01:29:48 PDT 2018


Piyush,

>     We are working on use cases where we have to perform operations similar
> to gdal_translate / gdalwarp on complex valued datasets.
 
> The last discussion that I could on this topic in the mailing archives is
> from 2010:
> https://lists.osgeo.org/pipermail/gdal-dev/2010-September/025906.html 
> I’m willing to put in some effort to update the algorithms to handle nodata
> values for complex valued datasets properly (which it currently appears to
> ignore). Any pointers on where to start looking or focus on would help?

gcore/overview.cpp
alg/gdalwarpkernel.cpp
 
> We would like to avoid using pixel functions and manipulating the real/imag
> parts independently and then putting them back together.
 
> There are also different options for interpreting nodata. I believe we are
> limited to real values for this metadata field and adding new fields /
> changing the type could be pretty disruptive.
 
>   1.  Compare real value only (seems easiest to implement)
>   2.  Compare that both real and imaginary values are set to no data
> (probably better way of checking?)
 
> If one were to implement nodata support for complex-valued datasets, which
> implementation would be preferred.

Probably that comparing the real value only would be the best way to go

Looking quickly, I see we have some inconsistency of behaviour. For example 
GDALRasterBand::GetHistogram() takes the norm of the value before comparing to 
nodata, whereas ComputeStatistics() only compares (and takes into account) the 
real value.

Even


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list