[GRASS-dev] [GRASS GIS] #488: v.db.addcol/v.rast.stats not working

GRASS GIS trac at osgeo.org
Mon Feb 9 13:44:47 EST 2009


#488: v.db.addcol/v.rast.stats not working
--------------------------------------+-------------------------------------
 Reporter:  hellik                    |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect                    |      Status:  new                      
 Priority:  major                     |   Milestone:  6.4.0                    
Component:  Vector                    |     Version:  6.4.0 RCs                
 Keywords:  v.db.addcol v.rast.stats  |    Platform:  MSWindows Vista          
      Cpu:  Unspecified               |  
--------------------------------------+-------------------------------------
 osgeo4w (2008/02/08):
     grass64rc3-2
         GDAL 1.5.4, released 2009/01/07

 data:
     gisdemo_ncspm

         g.gisenv --v
                 GISDBASE='C:\gisdata\grassdata';
                 LOCATION_NAME='gisdemo_ncspm';
                 MAPSET='user1';
                 GRASS_GUI='wxpython';
                 "DEBUG='3"';

         r.random -d input=elevation at PERMANENT n=100 vector_output=vrand

         v.buffer --verbose input=vrand at user1 output=vrandb distance=10
 minordistance=10
         v.category input=vrandb at user1 output=vrandb2 at user1

         db.tables -p
                 streetstest
                 vrand

 => no table for vector vrandb2
 => create table for vector via "Attribute table manager-Manage Layer -
 Create table":
         Table Description: Table name => vrandb, Key colomn => cat

         db.tables -p
                 streetstest
                 vrand
                 vrandb2

 => add layer and set to default via "Attribute table manager-Manage Layer
 - Add layer"

         v.info map=vrandb2 at user1
 +----------------------------------------------------------------------------+
  | Layer:           vrandb2 at user1
 |
  | Mapset:          user1
 |
  | Location:        gisdemo_ncspm
 |
  | Database:        C:\gisdata\grassdata
 |
  | Title:
 |
  | Map scale:       1:1
 |
  | Map format:      native
 |
  | Name of creator: syringia
 |
  | Organization:
 |
  | Source date:     Mon Feb 09 18:08:02 2009
 |
 |----------------------------------------------------------------------------|
  |   Type of Map:  vector (level: 2)
 |
  |
 |
  |   Number of points:       0               Number of areas:      100
 |
  |   Number of lines:        0               Number of islands:    100
 |
  |   Number of boundaries:   100             Number of faces:      0
 |
  |   Number of centroids:    100             Number of kernels:    0
 |
  |
 |
  |   Map is 3D:              No
 |
  |   Number of dblinks:      1
 |<=
  |
 |
  |         Projection: Lambert Conformal Conic
 |
  |               N:   228129.97668769    S:   215100.02331231
 |
  |               E:            644720    W:   630530.09314054
 |
  |
 |
  |   Digitization threshold: 0
 |
  |   Comments:
 |
  |
 |
 +----------------------------------------------------------------------------+

 => table/layer linked

 => check table/coloumns in vrandb2-table

         db.columns table=vrandb2
                 cat

         db.describe -c table=vrandb2
                 ncols: 1
                 nrows: 100
                 Column 1: cat:INTEGER:11

         v.info -c map=vrandb2 at user1
                 Displaying column types/names for database connection of
                 layer 1:
                 INTEGER|cat

 => example from the manual: v.db.addcol sentiero_brenta_points
 columns="slope double precision"
 => add new coloumn in vrandb2-table:

         v.db.addcol map=vrandb2 at user1 columns="barea double precision"

                 C:/OSGeo4W/apps/grass/grass-6.4.0RC3/scripts/v.db.addcol:
                 eval: line 1: unexpected EOF while looking for matching
 `''
                 C:/OSGeo4W/apps/grass/grass-6.4.0RC3/scripts/v.db.addcol:
                 eval: line 2: syntax error: unexpected end of file
                 C:/OSGeo4W/apps/grass/grass-6.4.0RC3/scripts/v.db.addcol:
                 GISDBASE: parameter null or not set

 => no column added

         v.info -c map=vrandb2 at user1
                 Displaying column types/names for database connection of
                 layer 1:
                 INTEGER|cat

 => similar error messages for v.rast.stat

         g.region -p rast=elevation at PERMANENT

         v.rast.stats -e --verbose vector=vrandb2 at user1
 raster=elevation at PERMANENT colprefix=els

                 C:/OSGeo4W/apps/grass/grass-6.4.0RC3/scripts/v.rast.stats:
                 eval: line 1: unexpected EOF while looking for matching
 `''
                 C:/OSGeo4W/apps/grass/grass-6.4.0RC3/scripts/v.rast.stats:
                 eval: line 2: syntax error: unexpected end of file
                 C:/OSGeo4W/apps/grass/grass-6.4.0RC3/scripts/v.rast.stats:
                 GISDBASE: parameter null or not set

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/488>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list