Opened 11 years ago
Closed 11 years ago
#6584 closed Bugs (fixed)
Point to linestring distance calculation
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | geometry |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
distance() is using comparable distance for first segment and real distance to the rest of the segments of a linestring. If real distance is smaller than comp distance to first segment, then it is selected as min distance and distance to first segment is effectively ignored.
I've attached patch and test application. In test application:
Actual result: 707107 1e+06
Expected result: 707107 707107 Since point is closer to the first segment.
Attachments (2)
Change History (3)
by , 11 years ago
Attachment: | distance.patch added |
---|
comment:1 by , 11 years ago
Milestone: | To Be Determined → Boost 1.50.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks for this patch.
It is applied.
After that I got differences in the unit tests. That was because the comparable strategy (eps) for integers selected the wrong return type. That has been fixed as well.
Unit tests are updated.
This problem was reported earlier (5730) but at that time I did not see the severity of this bug, so glad you reported it again.
Alas it is too late for 1.49
Patch for point-to-linestring calculation