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

Wrong projection between WGS84 and GDM2000/Peninsular RSO #273

Open
sergemarkin opened this issue Nov 14, 2017 · 5 comments
Open

Wrong projection between WGS84 and GDM2000/Peninsular RSO #273

sergemarkin opened this issue Nov 14, 2017 · 5 comments

Comments

@sergemarkin
Copy link

sergemarkin commented Nov 14, 2017

The issue #173 which was closed is still there.

My code:

var epsg4326 = '+proj=longlat +datum=WGS84 +no_defs'

var epsg3375 = '+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257964666666 +k=0.99984 +x_0=804671 +y_0=0 +no_uoff +gamma=323.1301023611111 +ellps=GRS80 +units=m +no_defs'

var transformation = proj4(epsg4326, epsg3375)
var input = [101.70979078430528, 3.06268465621428];
var output = transformation.forward(input);
// 744626.6428051005, -103618.62269607143
// expected: 412597.532715, 338944.957259

I tried previous versions and got the same wrong results.

JSFiddle

@ceylanb
Copy link

ceylanb commented Nov 14, 2017

+1

@shanmugamg
Copy link

shanmugamg commented Nov 14, 2017

+1
faced with the similar problem and yet to find a solution

@calvinmetcalf
Copy link
Member

ok my first thought is that we aren't doing anything with the field gamma/rectified_grid_angle, but esri wkt files don't include that one so that's probably not it, looking at our tests we do have one for another omerc, but it's azimuth is only 90, I tested alaska state plane zone 1 and found that also doesn't work right, I suspect there has always been a bug in omerc, will look into it more

@Ariki
Copy link

Ariki commented Jun 5, 2018

As far as I understand, Proj4js seems to ignore +gamma parameter, whereas proj C library allows to specify it (by default it's assumed to be equal to +alpha). So projections that have gamma != alpha do not work correctly.

@thedmi
Copy link

thedmi commented Oct 10, 2018

I've opened an issue for the difference in behavior between proj4 and proj4js, see #301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants