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

能否添加BD09直接转WGS84的方法 #22

Open
HPDell opened this issue Dec 19, 2017 · 7 comments
Open

能否添加BD09直接转WGS84的方法 #22

HPDell opened this issue Dec 19, 2017 · 7 comments

Comments

@HPDell
Copy link

HPDell commented Dec 19, 2017

我使用BD09转GCJ02然后再转WGS84好像产生了很大偏差。但是使用python版本的BD09直接转WGS84的方法偏差不是很大。

@wandergis
Copy link
Owner

收到,这几天会测试看下误差,如果误差不大就加进去。

@HPDell
Copy link
Author

HPDell commented Dec 20, 2017

确实有一定误差。图中这个应该是一套数据的,但是通过python和js分别转出来,就变成了两套点。

image

@wandergis
Copy link
Owner

wandergis commented Dec 20, 2017

 const coordtransform = require('coordtransform');
 var bd09towgs84 = function bd09towgs84(lng, lat) {
    var mid = coordtransform.bd09togcj02(lng, lat);
    return coordtransform.gcj02towgs84(mid[0], mid[1]);
  };

  var wgs84tobd09 = function wgs84tobd09(lng, lat) {
    var mid = coordtransform.wgs84togcj02(lng, lat);
    return coordtransform.gcj02tobd09(mid[0], mid[1]);
  };

@HPDell 你试试这两个函数,测试了几个转换结果跟python的一样的,你帮忙根据你这个业务场景再测试下,谢谢啦

@vmvz
Copy link

vmvz commented Mar 27, 2018

误差这么大, 不好用呀, 哪些地图可以直接获取 wgs84?

@HPDell
Copy link
Author

HPDell commented Mar 28, 2018 via email

@vmvz
Copy link

vmvz commented Mar 28, 2018

@HPDell Bing 不知道可以不可以

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

3 participants