Commit c0ebcb5f authored by Calvin Metcalf's avatar Calvin Metcalf
Browse files

poly done

parent 50e5e5e0
Loading
Loading
Loading
Loading
+37 −37
Original line number Diff line number Diff line
@@ -35,14 +35,14 @@ function phi4z (eccent,e0,e1,e2,e3,a,b,c,phi) {
   of the spheroid, x.  This constant is used in the Polar Stereographic
   projection.
--------------------------------------------------------------------*/
function e4fn(x) {
/*function e4fn(x) {
  var con, com;
  con = 1.0 + x;
  com = 1.0 - x;
  return (Math.sqrt((Math.pow(con, con)) * (Math.pow(com, com))));
}


*/



@@ -126,7 +126,7 @@ proj4.Proj.poly = {
  /* Inverse equations
  -----------------*/
  inverse: function(p) {
    var lon, lat, x, y;
    var lon, lat, x, y, i;
    var al, bl;
    var phi, dphi;
    x = p.x - this.x0;
@@ -142,7 +142,7 @@ proj4.Proj.poly = {
        bl = x * x / this.a / this.a + al * al;
        phi = al;
        var tanphi;
        for (var i = proj4.common.MAX_ITER; i; --i) {
        for (i = proj4.common.MAX_ITER; i; --i) {
          tanphi = Math.tan(phi);
          dphi = -1.0 * (al * (phi * tanphi + 1.0) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1.0);
          phi += dphi;
@@ -166,7 +166,7 @@ proj4.Proj.poly = {
        phi = al;
        var cl, mln, mlnp, ma;
        var con;
        for (var i = proj4.common.MAX_ITER; i; --i) {
        for (i = proj4.common.MAX_ITER; i; --i) {
          con = this.e * Math.sin(phi);
          cl = Math.sqrt(1.0 - con * con) * Math.tan(phi);
          mln = this.a * proj4.common.mlfn(this.e0, this.e1, this.e2, this.e3, phi);