[QGIS-Developer] crossing the antimeridian

Fran Raga franka1986 at gmail.com
Wed May 13 12:04:33 PDT 2020


Hi.

I have a question about the QGIS algorithm to calculate the lines that
cross the antimeridian.
Looking at the code I see that it uses the value 120 or -120 to know if
we're going west or the east.
https://github.com/qgis/QGIS/blob/cdc9a841c9caf308d24448597dfa8a2aea48fac3/src/core/qgsdistancearea.cpp#L464

 I think this algorithm is based on qgis-shapetools-plugin which also uses
that value.

https://github.com/NationalSecurityAgency/qgis-shapetools-plugin/blob/master/utils.py#L43

My question is, why 120 degrees? Why is that value used and not another one
like 170 for example?
Is this algorithm based on any paper? Is there any documentation?
On the other hand, is there any paper, or implementation to calculate the
lines that cross the poles?

thanks and regards

*Francisco Raga** | *Full-Stack Open Source GIS Developer

Móvil: (+34) 654275432* | *e-Mail: franka1986 at gmail.com *| *skype:
francisco_raga
Github: https://goo.gl/ydNTjY *| *Linkedin: https://goo.gl/TCfj8S *| *Site:
https://goo.gl/qiypDj

"La vida real no tiene ningún mapa.."  Ivy Compton Burnett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200513/f080b069/attachment.html>


More information about the QGIS-Developer mailing list