question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@turf/destination error with bearing=90

See original GitHub issue

I noticed the returned point is not exactly at 90 degrees from the input, i.e. the latitude changes. I’ll create an additional test in @turf/destination to highlight the error.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stebogitcommented, May 6, 2017

A module like @turf/rhumb-destination would probably also “solve” #684, as it would properly move a point of the exact/expected distance.

1reaction
stebogitcommented, May 6, 2017

@DenisCarriere after some research I found out the reason why this module returns an unexpected output is that it follows a great-circle distance to take in account the earth curvature, while somebody working on a 2D map would actually expect a movement along a Rhumb line.

geodesy is a great library that implements different methods along those lines.

I’d be happy to implement like @turf/rhumb-destination, @turf/rhumb-distance and @turf/rhumb-bearing modules using that library, or maybe taking cues from it, as I believe it might result in a not lightweight dependency

cc: @rowanwins

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced geospatial analysis - Turf.js
npm install @turf/destination ... 39.984]); var distance = 50; var bearing = 90; var options = {units: 'miles'}; var ... Error - if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found