Martin Desruisseaux ha scritto:
Andrea Aime a écrit :
Its null values are in fact grabbed for the one GridCategory
in the sample dimension whose name is "no data".
This is not a reliable way to looks for the null value!
That's the way the current WCS 1.0 implementation works, I'm just trying
to port it over to WCS 1.1.
However I realize that
we may need a convenience method making this job easier.
For a coverage of geophysics values (e.g. temperature, elevation, etc.), the
"null" values are anyone for which:
Category.isQuantitative()
returns 'false'.
http://javadoc.geotools.fr/snapshot/org/geotools/coverage/Category.html#isQuantitative()
A geophysics coverage may have more than one null value.
Is each of these categories made up of a single value? As I said, with WCS 1.1 I'm apparently unable to model a continuous range of null values (like the closed interval [0.53, 10.5], just to make an example).
For non-geophysics coverage (e.g. a coverage that contains only categories like
"forest", "river", "urban", etc.), all categories are non-quantitative and none
of them have special meaning. We could add some way to flag a particular
category as "nodata", but I would like to know why we would like to do so, in
order to see what could be the best approach. For example a possible approach
may be to check which pixel values in declared as transparent in the
IndexColorModel.
hmm... WCS is about pure data, not about representation. Can we keep rendering issues away from the meaning of what is no-data and what is not? For example, rendering wise you might want to provide a solid color to the boave "forest", "river", "urban".
For "photographic" coverage, if we need a way to determine null values, then I
would like to know first what non-null values means in a photographic image...
For a photograpic coverage null values may represent the places where no image is available... yet I'm not sure one would have to report this one
as an explicit null value. Maybe so.
Turns out that the only cases where
"no data" is used that I can find are in gtopo30 and arcgrid,
and are both single null values. GeoTiff seems to have no
support for null values (I guess this is just an implementation
limitation, right?). What about NetCDF and HDF, what should
I expect?
In NetCDF, the "fill values" are declared in the NetCDF metadata in some
specific place determined by the CF convention:
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/ch02s05.html#missing-data
A NetCDF file can contains more than one "fill values". For those files, the
"Category.isQuantitative()" method call should be the most reliable way.
It should be the same for HDF data.
I see, thank you
Cheers
Andrea