summaryrefslogtreecommitdiff
path: root/src/3rdparty/proj/PJ_gall.c
diff options
context:
space:
mode:
authorAlex <qt-info@nokia.com>2011-05-06 12:59:37 +1000
committerAlex <qt-info@nokia.com>2011-05-06 12:59:37 +1000
commit31a6300090cf085c55ff43a999bdc8455d2f4b1b (patch)
tree75e7471720555ddd9409a58458faa48342583348 /src/3rdparty/proj/PJ_gall.c
parent336c5619c03cd338142f827ffcdaca855e35096c (diff)
downloadqtlocation-31a6300090cf085c55ff43a999bdc8455d2f4b1b.tar.gz
add snapshot of 3rdparty Proj library
support library for QtLocation
Diffstat (limited to 'src/3rdparty/proj/PJ_gall.c')
-rw-r--r--src/3rdparty/proj/PJ_gall.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/3rdparty/proj/PJ_gall.c b/src/3rdparty/proj/PJ_gall.c
new file mode 100644
index 00000000..3c507bd0
--- /dev/null
+++ b/src/3rdparty/proj/PJ_gall.c
@@ -0,0 +1,19 @@
+#define PJ_LIB__
+#include <projects.h>
+PROJ_HEAD(gall, "Gall (Gall Stereographic)") "\n\tCyl, Sph";
+#define YF 1.70710678118654752440
+#define XF 0.70710678118654752440
+#define RYF 0.58578643762690495119
+#define RXF 1.41421356237309504880
+FORWARD(s_forward); /* spheroid */
+ xy.x = XF * lp.lam;
+ xy.y = YF * tan(.5 * lp.phi);
+ return (xy);
+}
+INVERSE(s_inverse); /* spheroid */
+ lp.lam = RXF * xy.x;
+ lp.phi = 2. * atan(xy.y * RYF);
+ return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(gall) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)