convert line pts.to nodes
Philip Verhagen
philip at raap2.ivambv.uva.nl
Thu Apr 25 08:00:00 EDT 1996
> Is there a way to convert individual line points to nodes without using
> line definition?
>
If I understand your problem correctly, probably the easiest way to do it
will be exporting the vector-file to dig_ascii format with v.out.ascii.
The resulting dig_ascii file will contain the lines in the format
L 5
1000 2000
1000 1500
750 1200
500 1000
1000 2000
Note that the order of the coordinates is y,x for some unexplained reason.
You can split these lines into lines with just two nodes by writing a
script that performs sed -n ${x}p on the file, checks for the right format
and then writes the lines to a new dig_ascii file, inserting a line with
L 2 for each new two-node line. You can subsequently import the new file
with v.in.ascii. If this doesn't sound clear enough (I've just had
my first coffee), let me know and I'll try to explain it again :)
Philip Verhagen
-----------------------------------
philip at raap2.ivambv.uva.nl
R A A P
Plantage Muidergracht 14
1018 TV Amsterdam
The Netherlands
tel: +31 (20) 421 62 00
fax: +31 (20) 421 42 90
http://raap2.ivambv.uva.nl/home_eng.html
-----------------------------------
More information about the grass-user
mailing list