[GRASS-user] how to break lines?

achim ak7 at jupiter.uni-freiburg.de
Sun Aug 16 07:41:13 EDT 2009


Hi,


...still deal with this problem.

I tried to break my lines (network) on touching (crossing) points using
"v.clean tool=break" (see picture)

in the little attached picture I get the results as follows:

lila boxes: points, where v.clean breaks the network

thought it may be a rounding problem I compared decimal degrees (upper
conversion via http://rechneronline.de/geo-koordinaten/)
To reinsure, I calculated myself and got the same answer with
(((sec/60)+min)/60)+deg???


---


normally v.clean shouldn't break on end-points, because it's not really
crossing, as it is written in the source code for grass 6.5 in
break_lines.c:

ll102-112:
    /* To find intersection of two lines (Vect_line_intersection) is
quite slow.
     * Fortunately usual lines/boundaries in GIS often forms a network
where lines
     * are connected by end points, and touch by MBR. This function
checks and occasionaly
     * skips such cases. This is currently done for 2D only
     */

    /* Go through all lines in vector, for each select lines which
overlap MBR of
     * this line exclude those connected by one endpoint (see above)
     * and try to intersect, if lines intersect write new lines at the
end of
     * the file, and process next line (remaining lines overlapping box
are skipped)
     */



I naively tried to delete the check after
l138: /* Find which sides of the box are touched by intermediate
(non-end) points of line */
to get even lines broken that are touched by end-points, but it did not work


sine v.edit break not works, I tried to fix it and ended up with
manipulating around (which is quite interesting)

Help is very welcomed,
Achim
-------------- nächster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname   : broken.jpg
Dateityp    : image/jpeg
Dateigr??e  : 66509 bytes
Beschreibung: nicht verf?gbar
URL         : http://lists.osgeo.org/pipermail/grass-user/attachments/20090816/7d6443a4/broken-0001.jpg


More information about the grass-user mailing list