[GRASS-user] v.out.ascii with vector created by v.net.allpairs

Johannes Radinger johannesradinger at gmail.com
Thu Jan 31 02:00:47 PST 2013


>
> You could
> 1) create new categories in a new layer with v.category
> 2) add columns from_cat, to_cat to the new layer
> 3) upload values by assigning from_cat (new layer) = cat (old layer)
> and to_cat (new layer) = to_cat (old layer)
>

That sounds like a good idea, but somehow I fail. What I did was:
1) create a new attribute table/layer for the vector point map with
v.db.addtable map="orig" table="new_table" layer=2

2) The second layer does have a cat column but without any entries
yet. So far so good
So I tried as you said to create new unique categories in this new layer with
v.category input=orig output=new layer=2

But here I get following error:
Copying attribute table(s)...
DBMI-SQLite driver error:
Error in sqlite3_step():
indexed columns are not unique
WARNING: Unable to create index for table <new_1>, key <cat>

v.category copies the map to a new one and tries to connect both
attribute tables....but there are no unique cat values in table/layer 1

Is it possible to update layer to without copying the whole map with
both layers (v.category)
to get new cats in layer 2...

Anyway it seems the easiest way is to just fetch the entries with
db.select as Markus said before.
...or to use GRASS7 :)

/johannes


More information about the grass-user mailing list