Back to Devexpress

GeoUtils.CalculateArea(List<GeoPoint>) Method

wpf-devexpress-dot-xpf-dot-map-dot-geoutils-dot-calculatearea-x28-system-dot-collections-dot-generic-dot-list-devexpress-dot-xpf-dot-map-dot-geopoint-x29.md

latest2.0 KB
Original Source

GeoUtils.CalculateArea(List<GeoPoint>) Method

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

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

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

Parameters

NameTypeDescription
pointsList<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 use the CalculateArea method 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.Xpf.Map Namespace