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

Does this code also perform the WGS-84 to GCJ-02 conversion? #1

Open
dandv opened this issue Apr 6, 2015 · 11 comments
Open

Does this code also perform the WGS-84 to GCJ-02 conversion? #1

dandv opened this issue Apr 6, 2015 · 11 comments

Comments

@dandv
Copy link

dandv commented Apr 6, 2015

Or do I need to use eviltransform for that?

@ghost
Copy link

ghost commented Apr 6, 2015

Yes. But this code seems to be using an interpolation method. At present the accurate algorithm has been leaked, so I would recommend eviltransform and other repos using the algorithm.

@dandv
Copy link
Author

dandv commented Apr 6, 2015

Ah, so eviltransform does both the coordinates transform and GPS offset/deviation correction?

@ghost
Copy link

ghost commented Apr 6, 2015

As far as I know, you only need to do coordinates transform. There's no GPS deviation.

The smartphones Chinese people use also have a bitten Apple on the back of them. The same as your phones. Globalization counts.

@dandv
Copy link
Author

dandv commented Apr 6, 2015

@fengzee-me,

There's no GPS deviation.

From http://www.sinosplice.com/life/archives/2012/10/09/unfun-map-games lists:

the Chinese government is paranoid about the use of GPS, and screws with it. This affects Google Maps, it affects camera GPS, and it even affects runners’ watches. It’s been going on for years. Chinese companies with government approval (like TomTom) can get their services/devices working properly, but foreign devices which try to rely on good old-fashioned “satellite positioning” and maps lose out, and have to build in a “shift correction” feature if they want their apps’ GPS positioning to work properly.

That is what I meant by "GPS deviation". I should've called it "GPS shift" perhaps.

http://gis.stackexchange.com/a/59936/37816 mentions a large GPS deviation problem caused by a legal mandate for map API providers to return incorrect data. http://www.sinosplice.com/life/archives/2013/07/16/a-more-complete-ios-solution-to-the-china-gps-offset-problem shows that several people sell massive data sets of tens of thousands of points within China with their corresponding offset.

Are you sure there's no GPS deviation mandated by Chinese law? This deviation could be caused by GPS devices produced in China, to align with maps approved by the Chinese government, or it could be the case that GPS devices produced everywhere return the correct coordinates, but for China maps to align with reality, these coordinates need to be either,

Or are all other map providers forced to show incorrect maps?

@dandv
Copy link
Author

dandv commented Apr 7, 2015

Or do you mean that GCJ-02 is the same as the "GPS shift"? I found a paper you posted on Baidu.

@ghost
Copy link

ghost commented Apr 7, 2015

Sorry for coming back late. Yes, that's what I mean. The mandatory use of GCJ-02 (and BD-09) is all what happened here in China.

The Chinese government neither bans production of any GPS device, nor makes GPS / GPS chip manufacturers modify their products to report wrong coordinates. The government only gives order to map data providers (or survey companies with government licenses). Those data providers are forced to publish their geo-data under the GCJ-02 system, which makes locations represented in WGS-84 coordinates look wrong when they're pinned to GCJ-02 based digital maps.

Before the WGS-84 <--> GCJ-02 transform algorithm leaked and made available everywhere on the Internet (eg. this repo), some people tried to get a lot of samples of WGS-GCJ point pairs and sold the dataset to people in need. But this kind of dataset is no longer useful because we now have the algorithm itself.

Are all these in the Chinese law?
No. They are mostly in some vague administrative orders or industry regulations made by the government. There is a Code of Geological Survey (http://www.gov.cn/ziliao/flfg/2005-08/05/content_20947.htm, Chinese), though. But it only says data obtained through survey is classified by default (Article 29) and companies without a permission cannot do survey (Chapter 5). Nothing about GCJ-02 is made officially public.

Why does the Chinese government do this?
National security, they say. But people developing LBS apps tends to believe that it is because of money. The government charges Chinese companies for the "shift correction" feature. We need to make a reservation with the government and take the source code of our app to the bureau to get the feature compiled with our code.

@dandv
Copy link
Author

dandv commented Apr 7, 2015

Thank you @fengzee-me. I've created a Wikipedia article that explains the China GSP shift problem.

@ghost
Copy link

ghost commented Apr 7, 2015

Oh thank you too. You're a good researcher. You can find my old blog post (that have been copied to Baidu by someone) that even I have forgotten about. And it's all Chinese except for a GitHub link. _

Your article explains this problem quite well. I'll make a Chinese version on zh.wikipedia.org once I have time.

@Artoria2e5
Copy link

Artoria2e5 commented Feb 9, 2017

Just FYI, I am now working on a zh.wikipedia.org translation for the article created by @dandv: https://zh.wikipedia.org/wiki/Draft:中国大陆对测绘数据的限制.


Update (2017-04-02): Page has passed DYKC at https://zh.wikipedia.org/wiki/中华人民共和国测绘限制

@Artoria2e5
Copy link

Artoria2e5 commented Feb 22, 2017

Umm... Sorry for hijacking the thread again. I currently attributed the iteration method to a last traceable source on GitHub (caijun/geoChina; cst.r), both on Wikipedia and in my toy implementation. Should I try to cite @fengzee-me's paper to set the record straight? I might want to do a little bit of Markdown transcription if I go ahead…

@PleahMaCaka
Copy link

GitHub please

Repository owner deleted a comment from leojin Feb 23, 2024
Repository owner deleted a comment from leojin Feb 23, 2024
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