[GRASSLIST:5952] Re: Conversion from points to lines?
Dylan Beaudette
dylan at iici.no-ip.org
Tue Mar 1 12:32:17 EST 2005
On Tuesday 01 March 2005 07:49 am, Patton, Eric wrote:
> Hey,
>
>
>
> Is it possible to convert vector points to lines in Grass 6.0? v.type
> complained that points to lines are incompatible types. Do I have to do a
> multi-step conversion from points -> centroids -> something else -> lines
> instead?
>
>
Hi,
Well I have done it in the past with:
v.out.ascii in=point_vector out=points.ascii
awk '{some awk script here}' points.ascii > lines.ascii
v.in.ascii in=lines.ascii out=lines_vector
the output from v.out.ascii in=points_vector will look like:
0258468 4090205
0258462 4090196
0258454 4090172
0258449 4090158
...and you can use AWK to convert it into an ascii line format like:
L 2
0258468 4090205
0258462 4090196
L 2
0258462 4090196
0258454 4090172
L 2
0258454 4090172
0258449 4090158
...save the output, and load it back into grass with v.in.ascii
I had the AWK script somewhere, and now can't find it...sorry.
--
Dylan Beaudette
Soil Science Graduate Group
University of California at Davis
More information about the grass-user
mailing list