[GRASS-dev] [GRASS GIS] #3598: v.rast.stats: limit region extent to that of vector

GRASS GIS trac at osgeo.org
Tue Jun 26 21:51:10 PDT 2018

#3598: v.rast.stats: limit region extent to that of vector
 Reporter:  mlennert             |      Owner:  grass-dev@…
     Type:  enhancement          |     Status:  new
 Priority:  normal               |  Milestone:  7.6.0
Component:  Vector               |    Version:  unspecified
 Keywords:  v.rast.stats region  |        CPU:  Unspecified
 Platform:  Unspecified          |
 Currently, v.rast.stats follows general GRASS GIS procedure and respects
 the current computational region. This means that it rasterizes the vector
 map and creates a raster map of the size of that region. If the vector map
 only covers a very small portion of the current region, this means a lot
 of wasted computing resources and time.

 v.rast.stats already slightly changes the current region by aligning it to
 the raster. By also limiting the extent to the vector (see attached
 patch), computational time can potentially be significantly reduced.

 Two questions before I apply:

 * As the expected behavior of v.rast.stats is to get stats for the
 features in the vector map, limiting the region extent to that of the
 vector does not change anything in the results and rather is in line with
 expected behavior. Any objection ?

 * Is there a risk that by using the vector extent, but aligning to the
 raster, we lose some edge parts of the vector features ? Or does aligning
 always extend the region to beyond the request extent ?

Ticket URL: <https://trac.osgeo.org/grass/ticket/3598>
GRASS GIS <https://grass.osgeo.org>

More information about the grass-dev mailing list