sig = 0.5 * (p2 + p1);
err = (Math.abs(del) < EPS || Math.abs(sig) < EPS) ? -42 : 0;
del = del;
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 >= ProjectionMath.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;