Opened 8 years ago
Last modified 5 years ago
#3263 new enhancement
r.to.vect: option to filter raster values
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.3 |
Component: | Raster | Version: | svn-trunk |
Keywords: | r.to.vect, values | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
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
Attachments (1)
Change History (13)
comment:1 by , 8 years ago
by , 8 years ago
Attachment: | r-to-vect-values.diff added |
---|
Dirty way of implementation values option for r.to.vect
comment:4 by , 6 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:5 by , 6 years ago
Milestone: | 7.4.2 → 7.6.0 |
---|
All enhancement tickets should be assigned to 7.6 milestone.
comment:8 by , 6 years ago
Milestone: | 7.6.2 → 7.8.0 |
---|
comment:12 by , 5 years ago
Milestone: | → 7.8.3 |
---|
Note:
See TracTickets
for help on using tickets.
The attached patch attachment:r-to-vect-values.diff shows quick & dirty way of implementing
values
option for G72:r.to.vect. This patch takes code from G72:d.rast
module (mask.c
,mask.h
andparselist.c
) which is not acceptable because of code duplication. The duplicated code should be moved tolibgis
for real implementation.