Skip to content
Select language:English

MCL 1.3.5

fun move(east: Double, north: Double): Coord2D

Calculates a new set of coordinates based on the given offsets (in meters).

This function uses a planar approximation via LocalTangentPlane, making it computationally efficient but accurate only for short distances (e.g., within a few kilometers). For long-range calculations or higher accuracy over large areas, use Geodesy.distanceHaversine or Geodesy.distanceVincenty.

Performance Note: This method instantiates a new LocalTangentPlane on every call. If you are calculating distances from this point to many different locations, it is more efficient to create a single LocalTangentPlane instance using this point as the origin and call LocalTangentPlane.distance repeatedly.

Return

A new set of coordinates representing the moved location.

Parameters

east

The distance to move east, in meters.

north

The distance to move north, in meters.