Spatial Relations Defined

This topic summarizes how spatial predicates are defined:

For definitive documentation on spatial relations, please consult the OGC documentation on spatial relations.

Click here to see an example that illustrates different spatial relationships.

Spatial Predicates


The definitions of each Predicate attribute are given in the tables included under this heading. This section also gives specific definitions of boundaries, exteriors, and interiors as they apply to specific feature types and explains the concept of an intersection matrix.

Each feature – whether it's a point, line, or polygon – has a definition of an INTERIOR, BOUNDARY, and EXTERIOR. The EXTERIOR is everything that is not on the BOUNDARY or the INTERIOR.

Spatial relations are undefined for geometries that are not OGC valid or aggregate geometries.

Boundary, Interior, and Exterior

BOUNDARY Points Empty set.


The boundary is the set of all endpoints that occur an odd number of times. For a simple linear feature (that is, not a multicurve), this means the boundary is comprised of the start and end points, unless the line is closed (the start and end are the same point), in which case the boundary is the empty set. (This is the default if CURVE_BOUNDARY_RULE is unspecified.)


The boundary is the set of all endpoints, regardless of the number of times they occur in the geometry.

Polygons The border of a polygon, including the border of the holes.
INTERIOR Points The point location.
Lines The entire line except its boundary as determined above.
Polygons The inner surface of the polygon.

Dimensionally Extended 9 Intersection Matrix

interior boundary exterior
base interior c0 c1 c2
boundary c3 c4 c5
exterior c6 c7  c8
F F *
F F *
* * *

String Representations of Intersection Matrices

Any intersection matrix can be represented as a 9-character string. To generate the string representation of a particular intersection matrix, take each element starting from the top-left, going right-to-left for each row.

For example, the string representation of the intersection matrix for the disjoint predicate (as seen above) is “FF*FF****”.

Definitions of Predicate Attributes

Each of the supported predicates is described below, along with some associated examples and pattern matrices. Note that the examples are not exhaustive: there may be entirely different situations where a given predicate is true. In the examples, the base is labeled "A" and the candidate is labeled "B".

Predicate Example Description Pattern Matrix
INTERSECTS   The two features are not disjoint, as defined below.  
DISJOINT The boundaries and interiors do not intersect.
EQUALS The features have the same boundary and the same interior.

The boundaries may intersect or one boundary may intersect the other interior.

The interiors do not touch.

Undefined for point/point.




The interiors intersect and the base’s interior intersects the candidate’s exterior. Or in the case of line/line, the intersection of the interiors forms a point.

Undefined for point/point or area/area.

Undefined for aggregate/multi geometries.

or, for two lines:


The interiors intersect, but neither feature is contained by the other, nor are the features equal.

Undefined for point/line, point/area, or line/area.

Undefined for aggregate/multi geometries.

or, for two lines:


The interiors intersect and no part of the candidate's interior or boundary intersects the base's exterior. It is possible for the boundaries to intersect.

(inverse of WITHIN)


The interiors intersect and no part of the base's interior or boundary intersects the candidate's exterior. It is possible for the boundaries to intersect.

(inverse of CONTAINS)

<DE-9IM string>

In addition to the predicates listed above, spatial relations can also be specified using a string representation of an intersection matrix.

Undefined for aggregate/multi geometries.

Spatial Relationship Examples

Spatial Relations Base Candidates
Intersects Contains


Search FME Knowledge Center

Search for samples and information about this transformer on the FME Knowledge Center.