Spatial Match Behavior

Version:
2022.1
Last modified: May 04, 2022

The behavior of the Spatial Match tool depends on the intersection method selected (Intersects, Contains, or Within) and the types of the objects being tested.  The tables below list the various combinations.

Intersects

A Spatial Object Intersects A If The Type of the Returned Intersection Object (If Requested)

Polygon

Polygon

The polygons share any area. Touching edges without overlap is not considered an intersect.

Polygon

Polygon

Line

The line touches the edge or interior of the polygon.

Polyline

Polygon

Point

The polygon contains the point.

Point

Line

Line

Any part of the lines cross each other or share endpoints.

Point

Lines might intersect at multiple points, in which case 1 point is returned and a warning is issued.

Line

Point

The point is a vertex of the line.

Note: A line might cross over a point geometrically without a vertex there, and this is not counted as an intersection.

Point

MultiPoint

Any Object

If it intersects any of the points.

MultiPoint

Point

Point

The points are the same.

Point

Contains and Within

A TARGET

Contains a UNIVERSE

If...

Polygon

Polygon

99.99% of the second polygon's area lies inside the first polygon.

Polygon

Line

99.99% of the length of the line lies inside the polygon.

Polygon

Point

The point is inside the polygon.

Polygon

MultiPoint

All the points are in the polygon.

Line

Polygon

Never

Line

Line

Every segment (for example, 2-point series) in the contained line also appears in the containing line. Segments consisting of the same 2 points in the opposite order (in other words, coded in the opposite direction) still match. Lines that follow the same route geometrically might still not match if one uses more (unnecessary) points.

Line

Point

The point is a vertex of the line.

A line might cross over a point geometrically without a vertex, and the line is not counted as containing the point.

Line

MultiPoint

All the points are vertexes of the line.

MultiPoint

MultiPoint

All the universe points are in the target.

MultiPoint

Point

One of the points are in the MultiPoint.

MultiPoint

Polygon or Line

Never

Point

Polygon

Never

Point

Line

Never

Point Point

The points are the same.

Spatial Index

If specifying a Calgary (cydb) file, be aware that the Calgary spatial index uses 5 decimal places of accuracy for compression and speed. The YXDB spatial index uses 6 decimal places. This adds an addition round off error of up to a maximum of 1.8 feet to Calgary indexes. In other words, it is possible that a point can be 1.8 feet inside of a polygon and be found as outside in Calgary.

Was This Page Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support. Can't submit this form? Email us.