[GRASS-dev] Re: #73: r.out.gdal tiff output does not work

Hamish hamish_b at yahoo.com
Thu Apr 23 08:05:34 EDT 2009


Markus Metz wrote:
> ESRI ArcMap 9.2: display ok for nodata=0, not ok when using
> NaN, NaN displayed like value 0.0, and cell query gives NaN
> instead of nodata
> 
> Considering this, rather use e.g. raster_min - 1 as default
> nodata value for GDAL floating point datatypes?


I would prefer that we default to something sensible (NaN) and add a
compatibility flag if the user wishes to export to deficient software.
Eventually the other software will get fixed, sooner if we don't
pander to their bugs.


good point about G_*range_min_max() not picking up zoomed outputs.
for range check stuff we could test at the start if there is no overlap
at all (e.g. spearfish elevation is all >1000m, so no part will fit in
a 0-255 Byte output), then have it test each cell as it goes. that is
not an expensive check, and Glynn sped up the NULL check so that should
be quick now too. If it finds something out of range drop a fatal error.

Fancy heuristics, trying to be really smart and solve the problem for
the user, and allowing to write broken output data are all going to
hurt the user in the end. Better to drop an error* and clearly explain
why, so the user can learn something from it.

"map range is .., type range is .., nodata=..  something there doesn't fit."

[*] important to explain why in the error message so they don't get
 frustrated, as obviously this stuff is a bit arcane.


Hamish



      



More information about the grass-dev mailing list