Exemple #1
0
        public override int GetHashCode()
        {
            double[] fields = new double[4];
            fields[0] = this.IsEmpty ? 0.0 : this.X;
            fields[1] = this.IsEmpty ? 0.0 : this.Y;
            double?z = this.Z;

            fields[2] = z.HasValue ? z.GetValueOrDefault() : 0.0;
            double?m = this.M;

            fields[3] = m.HasValue ? m.GetValueOrDefault() : 0.0;
            return(Geography.ComputeHashCodeFor <double>(base.CoordinateSystem, fields));
        }
Exemple #2
0
 internal bool?BaseEquals(Geography other)
 {
     if (other == null)
     {
         return(false);
     }
     if (object.ReferenceEquals(this, other))
     {
         return(true);
     }
     if (!this.coordinateSystem.Equals(other.coordinateSystem))
     {
         return(false);
     }
     if (this.IsEmpty || other.IsEmpty)
     {
         return(new bool?(this.IsEmpty && other.IsEmpty));
     }
     return(null);
 }
Exemple #3
0
 /// <summary>
 /// Get Hashcode
 /// </summary>
 /// <returns>The hashcode</returns>
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor(this.CoordinateSystem, new[] { this.IsEmpty ? 0 : this.X, this.IsEmpty ? 0 : this.Y, this.Z ?? 0, this.M ?? 0 }));
 }
Exemple #4
0
 /// <summary>Gets the hash code.</summary>
 /// <returns>The hash code.</returns>
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor(this.CoordinateSystem, this.Points));
 }
Exemple #5
0
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <Geometry>(base.CoordinateSystem, this.Geometries));
 }
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <int>(base.CoordinateSystem, new int[1]));
 }
 public static double?Distance(this Geography operand1, Geography operand2)
 {
     return(OperationsFor(new Geography[] { operand1, operand2 }).IfValidReturningNullable <SpatialOperations, double>(ops => ops.Distance(operand1, operand2)));
 }
 /// <summary>Determines if geography point and polygon will intersect.</summary>
 /// <returns>The operation result.</returns>
 /// <param name="operand1">The first operand.</param>
 /// <param name="operand2">The second operand.</param>
 public static bool?Intersects(this Geography operand1, Geography operand2)
 {
     return(OperationsFor(operand1, operand2).IfValidReturningNullable(ops => ops.Intersects(operand1, operand2)));
 }
 /// <summary>Determines the Length of the geography LineString.</summary>
 /// <returns>The operation result.</returns>
 /// <param name="operand">The LineString operand.</param>
 public static double?Length(this Geography operand)
 {
     return(OperationsFor(operand).IfValidReturningNullable(ops => ops.Length(operand)));
 }
 /// <summary>Determines the distance of the geography.</summary>
 /// <returns>The operation result.</returns>
 /// <param name="operand1">The first operand.</param>
 /// <param name="operand2">The second operand.</param>
 public static double?Distance(this Geography operand1, Geography operand2)
 {
     return(OperationsFor(operand1, operand2).IfValidReturningNullable(ops => ops.Distance(operand1, operand2)));
 }
Exemple #11
0
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <GeographyPolygon>(base.CoordinateSystem, this.Polygons));
 }
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <GeographyLineString>(base.CoordinateSystem, this.Rings));
 }
Exemple #13
0
 public virtual double Distance(Geography operand1, Geography operand2)
 {
     throw new NotImplementedException();
 }
Exemple #14
0
 /// <summary>Indicates a Geography Intersects() method.</summary>
 /// <returns>The operation result.</returns>
 /// <param name="operand1">The Operand 1, point.</param>
 /// <param name="operand2">The Operand 2, polygon.</param>
 public virtual bool Intersects(Geography operand1, Geography operand2)
 {
     throw new NotImplementedException();
 }
Exemple #15
0
 /// <summary>Indicates a Geography LineString's length.</summary>
 /// <returns>The operation result.</returns>
 /// <param name="operand">The Operand.</param>
 public virtual double Length(Geography operand)
 {
     throw new NotImplementedException();
 }