Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11928: surveyor area method is inaccurate
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-26 15:51:27
#11928: surveyor area method is inaccurate
-----------------------------------------+---------------------------
Reporter: Charles Karney <charles@â¦> | Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.58.0 | Severity: Problem
Resolution: | Keywords: area
-----------------------------------------+---------------------------
Comment (by Charles Karney <charles@â¦>):
Thanks for the reference to Abel Flint (a great name!). You will see on
pp. 59-63 that he describes the trapezium rule and ''not'' the so-called
surveyor's method! Most of his contemporaries who were mathematicians
would have recognized this as such and not, therefore, have seen it as
some special technique invented by a surveyor.
The analysis of why
sum x,,i,, y,,i+1,, - x,,i+1,, y,,i,,
is typically subject to worse round off errors than
sum (x,,i+1,, - x,,i,,) (y,,i+1,, + y,,i,,)
goes as follows. Each formula contains
1. products
2. differences in forming each term in the sum
3. differences in forming the sum itself
In the surveyors formula 2 follows 1 and so the mild round off errors
from the products are sometimes catastrophically magnified. In the
trapezium rule 2 precedes 1 and there is ''no'' round off error if
x,,i+1,,
and x,,i,, are within a factor of 2 of each other (which is a common
situation).
Both formulas are subject to potentially dangerous round off with 3.
Centering the numbers might ameliorate this problem. Alternatively,
merely switching to the other trapezium rule involving (y,,i+1,, - y,,i,,)
would help, e.g., in the case of UTM coordinates where often the
northings are much larger than the eastings.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11928#comment:2> 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:19 UTC