2 * Proj 4 integration code follows
11 PROJ_HEAD(isea, "Icosahedral Snyder Equal Area") "\n\tSph";
20 out = isea_forward(&P->dgg, &in);
27 FREEUP; if (P) pj_dalloc(P); }
33 isea_grid_init(&P->dgg);
35 P->dgg.output = ISEA_PLANE;
36 /* P->dgg.radius = P->a; /* otherwise defaults to 1 */
37 /* calling library will scale, I think */
39 opt = pj_param(P->ctx,P->params, "sorient").s;
41 if (!strcmp(opt, "isea")) {
42 isea_orient_isea(&P->dgg);
43 } else if (!strcmp(opt, "pole")) {
44 isea_orient_pole(&P->dgg);
50 if (pj_param(P->ctx,P->params, "tazi").i) {
51 P->dgg.o_az = pj_param(P->ctx,P->params, "razi").f;
54 if (pj_param(P->ctx,P->params, "tlon_0").i) {
55 P->dgg.o_lon = pj_param(P->ctx,P->params, "rlon_0").f;
58 if (pj_param(P->ctx,P->params, "tlat_0").i) {
59 P->dgg.o_lat = pj_param(P->ctx,P->params, "rlat_0").f;
62 if (pj_param(P->ctx,P->params, "taperture").i) {
63 P->dgg.aperture = pj_param(P->ctx,P->params, "iaperture").i;
66 if (pj_param(P->ctx,P->params, "tresolution").i) {
67 P->dgg.resolution = pj_param(P->ctx,P->params, "iresolution").i;
70 opt = pj_param(P->ctx,P->params, "smode").s;
72 if (!strcmp(opt, "plane")) {
73 P->dgg.output = ISEA_PLANE;
74 } else if (!strcmp(opt, "di")) {
75 P->dgg.output = ISEA_Q2DI;
77 else if (!strcmp(opt, "dd")) {
78 P->dgg.output = ISEA_Q2DD;
80 else if (!strcmp(opt, "hex")) {
81 P->dgg.output = ISEA_HEX;
84 /* TODO verify error code. Possibly eliminate magic */
89 if (pj_param(P->ctx,P->params, "trescale").i) {
90 P->dgg.radius = ISEA_SCALE;
93 if (pj_param(P->ctx,P->params, "tresolution").i) {
94 P->dgg.resolution = pj_param(P->ctx,P->params, "iresolution").i;
96 P->dgg.resolution = 4;
99 if (pj_param(P->ctx,P->params, "taperture").i) {
100 P->dgg.aperture = pj_param(P->ctx,P->params, "iaperture").i;