[postgis-tickets] [PostGIS] #4407: Test failure on 32bit: tickets ... #3719

PostGIS trac at osgeo.org
Tue Aug 6 05:27:32 PDT 2019


#4407: Test failure on 32bit: tickets ... #3719
----------------------+---------------------------
  Reporter:  myon     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  blocker  |  Milestone:  PostGIS 3.0.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by Algunenano):

 I've looked a bit deeper into it and the issue seems to be the workaround
 to avoid collapsing arc introduced in r16998.


 In this case the angle described by the arc is `0.0428024008`, and the
 increment calculated by the tolerance passed is `0.0490873852`.

 The workaround changes the increment to angle / 2, which is `0.0214012004`
 but at this point the floating point precision under 32b systems (probably
 using 64 doubles) is not enough and that means it adds an extra point:
 {{{
 1.04410000000000002807 2.93120000000000002771 <<< Start of segment
 1.39593876394092175630 2.93601514989238987496 << Extra point in segment
 1.74780000000000113047 2.93329999999999824212 << Extra point added in 32b
 (due to imprecision)
 1.74780000000000002025 2.93330000000000001847 << End of segment
 }}}

 For this case where the tolerance is bigger than the arc angle and the 3
 points are not colinear, I returning the input as the linearization is
 both correct and avoids floating point precision issues. What do you think
 @dbaston?

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4407#comment:18>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list