本文整理汇总了C#中System.Data.Entity.Spatial.DbGeometry类的典型用法代码示例。如果您正苦于以下问题:C# DbGeometry类的具体用法?C# DbGeometry怎么用?C# DbGeometry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DbGeometry类属于System.Data.Entity.Spatial命名空间,在下文中一共展示了DbGeometry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SpatialGeometry
internal SpatialGeometry(DbGeometry g, ICoordinateSystem coordinateSystem)
{
Debug.Assert(g!=null);
if (g==null)
throw new ArgumentNullException("g");
_Geometry=g;
_CoordinateSystem=coordinateSystem;
}
示例2: PointAt
/// <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);
示例3: Union
/// <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);
}
示例4: Relate
/// <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);
}
示例5: Within
/// <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);
}
示例6: Disjoint
/// <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);
}
示例7: DbGeometryAdapter
internal DbGeometryAdapter(DbGeometry value)
{
DebugCheck.NotNull(value);
_value = value;
}
示例8: InteriorRingAt
/// <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);
示例9: AppendValue
private void AppendValue(DbGeometry value, StringBuilder sql)
{
sql.Append("'");
sql.Append(value);
sql.Append("'");
}
示例10: GetExteriorRing
/// <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);
示例11: GetInteriorRingCount
/// <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);
示例12: GetPointOnSurface
/// <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);
示例13: GetCentroid
public abstract DbGeometry GetCentroid(DbGeometry geometryValue);
示例14: GetArea
/// <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);
示例15: Reduce
public static DbGeometry Reduce(DbGeometry geometryValue, Double? tolerance)
{
throw new NotSupportedException(Strings.ELinq_DbFunctionDirectCall);
}