Opened 6 years ago
Closed 5 years ago
#4274 closed defect (fixed)
ST_PointOnSurface generated point produces ST_Intersects = false
Reported by: | andehhh | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS GEOS |
Component: | postgis | Version: | 2.4.x |
Keywords: | Cc: |
Description
Given is this query which returns 'false':
SELECT ST_Intersects(ST_PointOnSurface(poly), poly) FROM (SELECT 'SRID=4326; POLYGON ((2.0875049999999997 49.038467, 2.087497642793396 49.0384427212182, 2.087475 49.038368, 2.0875049999999997 49.038467))'::geometry AS poly) AS foo;
Looking at the documentation ("Returns a POINT guaranteed to intersect a surface.") this case should be handled internally to avoid confusion.
Can it be explained with rounding issues as the polygon in question is a very narrow sliver polygon?
When transforming to a metric system this issue disappears.
Change History (4)
comment:1 by , 6 years ago
comment:3 by , 6 years ago
Milestone: | PostGIS 2.5.2 → PostGIS GEOS |
---|
comment:4 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was addressed both in jts and GEOS:
template_postgis=# SELECT ST_Intersects(ST_PointOnSurface(poly), poly) FROM (SELECT 'SRID=4326; POLYGON ((2.0875049999999997 49.038467, 2.087497642793396 49.0384427212182, 2.087475 49.038368, 2.0875049999999997 49.038467))'::geometry AS poly) AS foo; st_intersects --------------- t (1 row) # Select postgis_full_version(); postgis_full_version ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ POSTGIS="3.0.0alpha4dev r17580" [EXTENSION] PGSQL="110" GEOS="3.8.0dev-CAPI-1.11.0 " PROJ="6.1.0" GDAL="GDAL 3.0.0, released 2019/05/05" LIBXML="2.9.9" LIBJSON="0.13.1" LIBPROTOBUF="1.3.1" WAGYU="0.4.3 (Internal)" (core procs from "3.0.0dev r17376" need upgrade) TOPOLOGY (topology procs from "3.0.0dev r17376" need upgrade) RASTER (raster procs from "3.0.0dev r17376" need upgrade) (1 row)
Note:
See TracTickets
for help on using tickets.
Reported upstream at https://github.com/locationtech/jts/issues/359