#1827 closed defect (fixed)
Assertion in CCoordinateSystemMathComparator::SameCoordinateSystem is wrong
Reported by: | baertelchen | Owned by: | baertelchen |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | General | Version: | 2.1.0 |
Severity: | trivial | Keywords: | CoordinateSystem API CCoordinateSystemMathComparator SameCoordinateSystem |
Cc: | External ID: |
Description
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.
Change History (4)
comment:1 by , 12 years ago
Milestone: | → 2.5 |
---|
comment:2 by , 12 years ago
Milestone: | 2.5 |
---|
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In 9360: