Skip to content

Commit

Permalink
Update query-spatial-rel.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts authored Dec 10, 2024
1 parent 9b51f66 commit 295b357
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions query/query-spatial-rel.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ A tolerance-based approach must be used to determine if A and result C effective

**Solutions**

* test whether `ST_Intersection(geom1, geom2, tol)` is linear
* test whether `ST_Intersection(geom1, geom2)` has a small area (based on a fraction of the areas of the input geometries)
* test whether the boundary of `geom` which lies within `geom2` lies within
the tolerance distance of the boundary of `geom2`.
* test whether `ST_Intersection(A, B, tol)` is linear
* test whether `ST_Intersection(A, B)` has a small area (based on a fraction of the areas of the input geometries)
* test whether the boundary of A which lies within B lies within
the tolerance distance of the boundary of B.
This is the exact equivalent of "touches with tolerance".
It can be done in two ways:
* `ST_Covers(ST_Intersection(ST_Boundary(geom1), geom2), ST_Buffer(ST_Boundary(geom2), tol))`
* `ST_OrientedHausdorffDistance(ST_Intersection(ST_Boundary(geom1), geom2), ST_Boundary(geom2)) <= tol`
(**NOTE:** ST_OrientedHausdorffDistance is not yet available in PostGIS)
* `ST_Covers(ST_Intersection(ST_Boundary(A), B), ST_Buffer(ST_Boundary(B), tol))`
* `ST_OrientedHausdorffDistance(ST_Intersection(ST_Boundary(A), B), ST_Boundary(B)) <= tol`
(**NOTE:** ST_OrientedHausdorffDistance (or equivalent) is not yet available in PostGIS)

### Discrepancy between GEOS predicates and PostGIS Intersects
<https://gis.stackexchange.com/questions/259210/how-can-a-point-not-be-within-or-touch-but-still-intersect-a-polygon>
Expand Down

0 comments on commit 295b357

Please sign in to comment.