Back to Devexpress

GeoUtils.CalculateArea(IList<GeoPoint>) Method

windowsforms-devexpress-dot-xtramap-dot-geoutils-dot-calculatearea-x28-system-dot-collections-dot-generic-dot-ilist-devexpress-dot-xtramap-dot-geopoint-x29.md

latest2.0 KB
Original Source

GeoUtils.CalculateArea(IList<GeoPoint>) Method

Computes the area of a closed shape formed by the given points.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public static double CalculateArea(
    IList<GeoPoint> points
)
vb
Public Shared Function CalculateArea(
    points As IList(Of GeoPoint)
) As Double

Parameters

NameTypeDescription
pointsIList<GeoPoint>

The points that define the map shape vertices.

|

Returns

TypeDescription
Double

The map shape area in squire meters.

|

Remarks

The following example shows how to compute a map shape area:

csharp
double areaByPoints = GeoUtils.CalculateArea(new List<GeoPoint> {
    new GeoPoint(41, -109),
    new GeoPoint(41, -102),
    new GeoPoint(37, -102),
    new GeoPoint(37, -109)
});
vb
Dim areaByPoints As Double = GeoUtils.CalculateArea(New List(Of GeoPoint) From {
    New GeoPoint(41, -109),
    New GeoPoint(41, -102),
    New GeoPoint(37, -102),
    New GeoPoint(37, -109)
})

See Also

GeoUtils Class

GeoUtils Members

DevExpress.XtraMap Namespace