[GRASS-SVN] r30458 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 4 04:52:48 EST 2008


Author: neteler
Date: 2008-03-04 04:52:48 -0500 (Tue, 04 Mar 2008)
New Revision: 30458

Modified:
   grass/trunk/lib/gis/gisrasterlib.dox
Log:
Glynn's comments about 'NULL (no data) handling' added

Modified: grass/trunk/lib/gis/gisrasterlib.dox
===================================================================
--- grass/trunk/lib/gis/gisrasterlib.dox	2008-03-04 08:36:17 UTC (rev 30457)
+++ grass/trunk/lib/gis/gisrasterlib.dox	2008-03-04 09:52:48 UTC (rev 30458)
@@ -31,6 +31,7 @@
 - \subpage \ref Raster_Histograms
 - \subpage \ref GRASS_5_raster_API
 - \subpage \ref Upgrades_to_Raster_Functions
+- \subpage \ref Null_no_data
 - \subpage \ref Color_Functions
 - \subpage \ref New_functions_to_support_colors_for_floating_point
 - \subpage \ref New_functions_to_support_a_colors_for_the_NULL_value
@@ -1639,6 +1640,26 @@
 
 <P>
 
+\section Null_no_data NULL (no data) handling
+
+-2^31 (= 0x80000000 = -2147483648) is the null value
+for the CELL type, so you'll never see that value in a map.
+
+The FP nulls are the all-ones bit patterns. These corresponds to NaN
+according to the IEEE-754 formats, although it isn't the "default" NaN
+pattern generated by most architectures (which is usually 7fc00000 or
+ffc00000 for float and 7ff8000000000000 or fff8000000000000 for
+double, i.e. an all-ones exponent, the top-bit of the mantissa set,
+and either sign).
+
+So far as arithmetic is concerned, any value with an all-ones exponent
+and a non-zero mantissa is treated as NaN. But the GRASS
+G_is_[fd]_null_value() functions only consider the all-ones bit
+pattern to be null. I intend to change this in 7.x so that all FP NaN
+values are treated as null. This will mean that code which can
+generate NaNs doesn't have to explicitly convert them to the GRASS
+null value.
+
 \section Color_Functions Color Functions (new and upgraded)
 
 \subsection Upgraded_Colors_structures Upgraded Colors structures



More information about the grass-commit mailing list