[GRASS-dev] [GRASS GIS] #1977: r.random.cells does not respect MASK
GRASS GIS
trac at osgeo.org
Thu May 23 00:10:25 PDT 2013
#1977: r.random.cells does not respect MASK
----------------------------------+-----------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: unspecified
Keywords: r.random.cells, mask | Platform: Unspecified
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by hamish):
Works for me -- random cells are only created in the MASKed areas. the
areas not covered by the MASK map are flood filled with "0". (use "r.null
setnull=0" to clear that away)
{{{
#spearfish
g.region rast=fields
g.copy fields,MASK
r.random.cells out=test.rrandcellsMASKed dist=500
g.remove MASK
}}}
... and random points only occur in places covered by the MASK map.
was your MASK map a CELL (integer) type?
see also the v.random.cover addon module, which may do something like what
you are looking for.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1977#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list