public void initialize() { super.initialize(); double del, cs; /* get common factors for simple conics */ double p1, p2; int err = 0; /*FIXME if (!pj_param(params, "tlat_1").i || !pj_param(params, "tlat_2").i) { err = -41; } else { p1 = pj_param(params, "rlat_1").f; p2 = pj_param(params, "rlat_2").f; *del = 0.5 * (p2 - p1); sig = 0.5 * (p2 + p1); err = (Math.abs(*del) < EPS || Math.abs(sig) < EPS) ? -42 : 0; *del = *del; } */ p1 = Math.toRadians(30); // FIXME p2 = Math.toRadians(60); // FIXME del = 0.5 * (p2 - p1); sig = 0.5 * (p2 + p1); err = (Math.abs(del) < EPS || Math.abs(sig) < EPS) ? -42 : 0; if (err != 0) throw new ProjectionException("Error " + err); switch (type) { case TISSOT: n = Math.sin(sig); cs = Math.cos(del); rho_c = n / cs + cs / n; rho_0 = Math.sqrt((rho_c - 2 * Math.sin(projectionLatitude)) / n); break; case MURD1: rho_c = Math.sin(del) / (del * Math.tan(sig)) + sig; rho_0 = rho_c - projectionLatitude; n = Math.sin(sig); break; case MURD2: rho_c = (cs = Math.sqrt(Math.cos(del))) / Math.tan(sig); rho_0 = rho_c + Math.tan(sig - projectionLatitude); n = Math.sin(sig) * cs; break; case MURD3: rho_c = del / (Math.tan(sig) * Math.tan(del)) + sig; rho_0 = rho_c - projectionLatitude; n = Math.sin(sig) * Math.sin(del) * Math.tan(del) / (del * del); break; case EULER: n = Math.sin(sig) * Math.sin(del) / del; del *= 0.5; rho_c = del / (Math.tan(del) * Math.tan(sig)) + sig; rho_0 = rho_c - projectionLatitude; break; case PCONIC: n = Math.sin(sig); c2 = Math.cos(del); c1 = 1. / Math.tan(sig); if (Math.abs(del = projectionLatitude - sig) - EPS10 >= MapMath.HALFPI) throw new ProjectionException("-43"); rho_0 = c2 * (c1 - Math.tan(del)); maxLatitude = Math.toRadians(60); // FIXME break; case VITK1: n = (cs = Math.tan(del)) * Math.sin(sig) / del; rho_c = del / (cs * Math.tan(sig)) + sig; rho_0 = rho_c - projectionLatitude; break; } }