terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

Accuracy of measurement with the line tool - investigation

Open AnaBelgun opened this issue 2 years ago • 3 comments

User feedback:

When in 2D the measure distance tool in Terria draws a straight line. Shouldn't that be the orthodromic line as google maps does? Also, the distances are quite different, 11500 km vs 14700km in Buenos Aires to Darwin. It seems that google maps is the right one (http://www.gcmap.com/mapui?P=DRW-EZE).

image

AnaBelgun avatar Oct 11 '21 01:10 AnaBelgun

There are two issues here, both are in Leaflet/2D mode (there are no problems in Cesium/3D mode):

  1. distance is wrong
  2. straight line should be a great arc in Leaflet mode

For 1 - the distance, I talked to the user and what they actually did was create the distance in two stages. First they clicked on Darwin and then they clicked somewhere between Darwin and South America, then they adjusted the area visible on the screen, and then they moved the second point to Buenos Aires. There is 1 or 2 bugs here: firstly, in 3D mode we can't move points but in 2D you can, secondly when you move a point in 2D the distance is not recalculated. We should decide what to fix.

For 2 - straight line we should make it draw a great circle, hopefully there is just a function to do that in Leaflet already, or on the internet somewhere.

meh9 avatar Oct 11 '21 04:10 meh9

something from here ? https://leafletjs.com/plugins.html#measurement like this one: https://github.com/ppete2/Leaflet.PolylineMeasure !!! big win win for Terria!!! 👍👍👍

juan-guerschman avatar Oct 11 '21 07:10 juan-guerschman

Update 15 Feb 23:

  • in progress

AnaBelgun avatar Feb 15 '23 02:02 AnaBelgun