[GRASS-user] tables connection in database

achim ak7 at jupiter.uni-freiburg.de
Fri Jun 26 12:14:29 EDT 2009

Sorry when getting on nerves with this stupid problem...
...for me its not stupid, but also getting on nerves.

...I always did and do:
v.category --overwrite input=my_lines at achim output=my_lines2 type=line 
Vector map <my_lines2> already exists and will be overwritten
Processing features...
Copying attribute table(s)...
Building topology for vector map <my_lines2>...
Registering primitives...
    20002326 primitives registered
4652 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 2410
Number of primitives: 2326
Number of points: 0
Number of lines: 2326
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
v.category complete. 2326 features modified.

...now I get:
v.category -g input=my_lines2 at achim output=my_lines2 option=report type=line
1 line 2326 1 2326
1 all 2326 1 2326

...but nothing is seen with 'table manager'...
(because categorization is to store 'hard' in the geometry layer and not 
'soft' in the corresponding table. For this a v.to.db has to be done?)

v.to.db map=my_lines2 at achim option=cat
Reading features...
Updating database...
2326 categories read from vector map (layer 1)
2326 categories read from vector map don't exist in selection from table
2326 records updated/inserted (layer 1)

...and all is done. All I wanted is seen with 'table manager'!

 > If you really want cat values for your boundaries, again: use v.category
 > option=add type=boundary
eg. sometimes it is useful to describe features of borders between two 
areas with v.to.db -option=sides

More on my wishes..later in a mail.

For now: thank you very much for helping! Sometimes a spoken word and a 
little hint in physical presence is easier. But maybe one or another can 
avoid mistakes reading this.

Best regards,

Moritz Lennert wrote:
> On 26/06/09 17:15, achim wrote:
>>> Thats exactly the problem: It shows nothing.
>>> None of my lines has any cat.
> That's why you have to run v.category option=add as I indicated in a 
> previous mail.
>> Another example where it works partly:
>>  |   Type of Map:  vector (level: 2)
>>  |   Number of points:       1               Number of areas:      56
>>  |   Number of lines:        0               Number of islands:    1
>>  |   Number of boundaries:   255             Number of faces:      0
>>  |   Number of centroids:    56              Number of kernels:    0
>>  |
>>  |   Map is 3D:              No
>>  |   Number of dblinks:      1
>> successfully created a table with 57 entries
>> ?->.
> What is the problem ?
>> And now: how to do the same with boundaries?
> Why do you want your boundaries to have category values ? An area in 
> GRASS is defined by the combination of boundaries with a centroid and 
> the attribute data is attached to the centroid, not to the boundary.
> If you really want cat values for your boundaries, again: use v.category 
> option=add type=boundary.
> Have you read:
> http://grass.itc.it/grass64/manuals/html64_user/vectorintro.html
> http://grass.osgeo.org/wiki/Vector_Database_Management
> ?
> Moritz
> Moritz

More information about the grass-user mailing list