[mapguide-trac] #1827: Assertion in
CCoordinateSystemMathComparator::SameCoordinateSystem is wrong
MapGuide Open Source
trac_mapguide at osgeo.org
Mon Oct 10 05:24:23 EDT 2011
#1827: Assertion in CCoordinateSystemMathComparator::SameCoordinateSystem is wrong
---------------------------+------------------------------------------------
Reporter: baertelchen | Owner: baertelchen
Type: defect | Status: new
Priority: low | Milestone:
Component: General | Version: 2.1.0
Severity: trivial | Keywords: CoordinateSystem API CCoordinateSystemMathComparator SameCoordinateSystem
External_id: |
---------------------------+------------------------------------------------
The assertion
//If the units match, the unit scale matches.
assert(FloatEqual(def1.unit_scl, def2.unit_scl, kdEpsilonScale));
in the CCoordinateSystemMathComparator::SameCoordinateSystem might report
a false-negativ error condition.
CSMAP generates the unit_scl value from the ellipsoid / datum when an
ellipsoid / datum is set via [CoordSys::SetEllipsoid / SetDatum] methods.
When then comparing the resulting coordinate system objects, the
ellipsoids are considered the same (by the math comparator) but the unit
scales are not; at least not by the assert.
For example, the library will cause the process to be terminated in debug
builds for the following values:
111321.448098 45299
111321.448098 52280
The assert should be removed as the code isn't doing anything with it
anyway.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1827>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list