Changeset 30458


Ignore:
Timestamp:
Mar 4, 2008, 1:52:48 AM (16 years ago)
Author:
neteler
Message:

Glynn's comments about 'NULL (no data) handling' added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/lib/gis/gisrasterlib.dox

    r29975 r30458  
    3232- \subpage \ref GRASS_5_raster_API
    3333- \subpage \ref Upgrades_to_Raster_Functions
     34- \subpage \ref Null_no_data
    3435- \subpage \ref Color_Functions
    3536- \subpage \ref New_functions_to_support_colors_for_floating_point
     
    16391640
    16401641<P>
     1642
     1643\section Null_no_data NULL (no data) handling
     1644
     1645-2^31 (= 0x80000000 = -2147483648) is the null value
     1646for the CELL type, so you'll never see that value in a map.
     1647
     1648The FP nulls are the all-ones bit patterns. These corresponds to NaN
     1649according to the IEEE-754 formats, although it isn't the "default" NaN
     1650pattern generated by most architectures (which is usually 7fc00000 or
     1651ffc00000 for float and 7ff8000000000000 or fff8000000000000 for
     1652double, i.e. an all-ones exponent, the top-bit of the mantissa set,
     1653and either sign).
     1654
     1655So far as arithmetic is concerned, any value with an all-ones exponent
     1656and a non-zero mantissa is treated as NaN. But the GRASS
     1657G_is_[fd]_null_value() functions only consider the all-ones bit
     1658pattern to be null. I intend to change this in 7.x so that all FP NaN
     1659values are treated as null. This will mean that code which can
     1660generate NaNs doesn't have to explicitly convert them to the GRASS
     1661null value.
    16411662
    16421663\section Color_Functions Color Functions (new and upgraded)
Note: See TracChangeset for help on using the changeset viewer.