May 2017
Beginner to intermediate
328 pages
7h 17m
English
In PostGIS, there are two ways in which geometries can be intersected. The first way is checking whether two geometries intersect (at least one point of geometry A lies within the interior of geometry B). That's the ST_Intersects function. It accepts two arguments of the geometry type, and returns a Boolean.
For example, these lines intersect:
SELECT ST_Intersects( ST_MakeLine(ST_MakePoint(20,50),ST_MakePoint(21,51)), ST_MakeLine(ST_MakePoint(20.5,50.5), ST_MakePoint(22,52)));
But these lines don't:
st_intersects--------------- tSELECT ST_Intersects( ST_MakeLine(ST_MakePoint(20,50),ST_MakePoint(21,51)), ST_MakeLine(ST_MakePoint(21.5,51.5), ST_MakePoint(22,52))); st_intersects--------------- f
ST_Intersects can ...
Read now
Unlock full access