Ejemplo n.º 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));
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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 }));
 }
Ejemplo n.º 4
0
 /// <summary>Gets the hash code.</summary>
 /// <returns>The hash code.</returns>
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor(this.CoordinateSystem, this.Points));
 }
Ejemplo n.º 5
0
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <Geometry>(base.CoordinateSystem, this.Geometries));
 }
Ejemplo n.º 6
0
 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)));
 }
Ejemplo n.º 8
0
 /// <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)));
 }
Ejemplo n.º 9
0
 /// <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)));
 }
Ejemplo n.º 10
0
 /// <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)));
 }
Ejemplo n.º 11
0
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <GeographyPolygon>(base.CoordinateSystem, this.Polygons));
 }
Ejemplo n.º 12
0
 public override int GetHashCode()
 {
     return(Geography.ComputeHashCodeFor <GeographyLineString>(base.CoordinateSystem, this.Rings));
 }
Ejemplo n.º 13
0
 public virtual double Distance(Geography operand1, Geography operand2)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }