My code leverages a very old .Net component that I'd like to replace with MapSuite code. I have a VB.Net Function that accepts a lat/lon point, a bearing (direction) in degrees, and a distance in meters and returns a lat/lon point that is translated from the input point by the distance specified in the direction specified by the bearing (as shown below). Are there similar routines available in MapSuite that can accomplish the same thing?
'Calculate lat/lon position from a start position to distance (in meters) away at a specified bearing
'Return lat/lon as a ThinkGeo Pointshape
Public Function TranslatePoint(ByVal point1LatDMS As Double, ByVal point1LonDMS As Double, ByVal bearing As Single, ByVal distanceMeters As Single) As PointShape
'setup position points:
Dim point1 As New Position(New GeoFramework.Longitude(point1LonDMS), New GeoFramework.Latitude(point1LatDMS))'Finally, make the calculation of intercept point
Dim translatedPoint As Position
translatedPoint = point1.TranslateTo(
New GeoFramework.Angle(bearing), New GeoFramework.Distance(distanceMeters, GeoFramework.DistanceUnit.Meters))'Convert to ThinkGeo PointShape type and return
Dim newPoint As New PointShape(translatedPoint.Longitude.DecimalDegrees, translatedPoint.Latitude.DecimalDegrees)Return newPointEnd Function