Ejemplo n.º 1
0
        public override bool Equals(object obj, SpatialEqualityOptions options)
        {
            var other = obj as Polygon;

            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (IsEmpty && other.IsEmpty)
            {
                return(true);
            }

            return(Shell.Equals(other.Shell, options) &&
                   Holes.Count == other.Holes.Count &&
                   !Holes
                   .Where((t, i) => !t.Equals(other.Holes[i], options))
                   .Any());
        }