Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.
The GeoUtils class contains methods that allow you to calculate geometric values (for example, a shape perimeter or area) based on geographical coordinates.
The following list contains the main GeoUtils methods:
double areaByPoints = GeoUtils.CalculateArea(new List<GeoPoint> {
new GeoPoint(41, -109),
new GeoPoint(41, -102),
new GeoPoint(37, -102),
new GeoPoint(37, -109)
});
Dim areaByPoints AsDouble = GeoUtils.CalculateArea(New List(Of GeoPoint) From {
New GeoPoint(41, -109),
New GeoPoint(41, -102),
New GeoPoint(37, -102),
New GeoPoint(37, -109)
})
double distance = GeoUtils.CalculateDistance(new GeoPoint(36.1, -115.1), new GeoPoint(34, -118.2));
Dim distance AsDouble = GeoUtils.CalculateDistance(New GeoPoint(36.1, -115.1), New GeoPoint(34, -118.2))
CalculateDistance(GeoPoint p1, GeoPoint p2, Boolean ignoreEllipsoidalEffects) determines the distance between two geographical points in meters. This CalculateDistance method overload allows you to specify whether to use the ellipsoidal-surface formula or spherical-surface formula to calculate the distance.
ImportsDevExpress.Xpf.MapPrivateSub OnButtonClick(ByVal sender AsObject, ByVal e As RoutedEventArgs)
Dim distance AsDouble = GeoUtils.CalculateDistance(New GeoPoint(-5.93107, -35.112723), New GeoPoint(4.253438, 5.47072), True)
EndSub
Dim startPoint As GeoPoint = New GeoPoint(53.1914, 001.4347)
Dim destinationPoint As GeoPoint = GeoUtils.CalculateDestinationPoint(startPoint, 17910000, 276.0117)
double lineLength = GeoUtils.CalculateLength(new List<GeoPoint> {
new GeoPoint(35.286, -111.1724),
new GeoPoint(38.3802, -110.9307),
new GeoPoint(36.9365, -102.493)
});
Dim lineLength AsDouble = GeoUtils.CalculateLength(New List(Of GeoPoint) From {
New GeoPoint(35.286, -111.1724),
New GeoPoint(38.3802, -110.9307),
New GeoPoint(36.9365, -102.493)
})