[GRASSLIST:9123] Line to point

Dear Listers

I need to create a new point vector layer where the points are located in
the middle point of each line in a line vector layer.

It is something like line to point where the point is located in the middle
of the line (and keep the attributes of the line).

Any idea of how to do that in GRASS 6.1

Thanks in advance.

Jonathan Aguero Valverde, MS

Graduate Student

Civil and Environmental Engineering

The Pennsylvania State University

On Thu, 17 Nov 2005 15:58:43 -0500
"Jonathan Aguero" <jua130@psu.edu> wrote:

Dear Listers

I need to create a new point vector layer where the points are located in
the middle point of each line in a line vector layer.

It is something like line to point where the point is located in the middle
of the line (and keep the attributes of the line).

Any idea of how to do that in GRASS 6.1

I've never done this before but think you should be able to use v.to.db to come up with the distances
to middle of each line and load that to the attribute table and then use v.to.db in conjunction with v.segment to create a point file based on those mid points.

Someone else on the list might have a better idea, but that is where I would start.

T
--
Trevor Wiens
twiens@interbaun.com

The significant problems that we face cannot be solved at the same
level of thinking we were at when we created them.
(Albert Einstein)

I need to create a new point vector layer where the points are located
in the middle point of each line in a line vector layer.

It is something like line to point where the point is located in the
middle of the line (and keep the attributes of the line).

Any idea of how to do that in GRASS 6.1

There was talk of this some time ago on one of the GRASS mailing lists,
try searching the archives for the answer. (maybe a year ago?)

from memory the solution was something like:

v.to.db option=length

dividing that length by two and adding that value to a new column in the
attribute table of the lines with db.execute.

Use one of the v.net.* modules (v.net.path ?? v.distance ??) to
get/place points at that distance along each line from the start of
the line.

good luck,
Hamish