[GRASS-user] Connecting Vectors to Attribute Tables

Andrew Lewin andrew.lewin at sympatico.ca
Tue Mar 2 15:14:58 EST 2010


Dear All,

I am having some difficulty viewing an attribute table from a vector  
file that is connected to a sqlite database table.

Here is the terminal snippet of my commands with errors:

GRASS 6.4.0RC5 (SantaMonicaBayMM):~ > v.in.db driver=sqlite database=/ 
USers/andrewlewin/MM_SMB.db table=MMSightings1 x=LONG y=LAT key=cat  
out=MMSightings_layer2Writing features...
  100%
Copying attributes...
DBMI-SQLite driver error:
Cannot scan date:"Date"

WARNING: Unable to fetch data from table <MMSightings1>
WARNING: Unable to copy table
Building topology for vector map <MMSightings_layer2>...
Registering primitives...
1897 primitives registered
1897 vertices registered
Building areas...
  100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
  100%
Number of nodes: 1803
Number of primitives: 1897
Number of points: 1897
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
v.in.db complete. 1897 points written to vector map.
GRASS 6.4.0RC5 (SantaMonicaBayMM):~ > v.info MMSightings_layer2
   
+ 
----------------------------------------------------------------------------+
  | Layer:            
MMSightings_layer2                                        |
  | Mapset:           
PERMANENT                                                 |
  | Location:         
SantaMonicaBayMM                                          |
  | Database:        /Users/andrewlewin/ 
grass                                  |
  |  
Title 
:                                                                     |
  | Map scale:        
1:1                                                       |
  | Map format:       
native                                                    |
  | Name of creator:  
andrewlewin                                               |
  |  
Organization 
:                                                              |
  | Source date:     Tue Mar  2 15:03:07  
2010                                  |
   
| 
----------------------------------------------------------------------------|
  |   Type of Map:  vector (level:  
2)                                          |
   
| 
                                                                             |
  |   Number of points:       1897            Number of areas:       
0          |
  |   Number of lines:        0               Number of islands:     
0          |
  |   Number of boundaries:   0               Number of faces:       
0          |
  |   Number of centroids:    0               Number of kernels:     
0          |
   
| 
                                                                             |
  |   Map is 3D:               
No                                               |
  |   Number of dblinks:       
0                                                |
   
| 
                                                                             |
  |         Projection:  
x,y                                                    |
  |               N:     34:58:27.012N    S:                  
0                 |
  |               E:                 0    W:      
119:18:54.72W                 |
   
| 
                                                                             |
  |   Digitization threshold:  
0                                                |
  |    
Comments 
:                                                                |
   
| 
                                                                             |
   
+ 
----------------------------------------------------------------------------+

GRASS 6.4.0RC5 (SantaMonicaBayMM):~ > v.info -c MMSightings_layer2
ERROR: Database connection for map <MMSightings_layer2> is not defined  
in
        DB file
GRASS 6.4.0RC5 (SantaMonicaBayMM):~ > v.db.connect  
map=MMSightings_layer2 table=MMSightings driver=sqlite database=/Users/ 
andrewlewin/MM_SMB.db
The table <MMSightings> is now part of vector map <MMSightings_layer2>  
and
may be deleted or overwritten by GRASS modules
DBMI-SQLite driver error:
Cannot create index:
create unique index MMSightings_cat on MMSightings ( cat )
table MMSightings has no column named cat

WARNING: Cannot create index
Select privileges were granted on the table
GRASS 6.4.0RC5 (SantaMonicaBayMM):~ > v.db.connect -p  
map=MMSightings_layer2
Vector map <MMSightings_layer2 at PERMANENT> is connected by:
layer <1> table <MMSightings> in database </Users/andrewlewin/ 
MM_SMB.db> through driver <sqlite> with key <cat>

There are errors from the point at which I try to make a point vector  
from the table.  Any help would be appreciated.

Andrew

Andrew Lewin, M.Sc., Adv. Dipl. GIS
Email: andrew.lewin at sympatico.ca
Tel: (905) 639-4646
Mobile: (905) 630-8441
Skype: andrew.lewin99



More information about the grass-user mailing list