diff options
| author | Didier Richard <didier.richard@ign.fr> | 2008-01-05 10:56:38 +0000 |
|---|---|---|
| committer | Didier Richard <didier.richard@ign.fr> | 2008-01-05 10:56:38 +0000 |
| commit | 8a5fea73e1ac646bfe2db7dee8358116fef28fba (patch) | |
| tree | 6413773f07e0d586c75db426eed99320ae392b51 /src/PJ_eqr.c | |
| parent | 7104a2afee4bb7f0a76da2d6d213fee5f13c5a34 (diff) | |
| download | PROJ-8a5fea73e1ac646bfe2db7dee8358116fef28fba.tar.gz PROJ-8a5fea73e1ac646bfe2db7dee8358116fef28fba.zip | |
Add eqr and gslabsgm
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1428 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/PJ_eqr.c')
| -rw-r--r-- | src/PJ_eqr.c | 36 |
1 files changed, 36 insertions, 0 deletions
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 <projects.h> +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) |
