[GRASS-dev] [GRASS GIS] #3263: r.to.vect: option to filter raster values
GRASS GIS
trac at osgeo.org
Tue Jan 17 09:56:51 PST 2017
#3263: r.to.vect: option to filter raster values
-------------------------------+-------------------------
Reporter: martinl | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.4.0
Component: Raster | Version: svn-trunk
Keywords: r.to.vect, values | CPU: Unspecified
Platform: Unspecified |
-------------------------------+-------------------------
It would be useful to introduce for G72:r.to.vect `values` option
similarly to G72:d.rast for filtering raster values. Let's say that we
have viewshed map with two categories (1 - visible, 0 - invisible):
{{{
r.category viewA
0
1
}}}
We would like convert to vector map only visible areas. Currently we need
to run G72:r.mapcalc or G72:r.reclass to be able to perform this task:
{{{
r.mapcalc expr='viewA1 = if(viewA == 0, null(), 1)'
r.to.vect -sv input=viewA1 out=viewA type=area -t
}}}
With `values` option we could perform this task by running just one
command:
{{{
r.to.vect -sv input=viewA out=viewA type=area -t values=1
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3263>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list