Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #33 from NetTopologySuite/github-29
Browse files Browse the repository at this point in the history
Resolves #29
  • Loading branch information
airbreather committed Oct 13, 2017
2 parents 80a226d + 3613417 commit 717719d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/GeoAPI/CoordinateSystems/WGS84ConversionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace GeoAPI.CoordinateSystems
#if HAS_SYSTEM_SERIALIZABLEATTRIBUTE
[Serializable]
#endif
public class Wgs84ConversionInfo : IEquatable<Wgs84ConversionInfo>
public class Wgs84ConversionInfo
{
private const double SEC_TO_RAD = 4.84813681109535993589914102357e-6;

Expand Down
13 changes: 1 addition & 12 deletions src/GeoAPI/Geometries/Coordinate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace GeoAPI.Geometries
[Serializable]
#endif
#pragma warning disable 612,618
public class Coordinate : ICoordinate, IComparable<Coordinate>, IEquatable<Coordinate>
public class Coordinate : ICoordinate, IComparable<Coordinate>
#pragma warning restore 612,618
{
///<summary>
Expand Down Expand Up @@ -486,17 +486,6 @@ bool ICoordinate.Equals2D(ICoordinate other)
return X == other.X && Y == other.Y;
}

/// <summary>
///
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
[Obsolete]
Boolean IEquatable<ICoordinate>.Equals(ICoordinate other)
{
return ((ICoordinate)this).Equals2D(other);
}

/// <summary>
/// Compares this object with the specified object for order.
/// Since Coordinates are 2.5D, this routine ignores the z value when making the comparison.
Expand Down
11 changes: 1 addition & 10 deletions src/GeoAPI/Geometries/Envelope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace GeoAPI.Geometries
[Serializable]
#endif
#pragma warning disable 612,618
public class Envelope : IEnvelope, IEquatable<Envelope>, IComparable<Envelope>, IIntersectable<Envelope>, IExpandable<Envelope>
public class Envelope : IEnvelope, IComparable<Envelope>, IIntersectable<Envelope>, IExpandable<Envelope>
#pragma warning restore 612,618
{
/// <summary>
Expand Down Expand Up @@ -1238,15 +1238,6 @@ bool IEnvelope.Covers(IEnvelope other)
return Math.Sqrt(dx * dx + dy * dy);
}

bool IEquatable<IEnvelope>.Equals(IEnvelope other)
{
if (IsNull)
return other.IsNull;

return _maxx == other.MaxX && _maxy == other.MaxY &&
_minx == other.MinX && _miny == other.MinY;
}

int IComparable<IEnvelope>.CompareTo(IEnvelope other)
{
if (IsNull && other.IsNull)
Expand Down
2 changes: 1 addition & 1 deletion src/GeoAPI/Geometries/ICoordinate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace GeoAPI.Geometries
[Obsolete("Use Coordinate class instead")]
public interface ICoordinate :
ICloneable,
IComparable, IComparable<ICoordinate>, IEquatable<ICoordinate>
IComparable, IComparable<ICoordinate>
{
/// <summary>
/// The x-ordinate value
Expand Down
2 changes: 1 addition & 1 deletion src/GeoAPI/Geometries/IEnvelope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace GeoAPI.Geometries
[Obsolete("Use Envelope class instead")]
public interface IEnvelope :
ICloneable,
IComparable, IComparable<IEnvelope>, IEquatable<IEnvelope>
IComparable, IComparable<IEnvelope>
{
/// <summary>
/// Gets the area of the envelope
Expand Down
5 changes: 4 additions & 1 deletion src/GeoAPI/Geometries/IGeometry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace GeoAPI.Geometries
/// <summary>
/// Interface for basic implementation of <c>Geometry</c>.
/// </summary>
public interface IGeometry : ICloneable, IComparable, IComparable<IGeometry>, IEquatable<IGeometry>
public interface IGeometry : ICloneable, IComparable, IComparable<IGeometry>
{
///<summary>
/// The <see cref="IGeometryFactory"/> used to create this geometry
Expand Down Expand Up @@ -190,6 +190,9 @@ public interface IGeometry : ICloneable, IComparable, IComparable<IGeometry>, IE

IGeometry Union();

[Obsolete("Favor either EqualsTopologically or EqualsExact instead.")]
bool Equals(IGeometry other);

/// <summary>
/// Tests whether this geometry is topologically equal to the argument geometry
/// as defined by the SFS <tt>equals</tt> predicate.
Expand Down
2 changes: 1 addition & 1 deletion src/GeoAPI/Geometries/IPrecisionModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public enum PrecisionModels
/// Interface for classes specifying the precision model of the <c>Coordinate</c>s in a <c>IGeometry</c>.
/// In other words, specifies the grid of allowable points for all <c>IGeometry</c>s.
/// </summary>
public interface IPrecisionModel : IComparable, IComparable<IPrecisionModel>, IEquatable<IPrecisionModel>
public interface IPrecisionModel : IComparable, IComparable<IPrecisionModel>
{
/// <summary>
/// Gets a value indicating the <see cref="PrecisionModels">precision model</see> type
Expand Down

0 comments on commit 717719d

Please sign in to comment.