Opened 15 years ago

Closed 15 years ago

#26 closed defect (fixed)

Problem with polar stereographic projection transformation

Reported by: dbigham Owned by: madair
Priority: major Milestone: 1.0.0
Component: core Version: 1.0.0
Keywords: polar stereographic projection transform transformation lon_0 Cc:

Description

I'm running into a problem with the Proj4js library. (Which I love by the way: A big thank you to the authors)


Proj4js.defsEPSG:3411 = "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs";

I got this from: http://www.spatialreference.org/ref/epsg/3411/

...

var source = this._projectionHashEPSG:4326; var dest = this._projectionHashEPSG:3411;

var point = new Proj4js.Point(-32, 48); Proj4js.transform(source, dest, point); ----

When I transform the lat/lon -32, 48 into the stereographic coordinate system, I get:

-2520789, -4034105

When I do the same thing with the Proj4 command line, I get:

1070076, -4635009

The Proj4 command line appears to be right, but the Proj4js library does not.

One hunch that I had for why the transformation wasn't working correctly is that perhaps the "+lon_0=-45" parameter is being ignored. I believe I tried setting it to "+lon_0=0" at one point and noticed that the transform was unaffected. It would also explain why coordinates in the middle of the Atlantic ocean appear to be close to the prime meridian.

Change History (1)

comment:1 by madair, 15 years ago

Resolution: fixed
Status: newclosed

fixed at rev 1522. Thanks for the report and the debugging

Note: See TracTickets for help on using tickets.