Live data from Hacker News

Every map of China is wrong

medium.com

101–110 of 275 posts

Re: Every map of China is wrong

#101

Here is an open source implementation that converts from WGS84 to GJC2: https://github.com/googollee/eviltransform/blob/master/java/... https://github.com/googollee/eviltransform/blob/master/java/... And converting the other way by a kind of binary search, I guess using a flaw in the obfuscation: https://github.com/googollee/eviltransform/blob/master/java/... All seems very silly by today standards and I would think…

Maybe GJC2 can be modified on the fly, by changing offset parameters? So in a hypothetical war situation, only providers obtaining data in realtime from "authorized" sources would have access to accurate targeting information.

Re: Every map of China is wrong

#102

Here is an open source implementation that converts from WGS84 to GJC2: https://github.com/googollee/eviltransform/blob/master/java/... https://github.com/googollee/eviltransform/blob/master/java/... And converting the other way by a kind of binary search, I guess using a flaw in the obfuscation: https://github.com/googollee/eviltransform/blob/master/java/... All seems very silly by today standards and I would think…

As a means to keep detailed maps out of the hands of an enemy it's indeed not great. As it's all rather obvious to reverse engineer this and people have indeed done so.

But as a means to force foreign companies to use Chinese data suppliers this works perfectly. Because using this software would be illegal in China and anyone looking to business there legally would end up having to use Chinese data centers, Chinese data suppliers, Chinese infrastructure, etc.

Re: Every map of China is wrong

#103
post #34

Earlier quoted context omitted.

Indeed, despite its apparent illegality, China seems to be fairly well-supported and well-mapped by OpenStreetMap, at least in major cities. And is entirely mapped in normal WGS-84 without the obfuscation problem. In any case, according to Wikipedia, open-source code is available to convert between WGS-84 and the obfuscated GJC-02 coordinates. Since technology seems to have caught up with it, is there any advantage (…

Great point. This seems like low-intelligence autocratic bullshirt more than anything. Does the CCP really think that the US military are going to use ordinary street msps to target their missiles and that this obfuscation will protect them from on-target hits? Sure, in WWII there were a few apocryphal instances of bad maps foiling an attack, but that was decades before mapping satellites. As mentioned, it's been a l…

https://en.wikipedia.org/wiki/United_States_bombing_of_the_C...

US allegedly used old map with wrong coordinates. Probably China knows well about US military tactics.

Re: Every map of China is wrong

#104
post #101

Here is an open source implementation that converts from WGS84 to GJC2: https://github.com/googollee/eviltransform/blob/master/java/... https://github.com/googollee/eviltransform/blob/master/java/... And converting the other way by a kind of binary search, I guess using a flaw in the obfuscation: https://github.com/googollee/eviltransform/blob/master/java/... All seems very silly by today standards and I would think…

Maybe GJC2 can be modified on the fly, by changing offset parameters? So in a hypothetical war situation, only providers obtaining data in realtime from "authorized" sources would have access to accurate targeting information.

Not unless you want to change all the map data.

Re: Every map of China is wrong

#105

Here is an open source implementation that converts from WGS84 to GJC2: https://github.com/googollee/eviltransform/blob/master/java/... https://github.com/googollee/eviltransform/blob/master/java/... And converting the other way by a kind of binary search, I guess using a flaw in the obfuscation: https://github.com/googollee/eviltransform/blob/master/java/... All seems very silly by today standards and I would think…

As a means to keep detailed maps out of the hands of an enemy it's indeed not great. As it's all rather obvious to reverse engineer this and people have indeed done so. But as a means to force foreign companies to use Chinese data suppliers this works perfectly. Because using this software would be illegal in China and anyone looking to business there legally would end up having to use Chinese data centers, Chinese d…

Some elaborate technical trade barrier? I think that is giving them too much credit.

This is thinking from a military apparatus stuck in the 1950es.

Re: Every map of China is wrong

#106

Does anybody know why, when you use Google Maps in China, your GPS location matches the map and not the satellite image? I would assume the maps being in GJC-02 and the satellite images being in some other global coordinate system. So your position should line up with the imagery, not with the map. Does the GPS chip report modified coordinates when it detects it is in china? Or does Google do this itself in the softw…

Yes, they apply the mandatory conversion and have gotten a license for the software to do this from the Chinese authorities. This wikipedia article has some more details on this: https://en.wikipedia.org/wiki/Restrictions_on_geographic_dat...

Re: Every map of China is wrong

#107
post #57

Earlier quoted context omitted.

Because Chinese law forbids to convert their coordinates to WGS84, and using the Chinese coordinates for satellite data would give a discontinuity at the border. This is explained in the article.

Discontinuity at the border isn't a big issue compared to all locations in the country being wrong relative to the satellite view. If Google cared enough, I'm sure they could find a solution - since Google doesn't operate in China, they don't really have to respect Chinese laws. But Google doesn't operate in China so they don't care that much and are presumably happy to leave things the way they are. Also, keeping th…

> since Google doesn't operate in China, they don't really have to respect Chinese laws

I suspect that in practice that’s not true; there are a lot of ways China could make life difficult for a big international tech company, from looking the other way regarding IP theft to arresting people associated with Google on spying charges when they’re there on personal trips

Re: Every map of China is wrong

#108
post #87

Here’s where it gets interesting — GCJ-02 is based on WGS-84, but with a deliberate obfuscation algorithm applied to it. The effect of this is that there are random offsets added to both latitude and longitude, ranging from as little as 50m to as much as 500m. Holy shit. I can't believe they created an adversarial mapping standard. That is insane. It really paints a picture of their worldview I think. The oppressed "…

It’s a fairly common practice to have a localized geodetic datum defined for a country. WGS84 isn’t necessarily sufficiently accurate for all purposes, continental plates drift, the ellipsoid can be adjusted to local circumstances and so forth. When you want to compare very precise measurements over time, WGS84 is too imprecise. Most of course avoid obfuscating their own maps, it seems like that is a result of 2002 l…

> mapping an adversary is comparatively trivial and cheap today

Sorry what? Mapping is not anything close to trivial or cheap, even today. Apple took 4 years just to build a map of the SF Bay Area. Nor is it fixed or rapid, in an active war situation, presumably new targets would be built and moved quickly.

Re: Every map of China is wrong

#109
post #90
post #57

Earlier quoted context omitted.

Because Chinese law forbids to convert their coordinates to WGS84, and using the Chinese coordinates for satellite data would give a discontinuity at the border. This is explained in the article.

That's only interesting to the extent that an organization has operations in China. Google was mostly ejected from the Chinese market years ago, I thought -- hence Baidu largely taking its place there. It would be telling if despite that rejection, they were still open to taking direction from Beijing. Google at one point was fairly friendly with US DoD. Clearly the national loyalty of multinationals isn't guaranteed…

Google was not ejected from the Chinese market, they decided to remove most of their products after Gmail was hacked.

https://www.google.cn used to show censored search results, now it only has a link to https://www.google.com.hk , which is blocked because it lacks search result censorship. But Google could use the domain for something new in the future should they choose to.

In particular, Google Ads continue to be available: https://ads.google.cn They even offer WeChat customer service!

As long as they can keep the ad money flowing, Google will comply with all necessary laws and regulations.

Re: Every map of China is wrong

#110

South Korea does it too. It forbids Google from access to its official map. Only local enterprises are licensed to get it. Precisely, the government bans the export of geographical data abroad. Check out the 243rd page of a US government report on trade barrier: https://ustr.gov/sites/default/files/2024%20NTE%20Report_1.p...

Note the bias against China in the comments here vs South Korea which is effectively doing the same thing.
Post reply on HN