[GRASS-dev] [GRASS GIS] #1838: r.mask: allow use of vector map as input

Paulo van Breugel p.vanbreugel at gmail.com
Mon May 20 07:39:02 PDT 2013


If you have a vector layer with (some) polygons that occur partly within
the region of interest, finding the area that should become a mask means in
that case spitting the polygon(s). Yes, of course you could do that, but
you can equally well (easier in fact) set the region to match your vector
layer (or the region of interest) manually.

An exception? I don't know, each user will use the functions available in a
different way. I personally would prefer the current implementation, or
more in general, to avoid functions to set the region automatically. In my
opinion that better fits the general work flow in GRASS: the user
explicitly sets the region, and functions operate on that region.

On the other hand, r.mask with a raster as input is an exception as
mentioned already mentioned, and one could argue that it is better to have
the same behaviour both when using raster or vector as input.

It is important thought that r.mask does not change the region if you use
raster as input, and that is something I really think should remain the
case when using a vector as input. That means that even if you would
implement the suggestion above, adjusting the region to the extend of the
vector layer before creating the mask, that region should be set back to
the initial extend after the mask is created.



On Mon, May 20, 2013 at 3:15 PM, GRASS GIS <trac at osgeo.org> wrote:

> #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:6 pvanbosgeo]:
>  > One reason a user would not want to match the region extent to the
>  queried vector map could be that he/she is only interested in an area that
>  partly overlaps with the vector map, with polygons falling only partly
>  within the region. This still works with our suggestion, but only if the
>  region is set back to the initial one after the mask is created I guess.
>
>  If a user is interested in an area that partly overlaps with the vector
>  map, he doesn't really want to
>
>  {{{
>  r.mask vector=SomeVector
>  }}}
>
>  He rather needs to manually find the area of interest that will become a
>  MASK.  This sounds as an exception, rather than a general rule. What do
>  you think?
>
>  Thanks
>
> --
> Ticket URL: <http://trac.osgeo.org/grass/ticket/1838#comment:7>
> GRASS GIS <http://grass.osgeo.org>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20130520/70736bb6/attachment.html>


More information about the grass-dev mailing list