py-staticmaps icon indicating copy to clipboard operation
py-staticmaps copied to clipboard

Line arc extreme on long distances

Open ghost opened this issue 3 years ago • 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?

ghost avatar Oct 15 '21 15:10 ghost

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 avatar Nov 06 '21 13:11 flopp

BTW, sorry for my late reply...

flopp avatar Nov 06 '21 13:11 flopp

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

ghost avatar Nov 08 '21 11:11 ghost