Opened 3 years ago
Closed 3 years ago
#1128 closed defect (fixed)
DiscreteFrechetDistance fails to use initial points of lines
Reported by: | mdavis | Owned by: | mdavis |
---|---|---|---|
Priority: | major | Milestone: | 3.10.0 |
Component: | Core | Version: | 3.9.0 |
Severity: | Significant | Keywords: | |
Cc: |
Description
As reported in PG-4992, the distance calculated by DiscreteFrechetDistance for the following lines appears to be incorrect:
A: LINESTRING (1 1, 2 2) B: LINESTRING (1 4, 2 3)
The computed result is 2.23606797749979. But the Frechet Distance must be at least the distance between the initial points of the lines, which is 3.
Resolution
It appears that there is a bug in this line. It should be
ca[i][j] = p_ptDist;
This gives the correct answer for the above case. All other tests pass.
Change History (2)
comment:1 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:2 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed by 848f978b89