Tests whether the base
Geometry properly contains a given geometry.
containsProperly predicate has the following equivalent definitions:
- Every point of the other geometry is a point of this geometry's interior.
- The DE-9IM Intersection Matrix for the two geometries matches
In other words, if the test geometry has any interaction with the boundary of the target
geometry the result of containsProperly is false.
This is different semantics to the
in which test geometries can intersect the target's boundary and still be contained.
The advantage of using this predicate is that it can be computed
efficiently, since it avoids the need to compute the full topological relationship
of the input boundaries in cases where they intersect.
An example use case is computing the intersections
of a set of geometries with a large polygonal geometry.
Since intersection is a fairly slow operation, it can be more efficient
to use containsProperly to filter out test geometries which lie
wholly inside the area. In these cases the intersection is
known a priori to be exactly the original test geometry.