Every map of China is wrong
I work in a climate tech startup, and although I don’t directly manipulate geospatial data in my role (at least not at the moment), I’m very interested in this aspect of our work. I came across a seemingly innocuous message on Slack about how we had less information for a particular carbon offset project because of the China GPS shift problem.
This naturally piqued my interest — I didn’t know Chinese geospatial data would be any different from the rest of the world. Hadn’t this been one of the few areas where we all agreed about the right way to do things?
The more I delved into this topic, the more interesting stuff I found, and the more it made sense from a Chinese perspective. So I thought I’d share the story here. We’ll cover the following:
- The divergence between street view and satellite view in China
- Why do Chinese maps look so odd compared to the rest of the world?
- Why does the Chinese government want to have a different system?
- Is there any way you can accurately map China?
- What this means for the world
The divergence between street view and satellite view in China
If you’ve never looked at a digital map of China, I urge you to do it now — initially, if you look at the street view, it looks like any other map you’ve encountered. However, if you overlay the satellite view you can see things are out of whack.
Take this image from Google Maps of the downtown Shanghai region in street view vs. satellite:
Zooming in on the Huangpu river makes this particularly stark. A lot of activity in a body of water!
Initially, it looks like everything is a little bit offset — why is this and can’t it be corrected?
Why do Chinese maps look so odd compared to the rest of the world?
On first pass, it looks like the satellite imagery we have for China means that the street view has been laid out incorrectly — everything needs to be moved a bit to the left (or to the west), and it would align again with the satellite image. Easy solution!
However, we can see why it’s not so simple if we scroll to a different part of this river — here you can see we still have the issue with the river alignment, but that the Xupu bridge is also a bit further North on the satellite view than in the street view.
Does this mean we need to move everything a bit north and a bit west to align it? Not quite: consider the image below in Beijing. Longtan Park is way off from where it’s supposed to be (the satellite image should be shifted north and east, which is different to what we’ve seen so far), but note that the Temple of Heaven is more or less placed correctly.
What’s going on here? Is there any predictability to this mapping system?
To answer this question, we have to take a step back and talk about how the earth is mapped. Maps of the world use systems of reference known as geodesic datum, which use various base points around the globe to anchor positional measurements.
GPS uses the World Geodesic Standard 1984 (or WGS-84) as its reference standard. The National Geospatial Intelligence Agency (NGA) in the U.S. maintains WGS-84. This means that de facto, most of the world has subscribed to American mapping conventions.
There are a few countries that have established their own geodesic data, including Russia and China. China’s datum is called GCJ-02, which translates to ‘Topographic map non-linear confidentiality algorithm’ (the name ‘GCJ’ comes from the Chinese ‘guó-cè-jú’).
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.
Going back to our map examples, this explains why sometimes street view and satellite view look aligned, while at other times they completely diverge; why sometimes the offset looks like it’s applied in a northwestern direction, sometimes south, sometimes southeast, etc.
Now we know what’s happening with our map — satellite images in China differ from the GPS coordinates that we have for locations within the country because of a random offset (random direction and random amount) applied by an obfuscation algorithm. This answers the question of ‘what’ is happening, but next on our agenda is answering ‘why’ this approach is taken by the Chinese government.
What’s the purpose behind a different system?
In 2002, the Chinese government enacted the Surveying and Mapping Law. Its first two articles state why China is purposely obfuscating WGS-84 data, and in brief, they state that the law was formulated to:
- Promote the development of surveying and mapping in the service of national economic construction.
- Promote mapping for the build up of national defense.
- Promote mapping for social development.
Interestingly, further articles in the law state that only authorized entities approved by the Chinese state are permitted to undertake surveying and mapping activities, and ultimately this meant that 14 companies (as of writing) are permitted to map China. All of these companies are Chinese.
If we consider the 3 interests outlined above, the only one that would require secrecy and state approval is the second objective, building up national defense. If it was only about economic or social improvement, then it would make sense for any company, whether Chinese or not, to offer mapping services.
So we now know that only 14 companies are allowed to map China… but we know many companies need to map China. For example, a company like Pepsi would want to have some logistical maps to plan deliveries, and a company like Google would want to include China in Google Maps to allow users to have a cohesive experience/ plan their next vacation. How do these entities gain access to Chinese mapping data?
How can an entity map China accurately?
The short answer is that companies outside of China need to have a Chinese mapping partner in order to provide data about Chinese locations. Let’s take the case of Google. We know that since 2006, the company has partnered with a Chinese mapping provider called AutoNavi to provide Chinese map information to its consumers (Google may currently have a different Chinese partner since that time, but there doesn’t seem to be public information about this).
How this works in practice is that AutoNavi will give GCJ-02 information to Google to use for mapping, but certain sensitive information will be occluded or withheld (e.g. Google Maps won’t have access to certain military sites, airfields, strategic food reserves, etc. — it won’t know what it doesn’t know).
An additional detail that’s quite telling of the security concerns of the Chinese state is that it’s against the law in China to convert GCJ-02 (obfuscated coordinates) into WGS-84. There are some Chinese mapping providers, like Baidu, that offer APIs for developers to convert WGS-84 into GCJ-02, but nothing that does the reverse conversion. In other words, you can translate your coordinates into the Chinese system, but you can’t translate Chinese coordinates back to the world standard. This grows China’s mapping ecosystem without sharing any information back about Chinese locations.
Now we get to the fun part — why Google street view and satellite view don’t align in China. Remember, Google only receives information about GCJ-02 coordinates from its Chinese partners. This means it has one of two options:
- Make a street view map that uses the GCJ-02 datum, and use GCJ-02 satellite imagery. The advantage here is that street view and satellite view align, but the disadvantage is that China will be out of sync with the rest of the world on Google Maps — in other words, when you look at satellite view, if you go to a border, say Hong Kong (where WGS-84 is permitted for the time being), the Chinese side will be disjointed from the other nation.
- Make a street view map that uses GCJ-02 coordinates but keep the WGS-02 satellite view. The advantage here is that the Chinese portion of the street view map will align with the rest of the world, but the disadvantage is that the Chinese street view won’t be aligned with the Chinese satellite view.
In our case, Google Maps goes with option 2 — this is why we see the strange offsets when the satellite view is superimposed on the street view.
Before 2010, Google Maps was available in China under the maps.google.cn domain (now it just suggests you redirect to the Hong Kong domain). When that was possible, Google used option 1 for the Chinese maps. This meant when you were looking at China, the street view and satellite view aligned, but at borders, something like the image below would happen (this is the example mentioned above with the Chinese-Hong Kong border). This is because Google Maps returned to using the WGS-02 datum for the rest of the world, but used GCJ-02 entirely within China.
What does this mean for the world?
There’s a lot that we’ve covered so let’s summarise:
- The Chinese state outlaws surveying and mapping activities of the nation to all but a handful of Chinese companies.
- These companies and the state have accurate information about Chinese locations but apply a deliberate obfuscation algorithm on top of the international standard for all outside actors.
- If a company wants Chinese location information, they have to partner with a Chinese company to get it, and it will have this obfuscation applied (as well as many locations hidden).
I’ve slightly alluded to the implications this has for the international community at the beginning of the article. For any initiative that (1) needs international cooperation and (2) involves geospatial data, information reported out of China isn’t going to be entirely reliable, and if you’re working with geographic parameters that are only a few kilometres across, a potential difference of 500 metres in a coordinate can be pretty impactful. This ultimately means that data reported in GSJ-02 needs to be moderated in some way to account for inaccuracy, and individuals pursuing work in China will be penalised. I don’t have a solution for this, but I’d be keen to learn more about work done in reconciling geospatial work in China with the rest of the world, and in being corrected if I’ve misrepresented any details in this exploration.
📝 If you’ve found this helpful, subscribe to Spec, where I write about productivity, organisation systems, personal engineering projects, and some esoteric general musings.