2

Is there a permissive open source implementation out there for a "planarize" algorithm (in the style of arcgis planarize - including user modifiable cluster tolerance)?

NB this is not a duplicate of Is there an open source tool to planarize graphs? as alas I need a permissive license, LGPL or BSD, which GRASS doesn't have :(

1 Answer 1

2

For LGPL you have GEOS which will find all intersections and has LGPL license. For every intersection, you need to split the feature which can be done with GDAL (BSD license).

4
  • That looks cool. Is there a way to implement arc's "cluster tolerance" feature though? i.e. intersect lines not just where they cross but also when they pass within a certain distance of one another? Thinking about this it's the union of two sets: (1) all line segment intersections and (2) all points within distance d of a line segment excluding their own. So an answer for (2) alone would suffice. Commented Sep 18, 2012 at 10:42
  • yes. there are different approaches that you can use and some are more optimal than others depending on how you end up using them. You have control of the underlying grid, buffers, snapping tolerances, the list goes on... Commented Sep 18, 2012 at 14:11
  • Hi again! I wonder if you could point me at the right bits of the GEOS api for this please? I have found, say, that I can create multiline geometries, and compute the intersection of these with other geometries. However, to get all intersections between a set of lines, I'd have to compare each of them pairwise, so far as I can see, which isn't as efficient as a sweep line algorithm. Or is there a function or class I'm missing here? Commented Sep 28, 2012 at 10:43
  • @SideshowBob geos.refractions.net/ro/doxygen_docs/html/… Commented Oct 8, 2012 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.