Spatial Predicates Lab
Start with a scenario, drag shapes in the canvas, and read the results panel.
Instructions:
1
Choose scenario:
Use the scenario menu to pick what you want to compare.
2
Move geometry:
Drag K and M inside the canvas to test relationships.
3
Read results:
Click any result row to see code examples below.
Select Scenario:
2 Polygons
Polygon and Point
Polygon and Line
Start from a preset:
Overlap
K contains M
Disjoint
Point inside
Point outside
Point on edge
Line crosses
Line inside
Line outside
K
M
P
L
Drag shapes — K (rectangle) · M (circle) · Line: endpoints to rotate/scale, midpoint or body to move
Polygon K — Neighborhood
Polygon M — Flood Zone
Point P — 311 Complaint
LineString L — Highway
Results
Click any row to see its meaning and code example below.
Predicates
Set Operations
Code:
Shapely
GeoPandas