Opened 10 years ago

Closed 9 years ago

## #42 closed defect (fixed)

# some projections crash on inverse transformation

Reported by: | protozoa | Owned by: | madair |
---|---|---|---|

Priority: | major | Milestone: | 1.0.1 |

Component: | core | Version: | 1.0.0 |

Keywords: | Cc: |

### Description

Hello, I'm working in a project that uses several projections with Openlayers, for that propose i'm using proj4js.

I detect that the file ortho.js only work if I change the line

con = Math.abs(lat0) - Proj4js.common.HALF_PI;

to the line con = Math.abs(this.lat0) - Proj4js.common.HALF_PI;

I also coment the lines

if ((Math.abs(con) >= Proj4js.common.EPSLN)(Math.abs(x) >= Proj4js.common.EPSLN)) { |

lon = Proj4js.common.adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p14), (con * rh)));

}

The file eqdc.js has a similar problem. I had to change it from

var lat = this.phi3z(this.ml,this.e0,this.e1,this.e2,this.e3);

to var lat = this.phi3z(ml,this.e0,this.e1,this.e2,this.e3);

The file vandg.js was also changed by me from lat = -(-m1 * Math.cos(th1 + PI / 3.0) - c2 / 3.0 / c3) * Proj4js.common.PI;

to lat = -(-m1 * Math.cos(th1 + Proj4js.common.PI / 3.0) - c2 / 3.0 / c3) * Proj4js.common.PI;

This are the bugs that I detect.

There are other problems that i'm testing and will report soon.

**Note:**See TracTickets for help on using tickets.

fixed at rev 1870.