Exemplo n.º 1
0
        public override byte[] AsBinary(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            ReadOnlySpatialValues expectedValue = CheckCompatible(geographyValue);

            return(expectedValue.CloneBinary());
        }
Exemplo n.º 2
0
        public override string AsGml(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            ReadOnlySpatialValues expectedValue = CheckCompatible(geographyValue);

            return(expectedValue.GML);
        }
Exemplo n.º 3
0
        public override int GetCoordinateSystemId(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            ReadOnlySpatialValues backingValue = CheckCompatible(geographyValue);

            return(backingValue.CoordinateSystemId);
        }
Exemplo n.º 4
0
        public override DbGeographyWellKnownValue CreateWellKnownValue(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            ReadOnlySpatialValues backingValue = CheckCompatible(geographyValue);

            return(new DbGeographyWellKnownValue()
            {
                CoordinateSystemId = backingValue.CoordinateSystemId, WellKnownBinary = backingValue.CloneBinary(), WellKnownText = backingValue.Text
            });
        }
 /// <summary>
 /// Computes the symmetric difference of this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the symmetric difference with this value should be computed.</param>
 /// <returns>A new DbGeography value representing the symmetric difference between this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeography SymmetricDifference(DbGeography other)
 {
     other.CheckNull("other");
     return(this.spatialSvcs.SymmetricDifference(this, other));
 }
 /// <summary>
 /// Computes the union of this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the union with this value should be computed.</param>
 /// <returns>A new DbGeography value representing the union between this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeography Union(DbGeography other)
 {
     other.CheckNull("other");
     return(this.spatialSvcs.Union(this, other));
 }
 /// <summary>
 /// Computes the intersection of this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the intersection with this value should be computed.</param>
 /// <returns>A new DbGeography value representing the intersection between this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeography Intersection(DbGeography other)
 {
     other.CheckNull("other");
     return(this.spatialSvcs.Intersection(this, other));
 }
 /// <summary>
 /// Computes the distance between the closest points in this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the distance from this value should be computed.</param>
 /// <returns>A double value that specifies the distance between the two closest points in this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public double?Distance(DbGeography other)
 {
     other.CheckNull("other");
     return(this.spatialSvcs.Distance(this, other));
 }
 /// <summary>
 /// Determines whether this DbGeography is spatially disjoint from the specified DbGeography argument.
 /// </summary>
 /// <param name="other">The geography value that should be compared with this geography value for disjointness.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is disjoint from this geography value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Disjoint(DbGeography other)
 {
     other.CheckNull("other");
     return(this.spatialSvcs.Disjoint(this, other));
 }
 /// <summary>
 /// Determines whether this DbGeography is spatially equal to the specified DbGeography argument.
 /// </summary>
 /// <param name="other">The geography value that should be compared with this geography value for equality.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is spatially equal to this geography value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool SpatialEquals(DbGeography other)
 {
     other.CheckNull("other");
     return(this.spatialSvcs.SpatialEquals(this, other));
 }
Exemplo n.º 11
0
 /// <summary>
 /// Computes the distance between the closest points in this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the distance from this value should be computed.</param>
 /// <returns>A double value that specifies the distance between the two closest points in this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public double? Distance(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.Distance(this, other);
 }
Exemplo n.º 12
0
 public override byte[] AsBinary(DbGeography geographyValue)
 {
     geographyValue.CheckNull("geographyValue");
     ReadOnlySpatialValues expectedValue = CheckCompatible(geographyValue);
     return expectedValue.CloneBinary();
 }
Exemplo n.º 13
0
 /// <summary>
 /// Computes the symmetric difference of this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the symmetric difference with this value should be computed.</param>
 /// <returns>A new DbGeography value representing the symmetric difference between this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeography SymmetricDifference(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.SymmetricDifference(this, other);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Computes the union of this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the union with this value should be computed.</param>
 /// <returns>A new DbGeography value representing the union between this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeography Union(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.Union(this, other);
 }
Exemplo n.º 15
0
 /// <summary>
 /// Computes the intersection of this DbGeography value and another DbGeography value.
 /// </summary>
 /// <param name="other">The geography value for which the intersection with this value should be computed.</param>
 /// <returns>A new DbGeography value representing the intersection between this geography value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeography Intersection(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.Intersection(this, other);
 }
Exemplo n.º 16
0
 public override DbGeographyWellKnownValue CreateWellKnownValue(DbGeography geographyValue)
 {
     geographyValue.CheckNull("geographyValue");
     ReadOnlySpatialValues backingValue = CheckCompatible(geographyValue);
     return new DbGeographyWellKnownValue() { CoordinateSystemId = backingValue.CoordinateSystemId, WellKnownBinary = backingValue.CloneBinary(), WellKnownText = backingValue.Text };
 }
Exemplo n.º 17
0
 /// <summary>
 /// Determines whether this DbGeography is spatially disjoint from the specified DbGeography argument.
 /// </summary>
 /// <param name="other">The geography value that should be compared with this geography value for disjointness.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is disjoint from this geography value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Disjoint(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.Disjoint(this, other);
 }
Exemplo n.º 18
0
 public override int GetCoordinateSystemId(DbGeography geographyValue)
 {
     geographyValue.CheckNull("geographyValue");
     ReadOnlySpatialValues backingValue = CheckCompatible(geographyValue);
     return backingValue.CoordinateSystemId;
 }
Exemplo n.º 19
0
 /// <summary>
 /// Determines whether this DbGeography value spatially intersects the specified DbGeography argument.
 /// </summary>
 /// <param name="other">The geography value that should be compared with this geography value for intersection.</param>
 /// <returns><c>true</c> if <paramref name="other"/> intersects this geography value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Intersects(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.Intersects(this, other);
 }
Exemplo n.º 20
0
 public override string AsGml(DbGeography geographyValue)
 {
     geographyValue.CheckNull("geographyValue");
     ReadOnlySpatialValues expectedValue = CheckCompatible(geographyValue);
     return expectedValue.GML;
 }
Exemplo n.º 21
0
 /// <summary>
 /// Determines whether this DbGeography is spatially equal to the specified DbGeography argument.
 /// </summary>
 /// <param name="other">The geography value that should be compared with this geography value for equality.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is spatially equal to this geography value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool SpatialEquals(DbGeography other)
 {
     other.CheckNull("other");
     return this.spatialSvcs.SpatialEquals(this, other);
 }