本文整理汇总了C#中IFeature.Area方法的典型用法代码示例。如果您正苦于以下问题:C# IFeature.Area方法的具体用法?C# IFeature.Area怎么用?C# IFeature.Area使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFeature
的用法示例。
在下文中一共展示了IFeature.Area方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AreaOfPart
/// <summary>
/// Calculates the area of a part, without taking into consideration any other aspects of the polygon.
/// </summary>
/// <param name="polygon">A MapWinGIS.Shape POLYGON, POLYGONZ, or POLYGONM</param>
/// <param name="PartIndex">The integer index of the part to obtain the area of.
/// This value will be ignored if the shape only has one part, and the function
/// will calculate the area of the entire shape.</param>
/// <returns>A double value that is equal to the area of the part.</returns>
/// <remarks>Coded by Ted Dunsford 6/23/2006, derived from Angela's Area algorithm
/// Code reference http://astronomy.swin.edu.au/~pbourke/geometry/polyarea/
/// Cached in MapWinGeoProc\clsUtils\Documentation\
/// I don't think that we ever want to return a negative area from this function,
/// even if the part is a hole, because it is being calculated outside of the
/// context of any other parts. Only the collective Area function should worry about
/// ascribing a sign value to the individual part areas.
///</remarks>
public static double AreaOfPart(IFeature polygon, int PartIndex)
{
return polygon.Area();
}