A LineString must not have dangles

Dangles are like cul-de-sac (roads). You can find them only in LineStrings where a line ends and does not connect to another line segment. "To dangle in the air" refers to a LineString that is not connected to any other LineString. These are very important to identify if you are looking to ensure that a road network is connected or to identify where streets come together as they should.

A more technical description of a dangle could be described as an edge that has one or both ends that are not incidental to another edge endpoint.

A LineString must not have dangles

How to do it...

  1. You will now check for dangles on your set of LineStrings as follows: ...

Get Python Geospatial Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.