/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { // Do not check 'object==this' here, since this // optimization is usually done in subclasses. if (super.equals(object)) { final MapProjection that = (MapProjection) object; return equals(this.semiMajor, that.semiMajor) && equals(this.semiMinor, that.semiMinor) && equals(this.centralMeridian, that.centralMeridian) && equals(this.latitudeOfOrigin, that.latitudeOfOrigin) && equals(this.scaleFactor, that.scaleFactor) && equals(this.falseEasting, that.falseEasting) && equals(this.falseNorthing, that.falseNorthing); } return false; }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final Polyconic that = (Polyconic) object; return equals(this.ml0, that.ml0); } return false; }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final EquidistantCylindrical that = (EquidistantCylindrical) object; return equals(this.standardParallel, that.standardParallel); } return false; }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final Gnomonic that = (Gnomonic) object; return equals(this.latitudeOfCentre, that.latitudeOfCentre); } return false; }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final WinkelTripel that = (WinkelTripel) object; return equals(this.cosphi1, that.cosphi1); } return false; }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final Mercator that = (Mercator) object; return equals(this.standardParallel, that.standardParallel); } return false; } }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { /* * Implementation note: usually, we define this method in the last subclass, which may * compare every fields. However, all fields in subclasses like StereographicUSGS are * fully determined by the parameters like "latitude_of_origin", which are already * compared by super.equals(object). Comparing those derived fields would be redundant. */ if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final Stereographic that = (Stereographic) object; return Utilities.equals(this.descriptor, that.descriptor); } return false; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; TransverseMercator that = (TransverseMercator) o; return equals(that.esp, esp) && equals(that.ml0, ml0); }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final Krovak that = (Krovak) object; return equals(azimuth, that.azimuth) && equals(pseudoStandardParallel, that.pseudoStandardParallel); } return false; } }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final AlbersEqualArea that = (AlbersEqualArea) object; return equals(this.n, that.n) && equals(this.c, that.c) && equals(this.rho0, that.rho0) && equals(this.phi1, that.phi1) && equals(this.phi2, that.phi2); } return false; }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final LambertConformal that = (LambertConformal) object; return (this.belgium == that.belgium) && equals(this.n, that.n) && equals(this.F, that.F) && equals(this.rho0, that.rho0) && equals(this.phi1, that.phi1) && equals(this.phi2, that.phi2); } return false; } }
/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final ObliqueMercator that = (ObliqueMercator) object; return this.twoPoint == that.twoPoint && equals(this.latitudeOfCentre, that.latitudeOfCentre) && equals(this.longitudeOfCentre, that.longitudeOfCentre) && // normalizing angles here equals(rollLongitude(this.azimuth), rollLongitude(that.azimuth)) && equals( rollLongitude(this.rectifiedGridAngle), rollLongitude(that.rectifiedGridAngle)) && equals(this.latitudeOf1stPoint, that.latitudeOf1stPoint) && equals(this.longitudeOf1stPoint, that.longitudeOf1stPoint) && equals(this.latitudeOf2ndPoint, that.latitudeOf2ndPoint) && equals(this.longitudeOf2ndPoint, that.longitudeOf2ndPoint) && equals(this.u_c, that.u_c); // Note: "u_c" is a derived parameter, so in theory we don't need to compare it. // However we still compare it as a safety, because it takes a different // value in the "hotine" case. } return false; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Mollweide)) { return false; } if (!super.equals(o)) { return false; } Mollweide mollweide = (Mollweide) o; if (Double.compare(mollweide.cp, cp) != 0) { return false; } if (Double.compare(mollweide.cx, cx) != 0) { return false; } return Double.compare(mollweide.cy, cy) == 0; }