[GRASS-user] using v.line.center
Maciej Sieczka
tutey at o2.pl
Fri Jun 6 17:37:58 EDT 2008
Manuel Sangiao pisze:
> Hi all,
>
> after the reprojection in another mapset I used v.line.center, all
> ok. But, I obtain a new layer without database. The input layer have
> database.
v.line.center does not copy the input vector's table to output vector.
> v.db.connect -p glines1 Vector map <glines1> is connected by: layer
> <2> table <glines1> in database
> </scratch/manuel/GISDATA//admprojected/manuel/dbf/> through driver
> <dbf> with key <cat>
> I have read that the result layer (pts1) contains the category
> numbers of the input vector line layer.
>
> Is there a solution?
Yes. As the category numbers are the same, you can:
# given that the name of the v.line.center's input vector is "lines" and
# the output is "points":
# copy the input table:
db.copy from_table=lines to_table=points
# connect the table "points" to vector map "points":
v.db.connect points table=points
Now query (d.what.vect, v.db.select) to check if everything's OK.
Mind that I assume plenty of defaults in the example above - verify your
layer number, key column name etc. Refer to to commands's manuals.
Maciek
--
Maciej Sieczka
www.sieczka.org
More information about the grass-user
mailing list