Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

# Crosses
[Spatial Relationships]

## OGC Definition

[OGC99-049] defines crosses as:

A.Crosses(B) iff ( dim( I(A) intersect I(B) ) < max( dim( I(A) ), dim( I(B) ))) and ( A intersect B is not A) and ( A intersect B is not B) where dim(...) is dimension of ... and I(A) is interior of A.

Expressed in terms of the DE-9IM :

Case A is a Point and B is a LineString:
Case A is a Point and B is a Polygon:
Case A is a LineString and B is a Polygon:

A.Crosses(B) iff ( I(A) intersect I(B) is not empty) and ( I(A) intersect E(B) is not empty) iff A.Relate( B, "T*T******")
where E(B) is exterior of B and & T*T******" is

dim( I(A) intersect I(B) ) belongs to { 0, 1, 2 }
dim( I(A) intersects B(B) ) does not matter
dim( I(A) intersects E(B) ) belongs to { 0, 1, 2 }
dim( B(A) intersects I(B) ) does not matter
dim( B(A) intersects B(B) ) does not matter
dim( B(A) intersects E(B) ) does not matter
dim( E(A) intersects I(B) ) does not matter
dim( E(A) intersects B(B) ) does not matter
dim( E(A) intersects E(B) ) does not matter

Case A is a LineString and B is a LineString:

A.Crosses(B) iff dim( I(A) intersect I(B) is zero iff A.Relate(B, "0********")

dim( I(A) intersect I(B) ) is 0
dim( I(A) intersects B(B) ) does not matter
dim( I(A) intersects E(B) ) does not matter
dim( B(A) intersects I(B) ) does not matter
dim( B(A) intersects B(B) ) does not matter
dim( B(A) intersects E(B) ) does not matter
dim( E(A) intersects I(B) ) does not matter
dim( E(A) intersects B(B) ) does not matter
dim( E(A) intersects E(B) ) does not matter

## Oracle Spatial Definition

There is none. The FDO Oracle Provider maps this predicate to the overlapbdydisjiont operator. Oracle defines this operator as follows. The interior of one object intersects the boundary and interior of the other object, but the two boundaries do not intersect.

crosses = overlapbdydisjoint as used in the third argument to the sdo_relate spatial operator, for example, sdo_relate(a.GEOMETRY, MDSYS.SDO_GEOMETRY(2002, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1), MDSYS.SDO_ORDINATE_ARRAY(4,1, 7,1)), 'mask=overlapbdydisjoint').

## Illustration

Comments or suggestions? Send us feedback.