[GRASS-user] merging 2 line segments in a vector

Hi all,

i digitized a line layer in grass6.1cvs(from last week). Now I want to merge 3
linesegments in the layer to be one segment. Is there a methode/tool to do this
topological task (I could not find any in v.clean)?

Cheers
Michael

i digitized a line layer in grass6.1cvs(from last week). Now I want to
merge 3 linesegments in the layer to be one segment. Is there a
methode/tool to do this topological task (I could not find any in
v.clean)?

try v.build.polylines

Hamish

Zitat von Hamish <hamish_nospam@yahoo.com>:

> i digitized a line layer in grass6.1cvs(from last week). Now I want to
> merge 3 linesegments in the layer to be one segment. Is there a
> methode/tool to do this topological task (I could not find any in
> v.clean)?

try v.build.polylines

Thanks, the geometry/topology was modified as expected. But there is a problem
with the attributes.

The input map has a table with attributes but v.build.polylines does not write a
table for the output map as described in the manual. Any ideas?

Cheers
Michael

Hello Michael,

On Thu, 8 Jun 2006 17:41:59 +0200 Michael Fecht
<Michael.Fecht@uibk.ac.at> wrote:

Zitat von Hamish <hamish_nospam@yahoo.com>:

> > i digitized a line layer in grass6.1cvs(from last week). Now I
> > want to merge 3 linesegments in the layer to be one segment. Is
> > there a methode/tool to do this topological task (I could not
> > find any in v.clean)?
>
>
> try v.build.polylines
>
Thanks, the geometry/topology was modified as expected. But there is
a problem with the attributes.

The input map has a table with attributes but v.build.polylines does
not write a table for the output map as described in the manual. Any
ideas?

AFAIK the table does not get altered, because the program does not
know which attribute will be assigned to the new vector.

But I may be wrong.

Best
  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

Hello Stephan,

> > > i digitized a line layer in grass6.1cvs(from last week). Now I
> > > want to merge 3 linesegments in the layer to be one segment. Is
> > > there a methode/tool to do this topological task (I could not
> > > find any in v.clean)?
> >
> >
> > try v.build.polylines
> >
> Thanks, the geometry/topology was modified as expected. But there is
> a problem with the attributes.
>
> The input map has a table with attributes but v.build.polylines does
> not write a table for the output map as described in the manual. Any
> ideas?

AFAIK the table does not get altered, because the program does not
know which attribute will be assigned to the new vector.

It should be possible!

Extracted from the manual:
If the lines that make up a polyline have different attribute values then
v.build.polylines will set the attribute value of the polyline to that of the
last line (this is the behaviour of v.build, which is used to assign the
attribute values).

Cheers
Michael

Hello Stephan,

> > > i digitized a line layer in grass6.1cvs(from last week). Now I
> > > want to merge 3 linesegments in the layer to be one segment. Is
> > > there a methode/tool to do this topological task (I could not
> > > find any in v.clean)?
> >
> >
> > try v.build.polylines
> >
> Thanks, the geometry/topology was modified as expected. But there is
> a problem with the attributes.
>
> The input map has a table with attributes but v.build.polylines does
> not write a table for the output map as described in the manual. Any
> ideas?

AFAIK the table does not get altered, because the program does not
know which attribute will be assigned to the new vector.

It should be possible!

Extracted from the manual:
If the lines that make up a polyline have different attribute values then
v.build.polylines will set the attribute value of the polyline to that of the
last line (this is the behaviour of v.build, which is used to assign the
attribute values).

Cheers
Michael

On Thu, 8 Jun 2006 19:36:04 +0200
Michael Fecht <Michael.Fecht@uibk.ac.at> wrote:

Hello Stephan,
> > > > i digitized a line layer in grass6.1cvs(from last week). Now I
> > > > want to merge 3 linesegments in the layer to be one segment.
> > > > Is there a methode/tool to do this topological task (I could
> > > > not find any in v.clean)?
> > >
> > >
> > > try v.build.polylines
> > >
> > Thanks, the geometry/topology was modified as expected. But there
> > is a problem with the attributes.
> >
> > The input map has a table with attributes but v.build.polylines
> > does not write a table for the output map as described in the
> > manual. Any ideas?
>
> AFAIK the table does not get altered, because the program does not
> know which attribute will be assigned to the new vector.
It should be possible!

Extracted from the manual:
If the lines that make up a polyline have different attribute values
then v.build.polylines will set the attribute value of the polyline
to that of the last line (this is the behaviour of v.build, which is
used to assign the attribute values).

I'm not sure if the manual reflects the current v.build.polylines
state. It looks like a copy/paste from the old Grass 5 manual.

I suppose this paragraph might reffer to category numbers (a vector
feature), not to attributes stored in table.

Try hhis:

Copy the original table (db.copy) and connect the copied one with
v.build.polylines output (v.db.connect).

Now you can also get rid of redundant datatable rows by v.extract with
only input and output specified (which will output your vector copy with
a table containing only rows which have a corresponding vector feature).

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

Hello Maciek,

Zitat von Maciek Sieczka <werchowyna@epf.pl>:

On Thu, 8 Jun 2006 19:36:04 +0200
Michael Fecht <Michael.Fecht@uibk.ac.at> wrote:

> Hello Stephan,
> > > > > i digitized a line layer in grass6.1cvs(from last week). Now I
> > > > > want to merge 3 linesegments in the layer to be one segment.
> > > > > Is there a methode/tool to do this topological task (I could
> > > > > not find any in v.clean)?
> > > >
> > > >
> > > > try v.build.polylines
> > > >
> > > Thanks, the geometry/topology was modified as expected. But there
> > > is a problem with the attributes.
> > >
> > > The input map has a table with attributes but v.build.polylines
> > > does not write a table for the output map as described in the
> > > manual. Any ideas?
> >
> > AFAIK the table does not get altered, because the program does not
> > know which attribute will be assigned to the new vector.
> It should be possible!
>
> Extracted from the manual:
> If the lines that make up a polyline have different attribute values
> then v.build.polylines will set the attribute value of the polyline
> to that of the last line (this is the behaviour of v.build, which is
> used to assign the attribute values).

I'm not sure if the manual reflects the current v.build.polylines
state. It looks like a copy/paste from the old Grass 5 manual.

I suppose this paragraph might reffer to category numbers (a vector
feature), not to attributes stored in table.

Try hhis:

Copy the original table (db.copy) and connect the copied one with
v.build.polylines output (v.db.connect).

Sounds good but did not work. Probably because all features in my
v.build.polylines output have the category number 0. But there is no cat 0 in
the original table. So a connection with v.db.connect "fails".

Cheers
Michael

Now you can also get rid of redundant datatable rows by v.extract with
only input and output specified (which will output your vector copy with
a table containing only rows which have a corresponding vector feature).

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko
najlepsze z nich!
http://katalog.panoramainternetu.pl/

Hello Michael,

On Sun, 11 Jun 2006 21:47:48 +0200 Michael Fecht
<Michael.Fecht@uibk.ac.at> wrote:

> Copy the original table (db.copy) and connect the copied one with
> v.build.polylines output (v.db.connect).
>
Sounds good but did not work. Probably because all features in my
v.build.polylines output have the category number 0. But there is no
cat 0 in the original table. So a connection with v.db.connect
"fails".

You cold try to build new categories using v.category and then upload
the new cats into a new table.

v.category
v.db.addtable
v.to.db op=cat

Perhaps this is a solution for you?

Best
  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

On Sun, 11 Jun 2006 21:47:48 +0200
Michael Fecht <Michael.Fecht@uibk.ac.at> wrote:

Hello Maciek,

Zitat von Maciek Sieczka <werchowyna@epf.pl>:

<anip>

> Try hhis:
>
> Copy the original table (db.copy) and connect the copied one with
> v.build.polylines output (v.db.connect).
>
Sounds good but did not work. Probably because all features in my
v.build.polylines output have the category number 0. But there is no
cat 0 in the original table. So a connection with v.db.connect
"fails".

Anyway, nice try ;).

Sorry.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/