Have you ever tried using Google Maps, Bing or other mapping services to bring up a map of China? If so then you may have noticed that satellite images do not match up with any of the geographic features on the map, such as roads, rivers, points of interest and just about everything else. The satellite images simply do not match the map, but why is that?
The short answer is that China does not use the same GPS standard as the rest of the world to plot coordinates on a map. Since maps of China use a different standard than the one used by GPS it causes the GPS coordinates to appear off, sometimes by a large amount, and this is known as the China GPS shift problem.
Pictured above are images from Google Maps of a portion of the Huangpu River in Shanghai China. On the left we have just the map of the area. On the right we have the satellite image with the map overlaid on top and we can clearly see the GPS shift with the map of the roads spilling into the river. Google Maps currently displays the satellite image tiles using the same GPS standard as the rest of the world, but the map data for China is in a different standard, hence the two do not match.
Now let’s say you had the GPS coordinates for Tiananmen Square (39.902722,116.391441), located near the center of China’s capital city Beijing, and wanted to plot it on Google Maps.
According to the map, these coordinates would currently put you at the Beijing City Administration Institute (left image); however, if you were to look at the satellite image layer (right image) you would see that the coordinates do point to Tiananmen Square. Now, you might be thinking that even though the map is shifted you can still at least count on GPS coordinates to appear correctly in the satellite images. Well, that may be true for Google Maps for now, but that could change. Also, not all maps behave this way. Some mapping systems will shift the satellite images to match the map. Even Google Maps does this for the Chinese version of their map.
The two images above are from Google Maps. The left image is from the Google.com version and the one on the right is from the Google.cn version. As you can see, the Google.com version has the GPS shift problem while the Google.cn version does not. If you are now thinking that you can use the Google.cn version then you may have forgotten that GPS coordinates are incompatible with it, and that the GPS coordinates for Tiananmen square will instead point you to the Beijing City Administration Institute. Remember, GPS coordinates are unreliable when plotted on a map of China because Chinese maps use a different standard.
And there you have it: a simple explanation for why GPS coordinates look wrong on maps of China. With some examples and pictures included. However, let’s see if we can uncover a few more details to help explain this problem.
Maps of the world use reference systems called geodetic datum, or simply datum, to translate map positions to their real positions on Earth. Datums can be thought of as ellipsoid projections or models of the Earth’s curved surface, like a stretched globe, on which positional measurements can be made to determine a location’s precise position on Earth.
Datums use locations on Earth’s surface called “base-points” as anchors to base their coordinate system on. Since the Earth is not a perfect sphere, there are numerous ellipsoid shaped datums available with varying base-points. This site alone lists nearly 200 datums, and because not all datums are the same, the difference between datums is known as datum displacement. Datum displacement, commonly referred to as datum offset or datum shift, can result in various inaccuracies. Depending on the region, the displacement or “shift” between coordinates of differing datums can be just a couple of meters or several kilometers. Fortunately, the Global Positioning System (GPS) uses just one datum, WGS 84.
The World Geodetic System 1984 (WGS 84) is an internationally recognized datum used by the Global Position System (GPS). It is developed and maintained by the US National Geospatial-Intelligence Agency (NGA) and according to their site,
“WGS 84 represents the best global geodetic reference system for the Earth available at this time for practical applications of mapping, charting, geopositioning, and navigation.”
Makes sense then that it would be used by everyone. Well, almost everyone. China and Russia are known to use different systems. Russia doesn’t rely entirely on GPS and instead uses their own positioning system called Global Navigation Satellite System (GLONASS). GLONASS uses datum PZ-90 which, according to Wikipedia, differs from “WGS 84 by less than 400 mm (16 in) in any given direction.” So, differences due to datum displacement between WGS 84 and PZ-90 can for the most part be considered minimal, unlike China, where the displacement is so noticeable it is commonly referred to as the China GPS shift problem. So what does China use, and why is its displacement so noticeable?
The national standard for China is datum GCJ-02. The GCJ-02 datum was created by the Chinese State Bureau of Surveying and Mapping and it is based on WGS 84. However, it uses an obfuscation algorithm to randomly offset coordinates. The official description for GCJ-02 is “地形图非线性保密处理算法”, which translates to “topographic map non-linear confidentiality algorithm.” This means that the Chinese GPS shift problem that we encounter with maps of China is actually a design feature. So, unlike typical datum displacement, caused by differing base-points and/or projections, the displacement in Chinese maps is intentional and due to a confidentiality algorithm.
A popular and widely used datum in China is BD-09. This datum is a derivative of GCJ-02 that adds further obfuscation. It was created by Baidu Maps and it is a part of Baidu’s plan for global expansion to be a world map provider. So, BD-09 is based on GCJ-02, which in turn is based on WGS 84, and the displacement seen in China is because of the obfuscation or “confidentiality” algorithm. Which begs the question, why is there a confidentiality algorithm in place to obfuscate WGS 84? The short answer to that question may simply be that China is protective of its geography and it does not want just anybody to know about its geographic information.
Surveying and mapping law of the People’s Republic of China
In December 1st of 2002, by order of the president of the People’s Republic of China, the Surveying and Mapping Law of the People’s Republic of China came into full effect. According to Articles 1 & 2,
“This Law is formulated for the purpose of strengthening the administration of surveying and mapping, promoting the development of the undertaking of surveying and mapping and ensuring the service thereof to the national economic construction, the building-up of national defense, and the social development … The “surveying and mapping” as used in this Law shall refer to the surveying, collection and presentation of the shape, size, spatial location and properties of the natural geographic factors or the man-made facilities on the surface, as well as the activities for processing and providing of the obtained data, information and achievements.”
Parts of the law state, among other things, that only authorized entities who are approved by the State are allowed to survey and map within China and near its borders. So, what does this mean? Well, if you’re into selfies and playing Augmented Reality (AR) games like Pokemon Go then you may be in non-compliance of the law.
Banned in China
The hugely popular AR game Pokemon Go was initially banned in China. An article from Reuters reported that according to a games panel of the China Audio-Video and Digital Publishing Association, the game posed a “threat to geographical information security and the threat to transport and the personal safety of consumers.” It may appear that China is quick to ban, but China’s giant mobile userbase is a hot commodity and posing similar bans against Chinese tech giants like Baidu, Tencent and Alibaba would be a major setback for them. According to an article from VentureBeat, “Alibaba and Tencent reported that they invested $29 million and $43 million, respectively, on these mobile AR campaigns.”
It appears that even the Great Firewall of China can’t stop consumer demand for all things mobile. Pokemon Go which was initially banned in the country for posing a risk to national security is now legally playable- three years later. According to GameRant, “Chinese law demands that foreign companies like Niantic team up with Chinese firms in order to launch their digital products in the country.” So, compliance is not necessarily easy to achieve. Chinese law also requires that all GPS devices obfuscate coordinates using the CGJ-02 datum. Baidu offers an API to convert from WGS 84 to GCJ-02 or BD-09, but no reverse conversion from BD-09 or GCJ-02 to WGS 84 is available, as that would violate Chinese law.
Acknowledging the problem
In China, it is against the law to convert obfuscated CGJ-02 and BD-09 coordinates to WGS 84; however, that has not stopped the open source community from trying to work around the problem. There are various open source projects available that attack the problem with varying degrees of success and difficulty. Unfortunately, due to the nature of the obfuscation algorithm used by the Chinese datums, combined with the strict enforcement of the Chinese laws on GPS devices, it is impractical to expect reversed engineered GPS coordinates to display accurately and reliably in Chinese maps.
At Service Objects we understand that good data is not easy to come by, which is why make every effort to ensure that our services return the best available data possible, and that sometimes there just is no good way to work around a problem. However, you can’t work around a problem if you don’t first understand it, and hopefully this article has helped inform you more on why GPS coordinates appear incorrectly on maps of China.