[GRASS-dev] [GRASS GIS] #1222: v.rast.stats returns error: global name 'vector' is not defined

#1222: v.rast.stats returns error: global name 'vector' is not defined
--------------------------+-------------------------------------------------
Reporter: akbgf | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: unspecified
Keywords: v.rast.stats | Platform: Linux
      Cpu: x86-32 |
--------------------------+-------------------------------------------------
Command

   v.rast.stats -e input=ma3935@CHRIS raster=5703_14r@CHRIS colprefix=ma_14

returns error: global name 'vector' is not defined.

GRASS 7.0 compiled from weekly source grass-7.0.svn_src_sn
apshot_2010_11_20,

OpenSUSE-11.1 Linux 2.6.27.54-0.1-pae;
Intel Pentium 4 CPU 3.00GHz

./configure --enable-shared --with-postgres --with-gdal=/usr/local/bin
/gdal-config --with-postgres-includes=/usr/include/pgsql/ --with-postgres-
libs=/usr/lib/postgresql --without-freetype

Raster map:
Type of Map: raster;
Data Type: CELL;
Rows: 744; Columns: 744;
Number of Categories: 10599

Vector map:
Type of map: vector (level: 1);
Number of points: 0; Number of centroids: 1;
Number of lines: 0; Number of boundaries: 7;
Number of areas: 0; Number of islands: 0;
Map is 3D: No;
Number of dblinks: 1

The vector area is inside the raster map.

The full command output is in the attached file.

Thank you!
Andres Kuusk;
Tartu Observatory, Estonia;
andres@aai.ee

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1222&gt;
GRASS GIS <http://grass.osgeo.org>

#1222: v.rast.stats returns error: global name 'vector' is not defined
--------------------------+-------------------------------------------------
Reporter: akbgf | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: unspecified
Keywords: v.rast.stats | Platform: Linux
      Cpu: x86-32 |
--------------------------+-------------------------------------------------

Comment(by mmetz):

Fixed in r44395.

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1222#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1222: v.rast.stats returns error: global name 'vector' is not defined
--------------------------+-------------------------------------------------
Reporter: akbgf | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: unspecified
Keywords: v.rast.stats | Platform: Linux
      Cpu: x86-32 |
--------------------------+-------------------------------------------------

Comment(by mmetz):

I have made some more changes:

* input vector key changed to vector, as in 6.x

* the temporary region is now aligned to the raster instead of just
setting the region resolution to the raster, avoiding grid shifts and
slightly inaccurate results

* -nan is now converted to NULL and not left as -nan (-nan can sometimes
occur)

* the table key column is no longer hardcoded to cat, instead the actual
table key column is used

* speed up by using the zonal functionality of r.univar (number of
categories times faster)

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1222#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1222: v.rast.stats returns error: global name 'vector' is not defined
---------------------+------------------------------------------------------
  Reporter: akbgf | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Resolution: fixed | Keywords: v.rast.stats
  Platform: Linux | Cpu: x86-32
---------------------+------------------------------------------------------
Changes (by akbgf):

  * status: new => closed
  * version: unspecified => svn-trunk
  * resolution: => fixed

Comment:

r44483 works.

Great!

Thank you, Andres Kuusk, Tartu Observatory, Estonia

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1222#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>