[GRASS-user] Bug or feature? v.net.alloc

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Tue Oct 6 06:51:27 EDT 2009


achim wrote:
> Hi,
> 
> there are three levels you have to think of:
> first level: geometry; every geometry element has an id number
> second level: category; category numbers can point to one or many
> geometry ids
> third level: database; in tables feature information is stored; every
> geometry(group) with a category can be addressed by the same (unique)
> numbers in a table with column 'cat'
> 
> Its not enough just to make new categories. You have to create the table
> with:
> 
> db.droptable -f table=yourtable ##if already one exists
> 
> v.db.connect -d map=yourtablesmap ##if you want to delete old connections
> 
> v.db.addtable map=yourtablesmap ##automatically columns="cat INTEGER"
> will be ran and each category of the map gets an entry; default is
> layer=1, so categories for layer one will be made; the tables name will
> be "yourtablesmap"; for layer=2 "yourtablesmap_2"...
> 
> Greets,
> Achim
> 
> 
> 
> PS:
> little script to renew categories
> 
> --%<--
> 
> ## INPUT:
> ##  $1 vector map with changed features
> ##  $2 layer of changed features
> ##  $3 type of features to change (line,point,boundary,...)
> ################################################
> 
> v.category input=$1       output=$1_nocat option=del  type=$3
> layer=$2 --o
> v.category input=$1_nocat output=$1                  type=$3 layer=$2 --o
> 
> --%<--

Try also v.db.reconnect.all
Nikos



More information about the grass-user mailing list