[GRASS-dev] [GRASS GIS] #3415: Mark raster NULL values as None in PyGRASS

GRASS GIS trac at osgeo.org
Sun Sep 10 08:21:42 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
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by marisn):

 You have a good point. As long as loading/saving can cope with whatever is
 the NULL representation, a constant variable for grass.pygrass.raster
 would do. I.e. grass.pygrass.raster.NULL that gets set to representation
 of NULL for particular map when the map gets opened/created. Thus it
 wouldn't matter if map is CELL or FCELL. In code one could then use
 `map[row][cell] != map.NULL` to check for not NULL and `map[row][col] =
 map.NULL` to set to NULL.
 If nobody comes up with objection why it is a bad idea, could you, please,
 implement it?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3415#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list