[GRASS-user] v.to.db problem

when I generate point map from line map as:

--- v.to.points input=e30a2top type=point,line,boundary,centroid output=nokta1 llayer=1 dmax=100

and to insert x,y coords of those points to db

--- GRASS 6.3.cvs (pro1):~/data > v.to.db map=nokta1 option=coor col=x,y
      Updating database ... WARNING: More elements of category 1, nothing loaded to DB
      WARNING: More elements of category 2, nothing loaded to DB
      and so on

cat values indicate more than one points then v.to.db does not properly.

I used v.category and generated new categories. It also gives another errors.

do you have any idea ?

regards

--
Ahmet Temiz

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

temiz napisał(a):

when I generate point map from line map as:

--- v.to.points input=e30a2top type=point,line,boundary,centroid output=nokta1 llayer=1 dmax=100

and to insert x,y coords of those points to db

--- GRASS 6.3.cvs (pro1):~/data > v.to.db map=nokta1 option=coor col=x,y
Updating database ... WARNING: More elements of category 1, nothing loaded to DB
WARNING: More elements of category 2, nothing loaded to DB
and so on

chmm it shoudn't be so...
v.to points creaate table with cat - new category; lcat - old line category and along cat is uniqe lcat - no. Didnt you do something with vector-database connection? which driver you use?

cat values indicate more than one points then v.to.db does not properly.

I used v.category and generated new categories. It also gives another errors.

which another errors?

do you have any idea ?

regards

temiz wrote:

when I generate point map from line map as:

--- v.to.points input=e30a2top type=point,line,boundary,centroid
output=nokta1 llayer=1 dmax=100

and to insert x,y coords of those points to db

--- GRASS 6.3.cvs (pro1):~/data > v.to.db map=nokta1 option=coor col=x,y
     Updating database ... WARNING: More elements of category 1, nothing
loaded to DB
     WARNING: More elements of category 2, nothing loaded to DB
     and so on

It looks like you have multiple vector features with the same category.

cat values indicate more than one points then v.to.db does not properly.

I used v.category and generated new categories. It also gives another
errors.

Drop the table connected to your vector, remove all categories from the
vector (v.category), assign unique categories (v.category), create the
table back, try v.to.db again.

Maciek

Maciej Sieczka wrote:

temiz wrote:
  

when I generate point map from line map as:

--- v.to.points input=e30a2top type=point,line,boundary,centroid
output=nokta1 llayer=1 dmax=100

and to insert x,y coords of those points to db

--- GRASS 6.3.cvs (pro1):~/data > v.to.db map=nokta1 option=coor col=x,y
     Updating database ... WARNING: More elements of category 1, nothing
loaded to DB
     WARNING: More elements of category 2, nothing loaded to DB
     and so on
    
It looks like you have multiple vector features with the same category.

cat values indicate more than one points then v.to.db does not properly.

I used v.category and generated new categories. It also gives another
errors.
    
Drop the table connected to your vector, remove all categories from the
vector (v.category), assign unique categories (v.category), create the
table back,

?? I am sorry. But, how can I establish relation between new categories and
the table's category. Aren't they so different ?

try v.to.db again.

Maciek

to clarify my question:
I produced point vector from topographic contour maps.
I tried to upload x,y coords and elevation value.

But

v.to.db does not use unique cat value of point map generated from v.to.points (1st layer's cat values are not unique.)

Is there any way to create new map from a map generated from v.to.points, which has one layer,unique cats, and
any field wanted ?
or any other way you think ?
regards

--
Ahmet Temiz

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

temiz wrote:

?? I am sorry. But, how can I establish relation between new categories and
the table's category. Aren't they so different ?

Temiz,

What do you mean by "table's category"?

to clarify my question:
I produced point vector from topographic contour maps.
I tried to upload x,y coords and elevation value.

But
v.to.db does not use unique cat value of point map generated from
v.to.points (1st layer's cat values are not unique.)

Is there any way to create new map from a map generated from
v.to.points, which has one layer,unique cats, and
any field wanted ? or any other way you think ?

OK. So you want to transfer an attribute from the v.to.points output's
layer 1 table into the layer 2 table, where each point has a unique
category. You also want to store points' x,y coords in the layer 2
table. Then you can do it like this:

# v.to.points, as you used it:

v.to.points input=e30a2top type=point,line,boundary,centroid
output=nokta1 llayer=1 dmax=100

# add x,y,z columns to layer 2 of the v.to.points output:

v.db.addcol nokta1 layer=2 col="x double, y double, z double"

# *assuming* the column name where the attribute is stored is "height"
# (replace it accordingly), to transfer it into nokta1 layer's 2 "z"
# column, do:

v.to.db map=nokta1 type=point option=query qlayer=1 qcolumn=height
layer=2 column=z

# now upload x,y coordinates:

v.to.db map=nokta1 type=point option=coor layer=2 column=x,y

As result, your nokta1 vector has two layers, with x,y,z values stored
in layer 2, where each point has a unique category.

Does that help?

Maciek