Opened 9 years ago
Closed 9 years ago
#3136 closed defect (fixed)
ST_ClosestPointOfApproach: Non-linear measures in second geometry
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.2.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
I found a failing case which is taking time to debug:
select ST_closestpointofapproach( 'LINESTRING M (12.189 42.2132 1432291464,12.186 42.2168 1432291536)', 'LINESTRING M (12.1721333333333 42.0917333333333 1432291464,12.172 42.091625 1432291466.25,12.17 42.09 1432291500)');
It returns: ERROR: Non-linear measures in second geometry
Doing it at the liblwgeom level it works fine. Filing as a ticket to continue debugging later.
Change History (6)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Similarly, these inputs fail:
'LINESTRING M (0 0 40000000,0 0 40000003)'::geometry g1, 'LINESTRING M (0 0 40000000,0 0 40000001,0 0 40000002)'::geometry g2
While these work:
'LINESTRING M (0 0 10000000,0 0 10000003)'::geometry g1, 'LINESTRING M (0 0 10000000,0 0 10000001,0 0 10000002)'::geometry g2
comment:3 by , 9 years ago
comment:4 by , 9 years ago
Yeah, as the "valid range" seems to include ..04, the ..03 measure from geometry1 is "assumed" to be valid for geometry2, but it isn't. The fix is to NOT RELY on the cached bbox but to always compute it from scratch instead.
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Seems to be a robusness issue, because this fails:
While this succeeds:
In the second case I just subtracted 1432200000 from each M value