[postgis-tickets] [PostGIS] #4990: getfacecontainingpoint fails on i386
PostGIS
trac at osgeo.org
Fri Sep 24 15:00:00 PDT 2021
#4990: getfacecontainingpoint fails on i386
-----------------------------+---------------------------
Reporter: Bas Couwenberg | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.2.0
Component: topology | Version: master
Resolution: | Keywords:
-----------------------------+---------------------------
Comment (by strk):
Ok the weird looking Closest Segment coordinates were also due to bogus
format string, which was fixed with
[1baf9cc491087af450abd31e161ffbd81753a51c/git].
The correct debugging is now:
{{{
DEBUG: [lwgeom_topo.c:lwt_GetFaceContainingPoint:7092] Closest edge is
26: LINESTRING(4 31,7 31,7 34,4 34,4 31)
DEBUG: [lwgeom_topo.c:lwt_GetFaceContainingPoint:7099] Shortest line to
closest edge 26: LINESTRING(7 31,7.1 31)
DEBUG: [lwgeom_topo.c:lwt_GetFaceContainingPoint:7105] Closest point on
closest edge: POINT(7 31)
DEBUG: [lwgeom_topo.c:lwt_GetFaceContainingPoint:7211] Closest point is
NOT a node
DEBUG: [lwgeom_topo.c:lwt_GetFaceContainingPoint:7238] Closest segment on
edge 26 is 1
DEBUG: [lwgeom_topo.c:lwt_GetFaceContainingPoint:7241] Closest segment on
edge 26 is LINESTRING(7 31, 7 34)
ERROR: Closest point is first point of closest segment, unexpectedly
}}}
Here's an image of the problem case:
[[Image(wrongResult.png)]]
The debugging lines tell us that there's something wrong with reading the
coordinates of the "closest segment", because segment 0 should be the
horizontal one (4 31, 7 31), not the vertical one (7 31, 7 34)!
It's interesting to note that the "closest segment" is now reported to be
1 instead of 0.
This may be due to ptarray_closest_segment_2d returning an uint32 as an
int. Enabling full warnings might really help here..
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4990#comment:24>
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