From 8a5fea73e1ac646bfe2db7dee8358116fef28fba Mon Sep 17 00:00:00 2001 From: Didier Richard Date: Sat, 5 Jan 2008 10:56:38 +0000 Subject: Add eqr and gslabsgm git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1428 4e78687f-474d-0410-85f9-8d5e500ac6b2 --- src/PJ_eqr.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/PJ_eqr.c (limited to 'src/PJ_eqr.c') diff --git a/src/PJ_eqr.c b/src/PJ_eqr.c new file mode 100644 index 00000000..f984e83b --- /dev/null +++ b/src/PJ_eqr.c @@ -0,0 +1,36 @@ +#ifndef lint +static const char SCCSID[]="@(#)PJ_eqr.c 4.5 07/07/18 ??? ???"; +#endif +#define PROJ_PARMS__ \ + double rc; + +#define PJ_LIB__ +# include +PROJ_HEAD(eqr, "Equidistant Cylindrical (Generalized)") + "\n\tCyl, Sph\n\tk_0= lat_ts="; +FORWARD(s_forward); /* spheroid */ + xy.x = P->rc * lp.lam * P->k0 * P->ra; + xy.y = (lp.phi - P->phi0) * P->k0 * P->ra; + return (xy); +} +INVERSE(s_inverse); /* spheroid */ + lp.lam = (xy.x * P->a) / (P->k0 * P->rc); + lp.phi = ((xy.y * P->a) / P->k0) + P->phi0; + return (lp); +} +FREEUP; if (P) pj_dalloc(P); } +ENTRY0(eqr) + /* DGR, 2007-08-29 : due to Geoconcept bad implementation */ + /* phi0 no longer use lat_ts ! */ + if ((P->rc = cos(pj_param(P->params, "rlat_ts").f)) <= 0.) E_ERROR(-24); + P->inv = s_inverse; + P->fwd = s_forward; +#if 0 + /* + * if set to 0. the computation is being made on a sphere! + * We simply approximate this as the projection is only + * used for displaying + */ + P->es = 0.; +#endif +ENDENTRY(P) -- cgit v1.2.3