internal SpatialGeometry(DbGeometry g, ICoordinateSystem coordinateSystem) { Debug.Assert(g!=null); if (g==null) throw new ArgumentNullException("g"); _Geometry=g; _CoordinateSystem=coordinateSystem; }
/// <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)); }
/// <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); }
/// <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); }
/// <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 + ")"; }
/// <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)); }
public override DbGeometry GetBoundary(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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))); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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);
public override int GetDimension(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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);
public override DbGeometry GetEnvelope(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
private void AppendValue(DbGeometry value, StringBuilder sql) { sql.Append("'"); sql.Append(value); sql.Append("'"); }
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); }
public override bool Overlaps(DbGeometry geometryValue, DbGeometry otherGeometry) { throw SpatialServicesUnavailable(); }
public static DbGeometry Reduce(DbGeometry geometryValue, Double? tolerance) { throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall); }
public override bool Relate(DbGeometry geometryValue, DbGeometry otherGeometry, string matrix) { throw SpatialServicesUnavailable(); }
internal DbGeometryAdapter(DbGeometry value) { DebugCheck.NotNull(value); _value = value; }
public override DbGeometry Buffer(DbGeometry geometryValue, double distance) { throw SpatialServicesUnavailable(); }
/// <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); }
public override double Distance(DbGeometry geometryValue, DbGeometry otherGeometry) { throw SpatialServicesUnavailable(); }
/// <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); }
public override DbGeometry GetConvexHull(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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);
public override DbGeometry Union(DbGeometry geometryValue, DbGeometry otherGeometry) { throw SpatialServicesUnavailable(); }
public abstract DbGeometry GetCentroid(DbGeometry geometryValue);
public override DbGeometry SymmetricDifference(DbGeometry geometryValue, DbGeometry otherGeometry) { throw SpatialServicesUnavailable(); }
/// <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);
public override double?GetYCoordinate(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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);
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 + "'"; }
public override bool?GetIsRing(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
public static String AsTextZM(DbGeometry geometryValue) { throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall); }
public override int?GetPointCount(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
public static Boolean? InstanceOf(DbGeometry geometryValue, String geometryTypeName) { throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall); }
public override DbGeometry PointAt(DbGeometry geometryValue, int index) { throw SpatialServicesUnavailable(); }
public static DbGeometry MakeValid(DbGeometry geometryValue) { throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall); }
public override double?GetArea(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <summary>Creates a new instance of the <see cref="SpatialGeometry" /> class.</summary> public SpatialGeometry(DbGeometry g) : this(g, null) { }
public override DbGeometry GetCentroid(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
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); }
public override DbGeometry GetPointOnSurface(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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); }
public override DbGeometry GetExteriorRing(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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); }
public override int?GetInteriorRingCount(DbGeometry geometryValue) { throw SpatialServicesUnavailable(); }
/// <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); }
public override DbGeometry InteriorRingAt(DbGeometry geometryValue, int index) { throw SpatialServicesUnavailable(); }
/// <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); }
/// <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);
/// <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); }
/// <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)); }