[GRASS-dev] [GRASS GIS] #1838: r.mask: allow use of vector map as input
GRASS GIS
trac at osgeo.org
Mon May 20 03:21:20 PDT 2013
#1838: r.mask: allow use of vector map as input
--------------------------+-------------------------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: enhancement | Status: closed
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Resolution: fixed | Keywords: mask, vector, r.mask
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment(by nikosa):
Replying to [comment:2 mmetz]:
> Replying to [comment:1 neteler]:
> > Sounds very reasonable. Maybe they can develop the method? It will
include
> > (perhaps) SQL select option and column selection, then the
rasterization...
>
> `r.mask` got new `vector`, `layer`, `cats`, and `where` options in
r54302. The `input` option has been renamed to `raster`.
..
> When a MASK is created from a raster, the extents and resolution of the
raster map are used because r.reclass is used (that's the unchanged
default behaviour as in GRASS 6), but when a MASK is created from a
vector, the current region settings are used.
Thanks!
Nevertheless, currently, if the region extent doesn't match, the produced
raster MASK is empty. Manually, I need to extract the vector features of
my interest (`v.extract`), set the region (`g.region vect=`) and then use
`r.mask` along with the `vector=` option.
Would it be easy to make the region adjustment, when using a vector,
automatic? Even if the user supplies an where="SQL clause"? If this action
is not difficult to code, are there reasons for a user he would not want
to match (at least) the region extent to the queried vector map?
I need to integrate in a script this exact operation (hardcoded example
here, the idea is to support scripting of course):
{{{
r.mask vect=wrs2_descending where="PATH=161 and ROW=076"
}}}
It would be nicer to get this done automatically.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1838#comment:5>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list