[GRASSLIST:9149] Re: Line to point
Hamish
hamish_nospam at yahoo.com
Sun Nov 20 01:05:31 EST 2005
> 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
More information about the grass-user
mailing list