3

ST_Crosses

 3 years ago
source link: http://postgis.net/docs/ST_Crosses.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Synopsis

boolean ST_Crosses(geometry g1, geometry g2);

Description

ST_Crosses takes two geometry objects and returns TRUE if their intersection "spatially cross", that is, the geometries have some, but not all interior points in common. The intersection of the interiors of the geometries must not be the empty set and must have a dimensionality less than the maximum dimension of the two input geometries. Additionally, the intersection of the two geometries must not equal either of the source geometries. Otherwise, it returns FALSE.

In mathematical terms, this is expressed as:

TODO: Insert appropriate MathML markup here or use a gif. Simple HTML markup does not work well in both IE and Firefox.

st_crosses-math.gif

The DE-9IM Intersection Matrix for the two geometries is:

  • T*T****** (for Point/Line, Point/Area, and Line/Area situations)

  • T*****T** (for Line/Point, Area/Point, and Area/Line situations)

  • 0******** (for Line/Line situations)

For any other combination of dimensions this predicate returns false.

The OpenGIS Simple Features Specification defines this predicate only for Point/Line, Point/Area, Line/Line, and Line/Area situations. JTS / GEOS extends the definition to apply to Line/Point, Area/Point and Area/Line situations as well. This makes the relation symmetric.

[Important]

Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION

[Note]

This function call will automatically include a bounding box comparison that will make use of any indexes that are available on the geometries.

check.png This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s2.1.13.3

check.png This method implements the SQL/MM specification. SQL-MM 3: 5.1.29


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK