本文整理汇总了C#中IGeometry.Covers方法的典型用法代码示例。如果您正苦于以下问题:C# IGeometry.Covers方法的具体用法?C# IGeometry.Covers怎么用?C# IGeometry.Covers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGeometry
的用法示例。
在下文中一共展示了IGeometry.Covers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckContainment
private void CheckContainment(IGeometry geom, IGeometry buffer)
{
var isCovered = true;
var errMsg = "";
if (_distance > 0)
{
isCovered = buffer.Covers(geom);
errMsg = "Geometry is not contained in (positive) buffer";
}
else if (_distance < 0)
{
errMsg = "Geometry does not contain (negative) buffer";
// covers is always false for empty geometries, so don't bother testing them
if (buffer.IsEmpty)
{
isCovered = true;
}
else
{
isCovered = geom.Covers(buffer);
}
}
if (!isCovered)
{
ReportError(errMsg, null);
}
}
示例2: CoveredBy
/// <summary>
/// Returns <c>true</c> if this geometry is covered by the specified geometry.
/// <para>
/// The <c>CoveredBy</c> predicate has the following equivalent definitions:
/// - Every point of this geometry is a point of the other geometry.
/// - The DE-9IM Intersection Matrix for the two geometries is <c>T*F**F***</c> or <c>*TF**F***</c> or <c>**FT*F***</c> or <c>**F*TF***</c>.
/// - <c>g.Covers(this)</c> (<c>CoveredBy</c> is the inverse of <c>Covers</c>).
/// </para>
/// Notice the difference between <c>CoveredBy</c> and <c>Within</c>: <c>CoveredBy</c> is a more inclusive relation.
/// </summary>
/// <param name="g">The <c>Geometry</c> with which to compare this <c>Geometry</c></param>.
/// <returns><c>true</c> if this <c>Geometry</c> is covered by <paramref name="g" />.</returns>
/// <seealso cref="Geometry.Within" />
/// <seealso cref="Geometry.Covers" />
public virtual bool CoveredBy(IGeometry g)
{
return g.Covers(this);
}