Ejemplo n.º 1
0
        internal SpatialGeometry(DbGeometry g, ICoordinateSystem coordinateSystem)
        {
            Debug.Assert(g!=null);
            if (g==null)
                throw new ArgumentNullException("g");

            _Geometry=g;
            _CoordinateSystem=coordinateSystem;
        }
Ejemplo n.º 2
0
 /// <summary> Determines whether this DbGeometry is spatially disjoint from the specified DbGeometry argument. </summary>
 /// <returns>true if other is disjoint from this geometry value; otherwise false.</returns>
 /// <param name="other">The geometry value that should be compared with this geometry value for disjointness.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public bool Disjoint(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(this._spatialProvider.Disjoint(this, other));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Determines whether this DbGeometry value spatially relates to the specified DbGeometry argument according to the
 /// given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern.
 /// </summary>
 /// <param name="other">The geometry value that should be compared with this geometry value for relation.</param>
 /// <param name="matrix">A string that contains the text representation of the (DE-9IM) intersection pattern that defines the relation.</param>
 /// <returns><c>true</c> if this geometry value relates to <paramref name="other"/> according to the specified intersection pattern matrix; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> or <paramref name="matrix"/> is null.</exception>
 public bool Relate(DbGeometry other, string matrix)
 {
     Contract.Requires(other != null);
     Contract.Requires(matrix != null);
     return _spatialProvider.Relate(this, other, matrix);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Determines whether this DbGeometry is spatially disjoint from the specified DbGeometry argument.
 /// </summary>
 /// <param name="other">The geometry value that should be compared with this geometry value for disjointness.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is disjoint from this geometry value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Disjoint(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.Disjoint(this, other);
 }
 public static Boolean? Filter(DbGeometry geometryValue, DbGeometry geometryOther)
 {
     throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
 }
Ejemplo n.º 6
0
 /// <summary>
 ///     Returns the number of interior rings in the given <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value, if it represents a polygon.
 /// </summary>
 /// <returns>The number of elements in geometryValue, if it represents a polygon; otherwise null.</returns>
 /// <param name="geometryValue">The geometry value, which need not represent a polygon.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract int? GetInteriorRingCount(DbGeometry geometryValue);
 /// <summary>
 /// Generates code to specify the default value for a <see cref="DbGeometry" /> column.
 /// </summary>
 /// <param name="defaultValue"> The value to be used as the default. </param>
 /// <returns> Code representing the default value. </returns>
 protected virtual string Generate(DbGeometry defaultValue)
 {
     return "DbGeometry.FromText(\"" + defaultValue.AsText() + "\", " + defaultValue.CoordinateSystemId + ")";
 }
Ejemplo n.º 8
0
 /// <summary> Computes the symmetric difference between this DbGeometry value and another DbGeometry value. </summary>
 /// <returns>A new DbGeometry value representing the symmetric difference between this geometry value and other.</returns>
 /// <param name="other">The geometry value for which the symmetric difference with this value should be computed.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public DbGeometry SymmetricDifference(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(this._spatialProvider.SymmetricDifference(this, other));
 }
Ejemplo n.º 9
0
 public override DbGeometry GetBoundary(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 10
0
 /// <summary> Computes the distance between the closest points in this DbGeometry value and another DbGeometry value. </summary>
 /// <returns>A double value that specifies the distance between the two closest points in this geometry value and other.</returns>
 /// <param name="other">The geometry value for which the distance from this value should be computed.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public double?Distance(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(new double?(this._spatialProvider.Distance(this, other)));
 }
Ejemplo n.º 11
0
 /// <summary> Computes the union of this DbGeometry value and another DbGeometry value. </summary>
 /// <returns>A new DbGeometry value representing the union between this geometry value and other.</returns>
 /// <param name="other">The geometry value for which the union with this value should be computed.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public DbGeometry Union(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(this._spatialProvider.Union(this, other));
 }
Ejemplo n.º 12
0
 /// <summary> Determines whether this DbGeometry value spatially relates to the specified DbGeometry argument according to the given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern. </summary>
 /// <returns>true if this geometry value relates to other according to the specified intersection pattern matrix; otherwise false.</returns>
 /// <param name="other">The geometry value that should be compared with this geometry value for relation.</param>
 /// <param name="matrix">A string that contains the text representation of the (DE-9IM) intersection pattern that defines the relation.</param>
 /// <exception cref="T:System.ArgumentNullException">othermatrix</exception>
 public bool Relate(DbGeometry other, string matrix)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     Check.NotNull <string>(matrix, nameof(matrix));
     return(this._spatialProvider.Relate(this, other, matrix));
 }
Ejemplo n.º 13
0
 /// <summary> Determines whether this DbGeometry value spatially overlaps the specified DbGeometry argument. </summary>
 /// <returns>true if this geometry value overlaps other; otherwise false.</returns>
 /// <param name="other">The geometry value that should be compared with this geometry value for overlap.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public bool Overlaps(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(this._spatialProvider.Overlaps(this, other));
 }
Ejemplo n.º 14
0
 /// <summary> Determines whether this DbGeometry value spatially intersects the specified DbGeometry argument. </summary>
 /// <returns>true if other intersects this geometry value; otherwise false.</returns>
 /// <param name="other">The geometry value that should be compared with this geometry value for intersection.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public bool Intersects(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(this._spatialProvider.Intersects(this, other));
 }
Ejemplo n.º 15
0
 /// <summary>
 ///     Returns a nullable double value that indicates the area of the given
 ///     <see
 ///         cref="T:System.Data.Entity.Spatial.DbGeometry" />
 ///     value, which may be null if the value does not represent a surface.
 /// </summary>
 /// <returns>
 ///     A nullable double value that indicates the area of the given <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value.
 /// </returns>
 /// <param name="geometryValue">The geometry value, which need not represent a surface.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract double? GetArea(DbGeometry geometryValue);
Ejemplo n.º 16
0
 public override int GetDimension(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 17
0
 /// <summary>
 ///     Returns a <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value that represents a point on the surface of the given DbGeometry value, which may be null if the value does not represent a surface.
 /// </summary>
 /// <returns>
 ///     A <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value that represents a point on the surface of the given DbGeometry value.
 /// </returns>
 /// <param name="geometryValue">The geometry value, which need not represent a surface.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract DbGeometry GetPointOnSurface(DbGeometry geometryValue);
Ejemplo n.º 18
0
 public override DbGeometry GetEnvelope(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
 private void AppendValue(DbGeometry value, StringBuilder sql)
 {
     sql.Append("'");
     sql.Append(value);
     sql.Append("'");
 }
Ejemplo n.º 20
0
 public override string GetSpatialTypeName(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
 public static DbGeometry BufferWithTolerance(DbGeometry geometryValue, Double? distance, Double? tolerance, Boolean? relative)
 {
     throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
 }
Ejemplo n.º 22
0
 public override bool Overlaps(DbGeometry geometryValue, DbGeometry otherGeometry)
 {
     throw SpatialServicesUnavailable();
 }
 public static DbGeometry Reduce(DbGeometry geometryValue, Double? tolerance)
 {
     throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
 }
Ejemplo n.º 24
0
 public override bool Relate(DbGeometry geometryValue, DbGeometry otherGeometry, string matrix)
 {
     throw SpatialServicesUnavailable();
 }
        internal DbGeometryAdapter(DbGeometry value)
        {
            DebugCheck.NotNull(value);

            _value = value;
        }
Ejemplo n.º 26
0
 public override DbGeometry Buffer(DbGeometry geometryValue, double distance)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Determines whether this DbGeometry value is spatially within the specified DbGeometry argument.
 /// </summary>
 /// <param name="other">The geometry value that should be compared with this geometry value for containment.</param>
 /// <returns><c>true</c> if this geometry value is within <paramref name="other"/>; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Within(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.Within(this, other);
 }
Ejemplo n.º 28
0
 public override double Distance(DbGeometry geometryValue, DbGeometry otherGeometry)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Computes the union of this DbGeometry value and another DbGeometry value.
 /// </summary>
 /// <param name="other">The geometry value for which the union with this value should be computed.</param>
 /// <returns>A new DbGeometry value representing the union between this geometry value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeometry Union(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.Union(this, other);
 }
Ejemplo n.º 30
0
 public override DbGeometry GetConvexHull(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 31
0
 /// <summary>
 ///     Returns a point element of the given <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value, if it represents a linestring or linear ring.
 /// </summary>
 /// <returns>The point in geometryValue at position index, if it represents a linestring or linear ring; otherwise null.</returns>
 /// <param name="geometryValue">The geometry value, which need not represent a linestring or linear ring.</param>
 /// <param name="index">The position within the geometry value from which the element should be taken.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract DbGeometry PointAt(DbGeometry geometryValue, int index);
Ejemplo n.º 32
0
 public override DbGeometry Union(DbGeometry geometryValue, DbGeometry otherGeometry)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 33
0
 public abstract DbGeometry GetCentroid(DbGeometry geometryValue);
Ejemplo n.º 34
0
 public override DbGeometry SymmetricDifference(DbGeometry geometryValue, DbGeometry otherGeometry)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 35
0
 /// <summary>
 ///     Returns a <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value that represents the exterior ring of the given DbGeometry value, which may be null if the value does not represent a polygon.
 /// </summary>
 /// <returns>A DbGeometry value representing the exterior ring on geometryValue, if it represents a polygon; otherwise null.</returns>
 /// <param name="geometryValue">The geometry value, which need not represent a polygon.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract DbGeometry GetExteriorRing(DbGeometry geometryValue);
Ejemplo n.º 36
0
 public override double?GetYCoordinate(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 37
0
 /// <summary>
 ///     Returns an interior ring from the given <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value, if it represents a polygon.
 /// </summary>
 /// <returns>The interior ring in geometryValue at position index, if it represents a polygon; otherwise null.</returns>
 /// <param name="geometryValue">The geometry value, which need not represent a polygon.</param>
 /// <param name="index">The position within the geometry value from which the element should be taken.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract DbGeometry InteriorRingAt(DbGeometry geometryValue, int index);
Ejemplo n.º 38
0
 public override DbGeometry GetStartPoint(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
 /// <summary>
 /// Generates SQL to specify a constant geometry default value being set on a column.
 /// This method just generates the actual value, not the SQL to set the default value.
 /// </summary>
 /// <param name="defaultValue"> The value to be set. </param>
 /// <returns> SQL representing the default value. </returns>
 protected virtual string Generate(DbGeometry defaultValue)
 {
     return "'" + defaultValue + "'";
 }
Ejemplo n.º 40
0
 public override bool?GetIsRing(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
 public static String AsTextZM(DbGeometry geometryValue)
 {
     throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
 }
Ejemplo n.º 42
0
 public override int?GetPointCount(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
 public static Boolean? InstanceOf(DbGeometry geometryValue, String geometryTypeName)
 {
     throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
 }
Ejemplo n.º 44
0
 public override DbGeometry PointAt(DbGeometry geometryValue, int index)
 {
     throw SpatialServicesUnavailable();
 }
 public static DbGeometry MakeValid(DbGeometry geometryValue)
 {
     throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
 }
Ejemplo n.º 46
0
 public override double?GetArea(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 47
0
 /// <summary>Creates a new instance of the <see cref="SpatialGeometry" /> class.</summary>
 public SpatialGeometry(DbGeometry g) :
     this(g, null)
 {
 }
Ejemplo n.º 48
0
 public override DbGeometry GetCentroid(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 49
0
 public ParameterModel Geometry(
     DbGeometry defaultValue = null,
     string defaultValueSql = null,
     string name = null,
     string storeType = null,
     bool outParameter = false)
 {
     return BuildParameter(
         PrimitiveTypeKind.Geometry,
         defaultValue,
         defaultValueSql,
         name: name,
         storeType: storeType,
         outParameter: outParameter);
 }
Ejemplo n.º 50
0
 public override DbGeometry GetPointOnSurface(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 51
0
 /// <summary>
 /// Determines whether this DbGeometry is spatially equal to the specified DbGeometry argument.
 /// </summary>
 /// <param name="other">The geometry value that should be compared with this geometry value for equality.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is spatially equal to this geometry value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool SpatialEquals(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.SpatialEquals(this, other);
 }
Ejemplo n.º 52
0
 public override DbGeometry GetExteriorRing(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 53
0
 /// <summary>
 /// Determines whether this DbGeometry value spatially intersects the specified DbGeometry argument.
 /// </summary>
 /// <param name="other">The geometry value that should be compared with this geometry value for intersection.</param>
 /// <returns><c>true</c> if <paramref name="other"/> intersects this geometry value; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Intersects(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.Intersects(this, other);
 }
Ejemplo n.º 54
0
 public override int?GetInteriorRingCount(DbGeometry geometryValue)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 55
0
 /// <summary>
 /// Determines whether this DbGeometry value spatially overlaps the specified DbGeometry argument.
 /// </summary>
 /// <param name="other">The geometry value that should be compared with this geometry value for overlap.</param>
 /// <returns><c>true</c> if this geometry value overlaps <paramref name="other"/>; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public bool Overlaps(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.Overlaps(this, other);
 }
Ejemplo n.º 56
0
 public override DbGeometry InteriorRingAt(DbGeometry geometryValue, int index)
 {
     throw SpatialServicesUnavailable();
 }
Ejemplo n.º 57
0
 /// <summary>
 /// Computes the distance between the closest points in this DbGeometry value and another DbGeometry value.
 /// </summary>
 /// <param name="other">The geometry 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 geometry value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public double? Distance(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.Distance(this, other);
 }
Ejemplo n.º 58
0
 /// <summary>
 ///     Returns the number of points in the given <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value, if it represents a linestring or linear ring.
 /// </summary>
 /// <returns>
 ///     The number of points in the given <see cref="T:System.Data.Entity.Spatial.DbGeometry" /> value.
 /// </returns>
 /// <param name="geometryValue">The geometry value, which need not represent a linestring or linear ring.</param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="geometryValue" />
 ///     is null.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     <paramref name="geometryValue" />
 ///     is not compatible with this spatial services implementation.
 /// </exception>
 public abstract int? GetPointCount(DbGeometry geometryValue);
Ejemplo n.º 59
0
 /// <summary>
 /// Computes the symmetric difference between this DbGeometry value and another DbGeometry value.
 /// </summary>
 /// <param name="other">The geometry value for which the symmetric difference with this value should be computed.</param>
 /// <returns>A new DbGeometry value representing the symmetric difference between this geometry value and <paramref name="other"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
 public DbGeometry SymmetricDifference(DbGeometry other)
 {
     Contract.Requires(other != null);
     return _spatialProvider.SymmetricDifference(this, other);
 }
Ejemplo n.º 60
0
 /// <summary> Determines whether this DbGeometry is spatially equal to the specified DbGeometry argument. </summary>
 /// <returns>true if other is spatially equal to this geometry value; otherwise false.</returns>
 /// <param name="other">The geometry value that should be compared with this geometry value for equality.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public bool SpatialEquals(DbGeometry other)
 {
     Check.NotNull <DbGeometry>(other, nameof(other));
     return(this._spatialProvider.SpatialEquals(this, other));
 }