turf.rhumbDestination
What is turf.rhumbDestination?
turf.rhumbDestination computes the endpoint reached by travelling a given distance on a constant bearing (rhumb line) from a start Point. It is the rhumb counterpart to turf.destination, which uses great-circle math.
turf.rhumbDestination(origin, distance, bearing, options?) → Feature<Point>Options include:
units—'kilometers'(default),'meters','miles','nauticalmiles','radians','degrees'properties— object assigned to the output point'sproperties
When would you use turf.rhumbDestination?
Use turf.rhumbDestination in maritime or traditional navigation UIs where constant-heading paths are assumed. It is also the right choice when you want the projected point to appear on a straight line on a Mercator-projected map, because rhumb lines draw straight on Mercator.
Combined with turf.rhumbBearing and turf.rhumbDistance, it forms the set of rhumb-line primitives for nautical route drawing or historical cartographic applications.
undefinedFAQs
Should I use this or turf.destination?
Use turf.destination for shortest-path (great-circle) scenarios like aviation and minimum-distance routing. Use turf.rhumbDestination when the domain convention is constant-heading movement or when you need straight lines on Mercator displays.
How do I install just rhumbDestination?
npm install @turf/rhumb-destination. It depends only on @turf/helpers and @turf/invariant.
Is it accurate at high latitudes?
Rhumb-line math is well-defined and numerically stable except exactly at the poles. Near the poles the path behaves asymptotically — use great-circle routing (turf.destination) if your application covers polar regions.
Can I use any distance unit?
Yes — kilometers (default), meters, miles, nauticalmiles, radians, or degrees. Nautical miles are common in maritime contexts where rhumb lines are the natural choice.