Skip to content

ST_CROSSES

Returns TRUE if two GEOGRAPHY objects have intersecting interiors but do not share all interior points. The intersection must have a dimension less than the maximum dimension of the input GEOGRAPHY objects.

This function is symmetric, meaning:

  • ST_CROSSES(a, b) = ST_CROSSES(b, a)

See also:

Syntax

sql
ST_CROSSES(<a>, <b>)

Arguments

  • <a> and <b>: The two GEOGRAPHY objects to compare

Returns

Returns a BOOLEAN:

  • TRUE if the GEOGRAPHY objects cross
  • FALSE if they do not cross, or in cases involving Point/Point or Area/Area comparisons

Behavior

Input TypesResult
Point/LineTRUE if the point lies on the line's interior
Point/AreaTRUE if the point lies within the area's interior
Line/LineTRUE if the lines intersect at one or more points
Line/AreaTRUE if the line intersects the area's interior
Area/AreaAlways FALSE
Point/PointAlways FALSE