[GRASS-dev] [GRASS GIS] #3848: Unexpected error with v.what.rast and v.rast.stats
GRASS GIS
trac at osgeo.org
Fri May 17 00:05:27 PDT 2019
#3848: Unexpected error with v.what.rast and v.rast.stats
-------------------------+-------------------------
Reporter: micha | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.6.2
Component: Default | Version: unspecified
Keywords: | CPU: Unspecified
Platform: All |
-------------------------+-------------------------
In general vector modules do not check or honor region settings. (The
exception is v.to.rast, and this is specifically mentioned in the manual).
However both v.rast.stats and v.what.rast require that the computational
region covers the vector being queried.
When running either of these modules with region settings that do **not**
cover the vector, the error messages are unhelpful, even misleading:
{{{
micha at TP480:~$ v.what.rast weir7 rast=dem_4m col=dem type=centroid
Reading features from vector map...
No features of type (centroid) found in vector map <weir7>
micha at TP480:~$ v.rast.stats weir7 rast=dem_4m column_pref=dem
ERROR: No categories found in raster map
}}}
I suggest to add text to the man page of both, similar to the explanation
in v.to.rast:
v.to.rast will only affect data in areas lying inside the boundaries
of the current geographic region. A grid cell belongs to the area where
the grid cell center falls into.
Before running v.to.rast, the user should therefore ensure that the
current geographic region is correctly set and that the region resolution
is at the desired level.
In addition, it would be helpful to modify the code of both modules to
check region settings and output a relevant error message if the vector is
outside the current region.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3848>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list