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 :(


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).

  • 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. – Sideshow Bob Sep 18 '12 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... – Ragi Yaser Burhum Sep 18 '12 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? – Sideshow Bob Sep 28 '12 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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