[postgis-tickets] [PostGIS] #5568: Postgis Topology "mixed face labeling in ring | -267 | [NULL]"
PostGIS
trac at osgeo.org
Mon Oct 9 03:46:41 PDT 2023
#5568: Postgis Topology "mixed face labeling in ring | -267 | [NULL]"
--------------------------------+----------------------------
Reporter: Lars Aksel Opsahl | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.0.10
Component: topology | Version: 3.0.x
Resolution: | Keywords:
--------------------------------+----------------------------
Comment (by strk):
Ok the issue is in the way we determine if an edge among the edges
intersecting the new face is contained or not in the new face.
The way we do this is as follows:
1. We get an interior point of the edge
2. we check with ptarray_contains_point if the new shell contains that
point
In our case I bet the "interior point" on the very-close external edge
ends up being internal to the new face, as step 1 is a "constructive"
method, and thus is subject to drifts. The current code (
_lwt_GetInteriorEdgePoint ) makes a best effort at finding an existing
vertex, to avoid the constructtive method, but in this case it evidently
fails in doing so. Indeed the edge 160 in the original testcase is formed
by only 2 vertices. Edge 161 is the one that's really inside the new face,
but edge 160 is erroneously found to be inside due to this constructive
interpolation.
I'm not sure what a good fix would be, but the goal here would be avoiding
the interpolation. Maybe using Covers from GEOS against the whole line,
when the line has less than 3 distinct vertices could be a solution.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5568#comment:9>
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