本文整理汇总了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;
}
示例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;
}
示例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));
}