[PostGIS] #5639: ST_DFullyWithin fails when dealing with LINESTRING and POLYGON
PostGIS
trac at osgeo.org
Fri Jan 19 15:46:44 PST 2024
#5639: ST_DFullyWithin fails when dealing with LINESTRING and POLYGON
----------------------+---------------------------
Reporter: Wenjing | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.4.2
Component: postgis | Version: 3.4.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by pramsey):
This is quite bad one, basically handling of max distance for objects that
overlap is quite bad.
{{{
SELECT ST_MaxDistance(a1, a2)
FROM (VALUES
('POINT(0.5 0.5)', 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')
) AS a(a1, a2);
SELECT ST_MaxDistance(a1, a2)
FROM (VALUES
('POINT(1.5 1.5)', 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')
) AS a(a1, a2);
SELECT ST_MaxDistance(a1, a2)
FROM (VALUES
('LINESTRING(0.5 0.5, 1.1 1.1)', 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')
) AS a(a1, a2);
SELECT ST_MaxDistance(a1, a2)
FROM (VALUES
('LINESTRING(0.5 0.5, 1.5 1.5)', 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')
) AS a(a1, a2);
SELECT ST_MaxDistance(a1, a2)
FROM (VALUES
('LINESTRING(1.5 1.5, 0.5 0.5)', 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')
) AS a(a1, a2);
}}}
And this is without getting into really fun cases where the largest
distance is found at a vertex in a hole, for example.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5639#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list