PostGIS 1.5.
1 Manual
182 / 315
Line 1 (green), Line 2 (blue) ball is start point, triangle are
end points. Query below.
SELECT
ST_LineCrossingDirection(foo. line1, foo.line2) As l1_cross_l2 ,
ST_LineCrossingDirection(foo. line2, foo.line1) As l2_cross_l1
FROM (
SELECT
ST_GeomFromText(LINESTRING(25 169,89 114,40 70,86 43)) As line1,
ST_GeomFromText(LINESTRING (20 140, 71 74, 161 53)) As line2
) As foo;
l1_cross_l2 | l2_cross_l1
-------------+-------------1 |
1
Line 1 (green), Line 2 (blue) ball is start point, triangle are
end points. Query below.
SELECT ST_LineCrossingDirection(foo.line1 , foo.line2) As l1_cross_l2 ,
ST_LineCrossingDirection(foo. line2, foo.line1) As l2_cross_l1
FROM (SELECT
ST_GeomFromText(LINESTRING(25 169,89 114,40 70,86 43)) As line1,
ST_GeomFromText(LINESTRING(2.99 90.16,71 74,20 140,171 154)) As line2
) As foo;
l1_cross_l2 | l2_cross_l1
-------------+-------------2 |
2
SELECT [Link], [Link], ST_LineCrossingDirection(s1.the_geom, s2.the_geom)
FROM streets s1 CROSS JOIN streets s2 ON ([Link] != [Link] AND s1.the_geom && s2.the_geom )
WHERE ST_CrossingDirection(s1.the_geom, s2.the_geom) > 0;
See Also
ST_Crosses
7.8.11 ST_Disjoint
Name
ST_Disjoint Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together.
PostGIS 1.5.1 Manual
183 / 315
Synopsis
boolean ST_Disjoint( geometry A , geometry B );
Description
Overlaps, Touches, Within all imply geometries are not spatially disjoint. If any of the aforementioned returns true, then the
geometries are not spatially disjoint. Disjoint implies false for spatial intersection.
Important
Do not call with a GEOMETRYCOLLECTION as an argument
Performed by the GEOS module
Note
This function call does not use indexes
Note
NOTE: this is the "allowable" version that returns a boolean, not an integer.
This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 //s2.1.13.3 [Link](b, FF*FF****)
This method implements the SQL/MM specification. SQL-MM 3: 5.1.26
Examples
SELECT ST_Disjoint(POINT(0 0)::geometry, LINESTRING ( 2 0, 0 2 )::geometry);
st_disjoint
--------------t
(1 row)
SELECT ST_Disjoint(POINT(0 0)::geometry, LINESTRING ( 0 0, 0 2 )::geometry);
st_disjoint
--------------f
(1 row)
See Also
ST_IntersectsST_Intersects