Opened 17 years ago

Closed 17 years ago

#1583 closed defect (fixed)

Trim precision in numbers of test geometries in WKB files

Reported by: Mateusz Łoskot Owned by: Mateusz Łoskot
Priority: normal Milestone:
Component: default Version: 1.4.1
Severity: normal Keywords:
Cc: tamas

Description

Currently, OGR tests fail under Windows because of FP arithmetic and precision instability. Here are some examples:

TEST: wkbwkt_geom: 3 ... fail
    WKT from WKB (GEOMETRYCOLLECTION (POINT (5.001213489449583 9.99853131378768),POINT (5.001213488867506 7.998531316843582),LINESTRING (3.001213508250658 8.998531263452605,4.001213498995639 9.99853128765244,5.001213489158545 8.998531314733555,4.001213498297148 7.99853129083931),POLYGON ((4.001213498297148 7.99853129083931,4.001213498646393 8.998531289384118,3.001213508250658 8.998531263452605,2.001213517622091 8.99853123696812,2.001213517331053 7.998531238554278)))) does not match clean WKT (GEOMETRYCOLLECTION (POINT (5.001213489449583 9.99853131378768),POINT (5.001213488867506 7.998531316843582),LINESTRING (3.001213508250657 8.998531263452605,4.001213498995639 9.99853128765244,5.001213489158545 8.998531314733555,4.001213498297147 7.99853129083931),POLYGON ((4.001213498297147 7.99853129083931,4.001213498646393 8.998531289384118,3.001213508250657 8.998531263452605,2.001213517622091 8.99853123696812,2.001213517331053 7.998531238554278)))).

and

TEST: wkbwkt_geom: 8 ... fail
    WKT from WKB (POINT (2.001213516748976 5.998531240940793)) does not match clean WKT (POINT (2.001213516748976 5.998531240940792)).

The proposed fix is to trimming the precision in the .wkb files causing problems. The OGR code should ideally stay untouched.

Change History (3)

comment:1 by Mateusz Łoskot, 17 years ago

Owner: changed from warmerdam to Mateusz Łoskot
Status: newassigned

comment:2 by Mateusz Łoskot, 17 years ago

Norman suggested to try some compilation flags /Op or /fp:precision on Visual C++ and -ffloat-store on GCC.

comment:3 by Mateusz Łoskot, 17 years ago

Cc: tamas added
Resolution: fixed
Status: assignedclosed

The test data has been fixed and now all tests pass under Windows.

Note: See TracTickets for help on using tickets.