当前位置: 首页>>代码示例>>C#>>正文


C# IGeometry.Covers方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:abrobston,项目名称:NHibernate.Spatial,代码行数:27,代码来源:BufferValidatedGeometryOperation.cs

示例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);
 }
开发者ID:joelmuzz,项目名称:DotSpatial,代码行数:18,代码来源:Geometry.cs


注:本文中的IGeometry.Covers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。