Subject: [Boost-bugs] [Boost C++ Libraries] #5954: distance_pythagoras skips sqrt() step
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-28 17:01:21
#5954: distance_pythagoras skips sqrt() step
-------------------------------------------------------+--------------------
Reporter: mloskot | Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost Development Trunk | Severity: Problem
Keywords: pythagoras,geos,douglas,peucker,algorithm |
-------------------------------------------------------+--------------------
A problem with
[http://lists.osgeo.org/pipermail/ggl/2011-September/001533.html Polygon
DouglasâPeucker simplification] results have been reported.
There seems to be a bug in calculation of distance using Pythagoras
Theorem. The problem is that the distance calculation is somehow omitting
call to sqrt() leading to incomplete results.
It may be a problem with dispatching and execution execution paths in
distance_pythagoras.hpp, so this part needs to be thoroughly reviewed.
Meanwhile, the patch attached provides a quick fix. The fix solves the
reported problem, so the Boost.Geometry generates expected results. Also,
the posted test case has been checked using GEOS and the patched
distance_pythagoras generates results consistent with those obtained from
GEOS. Means, the fix seems to be correct.
But, it causes number of unit test failures, so I decided to not to commit
it this fix.
Barend, please get in touch when you will have a moment.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5954> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC