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


C# Geometry.Apply方法代码示例

本文整理汇总了C#中Geometry.Apply方法的典型用法代码示例。如果您正苦于以下问题:C# Geometry.Apply方法的具体用法?C# Geometry.Apply怎么用?C# Geometry.Apply使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Geometry的用法示例。


在下文中一共展示了Geometry.Apply方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoveCommonBits

 /// <summary>
 /// Removes the common coordinate bits from a Geometry.
 /// The coordinates of the Geometry are changed.
 /// </summary>
 /// <param name="geom">The Geometry from which to remove the common coordinate bits.</param>
 /// <returns>The shifted Geometry.</returns>
 public virtual Geometry RemoveCommonBits(Geometry geom)
 {
     if (_commonCoord.X == 0.0 && _commonCoord.Y == 0.0)
         return geom;
     Coordinate invCoord = new Coordinate(_commonCoord);
     invCoord.X = -invCoord.X;
     invCoord.Y = -invCoord.Y;
     Translater trans = new Translater(invCoord);
     geom.Apply(trans);
     geom.GeometryChanged();
     return geom;
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:18,代码来源:CommonBitsRemover.cs

示例2: GetCoordinates

 /// <summary>
 /// Returns a list containing a Coordinate from each Polygon, LineString, and Point
 /// found inside the specified point. Thus, if the specified point is
 /// not a GeometryCollection, an empty list will be returned.
 /// </summary>
 public static IList GetCoordinates(Geometry geom)
 {
     IList pts = new ArrayList();
     geom.Apply(new ConnectedElementPointFilter(pts));
     return pts;
 }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:11,代码来源:ConnectedElementPointFilter.cs

示例3: Add

 /// <summary>
 /// Adds a Geometry to be processed. May be called multiple times.
 /// Any dimension of Geometry may be added; the constituent linework will be
 /// extracted.
 /// </summary>
 /// <param name="geometry"></param>
 public virtual void Add(Geometry geometry)
 {
     geometry.Apply(new AnonymousGeometryComponentFilterImpl(this));
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:10,代码来源:LineMerger.cs


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