flopp/py-staticmaps

Line arc extreme on long distances

Opened this issue · 3 comments

Greetings. I would like to address an issue that is problematic to me using the library.

I create a journey that is from eastern Europe to the western USA.

The line, post-Mercator projection is so high that it covers Greenland.

Is there any way to adjust the height of the arc or is it only ever relative to the curvature of the earth between the distance of the to/from coordinates?

flopp commented

The line drawn between two points is the shortest surface path between those points and thus is a segment of a "great circle" (see https://en.wikipedia.org/wiki/Great_circle). Due to the mercator projection, these direct paths end up as curves.

Here's an example for the direct path between Kiev and San Francisco (you can switch between a 3D globe view and the mercator projection using the top right icons):

https://www.greatcirclemap.com/globe?routes=KBP-SFO

The direct path indeed goes across greenland, so the "extreme arc" drawn by py-staticmaps is correct.

3d-globe
mercator

flopp commented

BTW, sorry for my late reply...

Thanks for the reply. I was just trying to make it more aesthetically pleasing.