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

Hi all,

I am using v.net.alloc to create 'catchments' for traffic stations. Working flawlessly so far...
I see categories with 'v.category resultmap option=report' and it visualizes also the resultmap with categories.

But if I do a v.info -c on the resultmap I get a warming that no DB connection is defined. This is the part where I miss the 'new' information. If I want to go on working with the newly defined 'catchments' I have to export them as Shape or something else and reimport it again to have the cats in the table.
Is this foreseen like that?

cheers
Christian

------------------------------------------------------------
Dipl. Geogr. Christian Braun
Tel: +352- 425991-608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg

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

--%<--

Christian Braun schrieb:

Hi all,

I am using v.net.alloc to create 'catchments' for traffic stations.
Working flawlessly so far...
I see categories with 'v.category resultmap option=report' and it
visualizes also the resultmap with categories.

But if I do a v.info -c on the resultmap I get a warming that no DB
connection is defined. This is the part where I miss the 'new'
information. If I want to go on working with the newly defined
'catchments' I have to export them as Shape or something else and
reimport it again to have the cats in the table.
Is this foreseen like that?

cheers
Christian

------------------------------------------------------------
Dipl. Geogr. Christian Braun
Tel: +352- 425991-608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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

So, it is a feature of v.net.alloc that v.db.addtable isn't done automatically for resulting data set?

cheers
Christian

On 06.10.2009, at 12:28, 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

--%<--

Christian Braun schrieb:

Hi all,

I am using v.net.alloc to create 'catchments' for traffic stations.
Working flawlessly so far...
I see categories with 'v.category resultmap option=report' and it
visualizes also the resultmap with categories.

But if I do a v.info -c on the resultmap I get a warming that no DB
connection is defined. This is the part where I miss the 'new'
information. If I want to go on working with the newly defined
'catchments' I have to export them as Shape or something else and
reimport it again to have the cats in the table.
Is this foreseen like that?

cheers
Christian

------------------------------------------------------------
Dipl. Geogr. Christian Braun
Tel: +352- 425991-608
Mobil: +49-179-6845896
Mail: christian.braun@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
Technoport Schlassgoart,
66 rue de Luxembourg,
P.O. BOX 144,
L-4002 Esch-sur-Alzette, Luxembourg

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Christian,

I wished to have this as an option... I had exactly the same problem
some month ago. Now we are two, it becomes a bigger wish :wink:

So, it is a feature of v.net.alloc that v.db.addtable isn't done
automatically for resulting data set?

So: Its neither a bug nor a feature. Its a missing option.

Achim