Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merc with lat_ts (svn#83) #52

Closed
madair opened this issue Sep 13, 2013 · 2 comments
Closed

merc with lat_ts (svn#83) #52

madair opened this issue Sep 13, 2013 · 2 comments

Comments

@madair
Copy link
Contributor

madair commented Sep 13, 2013

from http://trac.osgeo.org/proj4js/ticket/83

I think there is an error in transformation from WGS84 geographical to a mercator projection with setting lat_ts parameter.

Proj4js.defs["EPSG:70212"]="+proj=merc +lon_0=0 +lat_ts=54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";
>var src = new Proj4js.Proj('EPSG:4326');
var dest = new Proj4js.Proj('EPSG:70212');

var point = new Proj4js.Point(8.4166666666,54.3);
Proj4js.transform(src, dest, point);

The calculated result with proj4js is: x=550727.0313354909 y=4227680.065624116

By using cs2cs or http://cs2cs.mygeodata.eu/ I get the following results: x=551929.429093 y=4236910.32443

@ghost ghost assigned madair Sep 13, 2013
@calvinmetcalf
Copy link
Member

so running the following (which is equivalent to what you wrote but in more compact syntax)

proj4("+proj=merc +lon_0=0 +lat_ts=54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs").forward([8.4166666666,54.3])

I get [551929.4290927176, 4236910.324427377]

@madair
Copy link
Contributor Author

madair commented Sep 13, 2013

I'm getting the same result as well, it must have been fixed with some other fixes, closing this one

@madair madair closed this as completed Sep 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants