[GRASS-dev] [GRASS GIS] #3415: Mark raster NULL values as None in PyGRASS
GRASS GIS
trac at osgeo.org
Thu Sep 7 03:33:12 PDT 2017
#3415: Mark raster NULL values as None in PyGRASS
-------------------------+-------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.0
Component: PyGRASS | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
At the moment PyGRASS is providing raster NULL values as is (i.e. for CELL
type they are marked as -2147483648). There is no function to check if
value is NULL (in C it is done with Rast_is_c/f/d_null_value).
The best would be to replace raster NULL values with None when raster is
read and None with NULL representation when it is written back. Such
approach would greatly simplify use of rasters in PyGRASS (i.e. "if
myrast[row][col] is not None:")
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3415>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list