[GRASSLIST:8965] sqlite and v.rast.stats problem

David Finlayson david.p.finlayson at gmail.com
Wed Nov 9 19:33:23 EST 2005


I am trying to calculate statistics for a raster DEM (PSDEM2005) using
the features in a vector coverage (blocksall). The vector contains a
series of blocks, each with a unique cat. I have stored the attribute
table in an sqlite3 database and according to v.db.connect it is
linked (I can also query and display attributes in this table using
d.vect):

GRASS 6.1.cvs (WASPN_NAD83):~ > v.db.connect -p blocksall
Vector map <blocksall> is connected by:
layer <1> table <blocksall> in database
</data/grass/WASPN_NAD83/hood/sqlite.db> through driver <sqlite> with
key <cat>

However, when I run v.rast.stats. I get an error asking me to run v.db.addtable:

GRASS 6.1.cvs (WASPN_NAD83):~ > v.rast.stats -c vector=blocksall 
raster=psdem2005 colprefix=elev30ft
List of categories found: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
42 43 44 45 46 47 48 ... <clipped> ...
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647
648 649
ERROR: Cannot continue (use v.db.addtable first).

I expected that v.rast.stats would have calculated statistics and
created columns in the sqlite database. This has worked using dbf
tables for me in the past. I am forgetting something here?

Thanks,

David
--
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA  98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays




More information about the grass-user mailing list