Click or drag to resize

CoordinateMove Method (Coordinate, Distance, Shape)

Move a coordinate a specified distance towards a target coordinate.

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public void Move(
	Coordinate target,
	Distance distance,
	Shape shape
)

Parameters

target
Type: CoordinateSharpCoordinate
Target coordinate
distance
Type: CoordinateSharpDistance
Distance toward target
shape
Type: CoordinateSharpShape
Shape of earth
Examples
The following example moves a coordinate 10km towards a target coordinate using ellipsoidal earth calculations.
//N 25º 0' 0" E 25º 0' 0"
Coordinate coord = Coordinate(25,25);

//Target Coordinate
Coordinate target = new Coordinate(26.5, 23.2);

Distance distance = new Distance(10, DistanceType.Kilometers);

//Move coordinate the specified distance
//towards target using ellipsoidal calculations
coord.Move(target, distance, Shape.Ellipsoid);

//New Coordinate - N 24º 56' 21.526" E 25º 4' 23.944"
See Also