Details Ticket 4191


Comment | Reply | Take | Open


Serial Number 4191
Subject adding layers to vectors
Area grass6
Queue grass
Requestors kwythers@umn.edu
Owner none
Status resolved
Last User Contact Mon Feb 5 21:38:33 2007 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Tue Feb 6 00:16:46 2007 (2 yr ago)
Created Mon Mar 20 19:15:16 2006 (2 yr ago)

Transaction History Ticket 4191


Mon, Mar 20 2006 19:15:16    Request created by guest  
Subject: adding layers to vectors 

Platform: Mac OSX
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 6.1.cvs checked out 18032006

I can not seem to get more than one addtional layer to function correctly (connected
to db through 
popstgres). I am following the procedure: 

Starting with a vectro map connected through pg
1. Attach categories to vecot map with - v.category input=testmap output=testmap_new
option=add

2. Add layer to vector with - v.db.addtable map=testmap_new layer=2 columns="column1
int,column2 int,column3 int,column4 int"

Seems to work in that layer 2 is created (except that the cat column get populated
with 2218 
(1-2218), insted of  686 cats form the original vector (layer1)?

Example:

GRASS 6.1.cvs (minnesota_utm):~ > v.db.addtable map=t61nr9w_tvol layer=2 columns="cords
int,mbm int,poles int,posts int"
Using vector map name extended by layer number as table name: t61nr9w_tvol_2
WARNING: The table <t61nr9w_tvol_2> is now part of vector map
         <t61nr9w_tvol> and may be deleted or overwritten by GRASS modules.
WARNING: Select privileges were granted on the table.
Updating database ...  100%
2218 categories read from map
0 records selected from table
0 categories read from map exist in selection from table
2218 categories read from map don't exist in selection from table
2218 records updated/inserted
0 update/insert errors

Current attribute table links:
Vector map <t61nr9w_tvol> is connected by:
layer <1> table <t61nr9w_tvol> in database <host=localhost,dbname=kwythers> through
driver 
<pg> with key <cat>
layer <2> table <t61nr9w_tvol_2> in database <host=localhost,dbname=kwythers>
through driver 
<pg> with key <cat>

However, this procedure only seems to work for adding a second layer. If I repeat
the procedure to 
add a third layer, I get: 

GRASS 6.1.cvs (minnesota_utm):~ > v.db.addtable map=t61nr9w_tvol layer=3 columns="cords
int,mbm int,poles int,posts int"
Using vector map name extended by layer number as table name: t61nr9w_tvol_3
WARNING: The table <t61nr9w_tvol_3> is now part of vector map
         <t61nr9w_tvol> and may be deleted or overwritten by GRASS modules.
WARNING: Select privileges were granted on the table.
Updating database ...  100%
1 categories read from map
0 records selected from table
0 categories read from map exist in selection from table
0 categories read from map don't exist in selection from table
0 records updated/inserted
0 update/insert errors

Current attribute table links:
Vector map <t61nr9w_tvol> is connected by:
layer <1> table <t61nr9w_tvol> in database <host=localhost,dbname=kwythers> through
driver 
<pg> with key <cat>
layer <2> table <t61nr9w_tvol_2> in database <host=localhost,dbname=kwythers>
through driver 
<pg> with key <cat>
layer <3> table <t61nr9w_tvol_3> in database <host=localhost,dbname=kwythers>
through driver 
<pg> with key <cat>

Is this a bug?

While the 'cat' column in layer <2> is populated and shows up at the bottom of
the d.what.vect -e 
form, the 'cat column in layer <3> does not get populated and does not show up
on the d.what.vect 
form. I have tried a number of different approaches here with v.db.addtable,
v.category, and v.to.db, 
but this is as close as I can get. But only 2 layers (not the 7 additional layers
I am trying to create). 

Can anyone duplicate this behavior?







Mon, Feb 5 2007 21:38:33    Mail sent by mneteler  
Kirk,

I am not sure why you attach categories to vector in the first place.
Is that really needed?

Markus
Tue, Feb 6 2007 00:16:44    Comments added by mneteler  
From: Kirk Wythers 
Subject: Re: [bug #4191] (grass) adding layers to vectors
Date: Mon, 5 Feb 2007 17:08:25 -0600
To: Markus Neteler

ahhh... March 2006, no wonder I didn't recognize it. I think I got
that one sorted out. Thanks Markus.
Tue, Feb 6 2007 00:16:46    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request