In this commit, Andrea rightly pointed out that the "is inverse flattening definitive?" information can be considered as metadata. Indeed, this information has no incidence on the numerical calculations using ellipsoid properties.
In SIS and Geotk, this is coded differently - in part because the boolean
argument has been replaced
by a ComparisonMode
enumeration - but the idea to ignore metadata stay the same. While it can be coded
in various way, the basic idea can hardly be different since the fact cited in the previous paragraph is universal
no matter how the ellipsoid could be coded. Assuming that copyrights apply to code, note to the mathematical or the
geographical concepts behind code, the same action is keep in SIS. The SIS code is (at the time of commit):
final Ellipsoid that = (Ellipsoid) object; if (mode == ComparisonMode.BY_CONTRACT) { /* * isIvfDefinitive has no incidence on calculation using ellipsoid parameters, * so we consider it as metadata that can be ignored in IGNORE_METADATA mode. */ if (isIvfDefinitive() != that.isIvfDefinitive()) { return false; } }
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r26412:26413 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/datum/DefaultEllipsoid.java
Revision 26412 | Revision 26413 |
---|---|
}
if (super.equals(object, compareMetadata)) {
final DefaultEllipsoid that = (DefaultEllipsoid) object;
return this.ivfDefinitive == that.ivfDefinitive &&
Double.doubleToLongBits(this.semiMajorAxis) == Double.doubleToLongBits(that.semiMajorAxis) &&
Double.doubleToLongBits(this.semiMinorAxis) == Double.doubleToLongBits(that.semiMinorAxis) &&
Double.doubleToLongBits(this.inverseFlattening) == Double.doubleToLongBits(that.inverseFlattening) && |
}
if (super.equals(object, compareMetadata)) {
final DefaultEllipsoid that = (DefaultEllipsoid) object;
return (!compareMetadata || this.ivfDefinitive == that.ivfDefinitive) &&
Double.doubleToLongBits(this.semiMajorAxis) == Double.doubleToLongBits(that.semiMajorAxis) &&
Double.doubleToLongBits(this.semiMinorAxis) == Double.doubleToLongBits(that.semiMinorAxis) &&
Double.doubleToLongBits(this.inverseFlattening) == Double.doubleToLongBits(that.inverseFlattening) && |