本文整理汇总了C#中System.Data.Spatial.DbGeography类的典型用法代码示例。如果您正苦于以下问题:C# DbGeography类的具体用法?C# DbGeography怎么用?C# DbGeography使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DbGeography类属于System.Data.Spatial命名空间,在下文中一共展示了DbGeography类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AsGml
public override string AsGml(DbGeography geographyValue)
{
CheckParameterNotNull("geographyValue", geographyValue);
dynamic providerValue = geographyValue.ProviderValue;
return providerValue.AsGml().Value;
}
示例2: Buffer
public override DbGeography Buffer(DbGeography geographyValue, double distance)
{
CheckParameterNotNull("geographyValue", geographyValue);
dynamic providerValue = geographyValue.ProviderValue;
return GeographyFromProviderValue(providerValue.STBuffer(distance));
}
示例3: AsText
public override string AsText(DbGeography geographyValue)
{
CheckParameterNotNull("geographyValue", geographyValue);
dynamic providerValue = geographyValue.ProviderValue;
return providerValue.STAsText().ToSqlString().Value;
}
示例4: AsBinary
public override byte[] AsBinary(DbGeography geographyValue)
{
CheckParameterNotNull("geographyValue", geographyValue);
dynamic providerValue = geographyValue.ProviderValue;
return providerValue.STAsBinary().Value;
}
示例5: CheckCompatible
private static ReadOnlySpatialValues CheckCompatible(DbGeography geographyValue)
{
Debug.Assert(geographyValue != null, "Validate geographyValue is non-null before calling CheckCompatible");
if (geographyValue != null)
{
ReadOnlySpatialValues expectedValue = geographyValue.ProviderValue as ReadOnlySpatialValues;
if (expectedValue != null)
{
return expectedValue;
}
}
throw SpatialExceptions.GeographyValueNotCompatibleWithSpatialServices("geographyValue");
}
示例6: PointAt
public override DbGeography PointAt(DbGeography geographyValue, int index)
{
throw SpatialServicesUnavailable();
}
示例7: GetIsClosed
public override bool? GetIsClosed(DbGeography geographyValue)
{
throw SpatialServicesUnavailable();
}
示例8: SymmetricDifference
public override DbGeography SymmetricDifference(DbGeography geographyValue, DbGeography otherGeography)
{
throw SpatialServicesUnavailable();
}
示例9: Distance
public override double Distance(DbGeography geographyValue, DbGeography otherGeography)
{
throw SpatialServicesUnavailable();
}
示例10: Intersects
public override bool Intersects(DbGeography geographyValue, DbGeography otherGeography)
{
throw SpatialServicesUnavailable();
}
示例11: GetArea
/// <summary>
/// Returns a nullable double value that indicates the area of the given <see cref="DbGeography"/> value, which may be null if the value does not represent a surface.
/// <param name="geographyValue">The geography value, which need not represent a surface.</param>
/// <returns>The area of <paramref name="geographyValue"/>, if it represents a surface; otherwise <c>null</c>.</returns>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="geographyValue"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="geographyValue"/> is not compatible with this spatial services implementation.</exception>
public abstract double? GetArea(DbGeography geographyValue);
示例12: PointAt
/// <summary>
/// Returns a point element of the given <see cref="DbGeography"/> value, if it represents a linestring or linear ring.
/// <param name="geographyValue">The geography value, which need not represent a linestring or linear ring.</param>
/// <param name="index">The position within the geography value from which the element should be taken.</param>
/// <returns>The point in <paramref name="geographyValue"/> at position <paramref name="index"/>, if it represents a linestring or linear ring; otherwise <c>null</c>.</returns>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="geographyValue"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="geographyValue"/> is not compatible with this spatial services implementation.</exception>
public abstract DbGeography PointAt(DbGeography geographyValue, int index);
示例13: GetPointCount
/// <summary>
/// Returns the number of points in the given <see cref="DbGeography"/> value, if it represents a linestring or linear ring.
/// <param name="geographyValue">The geography value, which need not represent a linestring or linear ring.</param>
/// <returns>The number of elements in <paramref name="geographyValue"/>, if it represents a linestring or linear ring; otherwise <c>null</c>.</returns>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="geographyValue"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="geographyValue"/> is not compatible with this spatial services implementation.</exception>
public abstract int? GetPointCount(DbGeography geographyValue);
示例14: GetIsClosed
/// <summary>
/// Returns a nullable Boolean value that whether the given <see cref="DbGeography"/> value is closed, which may be null if the value does not represent a curve.
/// <param name="geographyValue">The geography value, which need not represent a curve.</param>
/// <returns><c>true</c> if <paramref name="geographyValue"/> represents a closed curve; <c>false</c> if <paramref name="geographyValue"/> represents a curve that is not closed; otherwise <c>null</c>.</returns>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="geographyValue"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="geographyValue"/> is not compatible with this spatial services implementation.</exception>
public abstract bool? GetIsClosed(DbGeography geographyValue);
示例15: GetEndPoint
/// <summary>
/// Returns a <see cref="DbGeography"/> value that represents the end point of the given DbGeography value, which may be null if the value does not represent a curve.
/// <param name="geographyValue">The geography value, which need not represent a curve.</param>
/// <returns>The end point of <paramref name="geographyValue"/>, if it represents a curve; otherwise <c>null</c>.</returns>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="geographyValue"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="geographyValue"/> is not compatible with this spatial services implementation.</exception>
public abstract DbGeography GetEndPoint(DbGeography geographyValue);