Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7813: Bug in boost::geometry::centroid with trivially small polygons
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-22 18:02:36
#7813: Bug in boost::geometry::centroid with trivially small polygons
-------------------------------+--------------------------------------------
Reporter: anonymous | Owner: barendgehrels
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: geometry
Version: Boost 1.52.0 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------+--------------------------------------------
Changes (by barendgehrels):
* status: reopened => closed
* resolution: => wontfix
Comment:
I reproduced the problem. The polygon is indeed very small, near the
limits of floating point resolution. The division (used for centroid) by a
similar small value results in the centroid being outside the polygon.
If you really want to use results for this resolution, please use
ttmath_big. The problem is than not there.
Summary:
centroid (double) is: POINT(139.6527006820726300 35.8585406437098440)
centroid (ttmath) is: POINT(139.64437785388127853881278548429355447
35.85640358447488584474885847218077831)
centroid (sql server) is: POINT (139.64437785388145 35.856403584474876)
So the double-version is indeed a bit off, and indeed outside the convex
polygon.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7813#comment:4> 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:11 UTC