Introduction
Topology rules allow you to enforce and test spatial relationships between different geometry sets. This chapter will build an open source set of topology rules that you can run from the command line or integrate in your python programs.
The spatial relationships described by the DE-9IM (Nine Intersect Model) are Equals, Disjoint, Intersects, Touches, Crosses, Within, Contains, and Overlaps. However, exactly how these are related is something that's unclear for most beginners. We are referring to the interior, boundary, and exterior of our geometry types: Point, LineString, and Polygon, which are used directly to perform the topology checks. These are as follows:
Interior: This refers to the entire shape except for its boundary. All geometry types have interiors.
Boundary: This refers to the endpoints of all linear parts of line features or the linear outline of a polygon. Only lines and polygons have boundaries.
Exterior: This refers to the outside area a shape. All geometry...