Restrictions on geographic data in China

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found. Due to national security concerns, the use of geographic information in China is restricted to entities that obtain a special authorization from the administrative department for surveying and mapping under the State Council.[1] Consequences of the restriction include fines for unauthorized surveys, lack of geotagging information on many cameras when the GPS chip detects a location within China, incorrect alignment of street maps with satellite maps in various applications,[2] and seeming unlawfulness of crowdsourced mapping efforts such as OpenStreetMap.

Legislation

According to articles 7, 26, 40 and 42 of the Surveying and Mapping Law of the People's Republic of China, private surveying and mapping activities have been illegal in mainland China since 2002. The law prohibits

<templatestyles src="Template:Blockquote/styles.css" />

publishing, without authorization, significant geographic information and data concerning the territorial air, land and waters, as well as other sea areas under the jurisdiction of the People's Republic of China.

— The National Administration of Surveying, Mapping and Geoinformation of China, Surveying and Mapping Law of the People’s Republic of China

Fines range from 10,000 to 500,000 ¥ (Expression error: Unrecognized punctuation character "[". - Expression error: Unrecognized punctuation character "[". USD). Foreign individuals or organizations that wish to conduct surveying must form a Chinese-foreign joint venture.[1]

Between 2006 and 2011, the authorities pursued nearly 40 illegal cases of mapping and surveying.[3] The media has reported on other cases of unlawful surveys:

  • 2007 7 March - Japanese and Korea scholars fined; joint-venture Weihai hired foreign surveyors without approval from the government[4]
  • 2008 25 March - China's State Bureau of Surveying and Mapping cracks down on some of the 10,000 websites that publish maps in China, most without authorization[5]
  • 2009 6 January - Chinese authorities fine UK students for “illegal map-making activities”[6]
  • 2010 - Chinese authorities to crack down on the unregistered or illegal among 42,000 online map providers, targeting incorrect information and leaks of sensitive information involving State secrets. New standards require all Internet map providers to keep servers storing map data inside China.[7]
  • 2014 14 March - Coca-Cola is accused of illegal mapping.[8]

As a consequence, major digital camera manufacturers including Panasonic, Leica, FujiFilm, Nikon and Samsung restrict location information within China, potentially fearing lawsuits.[9]

OpenStreetMap, the crowdsourced project to assemble a map of the world, advises that "private surveying and mapping activities are illegal in China".[10]

Coordinate systems

Chinese regulations mandate that approved map service providers in China use a specific coordinate system, called GCJ-02. Baidu Maps uses yet another coordinate system - BD-09,[11] which seems to be based on GCJ-02.[12]

GCJ-02

GCJ-02 (aka Mars Coordinates) is a geodetic datum formulated by the Chinese State Bureau of Surveying and Mapping, and based on WGS-84.[13] It uses an encryption algorithm[14] which adds apparently random offsets to both the latitude and longitude, with the alleged goal of improving national security.[12][15]

A marker with GCJ-02 coordinates will be displayed at the correct location on a GCJ-02 map. However, the offsets can result in a 100 - 700 meter error from the actual location if a WGS-84 marker (such as a GPS location) is placed on a GCJ-02 map, or vice versa. The Google.com street map is offset by 50–500 meters from reality,[8][16] while the Google.cn map is not.[17] Yahoo! Maps also displays the street map without major errors when compared to the satellite imagery.[18] MapQuest overlays OpenStreetMap data perfectly as well.[19]

Despite the secrecy surrounding the GCJ-02 encryption, several open-source projects exist that provide conversions between GCJ-02 and WGS-84, for languages including C#,[20] C, Go, Java, JavaScript, PHP,[21] Python,[22] R,[12] and Ruby.[23][24] They appear to be based on leaked code for the WGS to GCJ part.[25] Other solutions to the conversion involve interpolating coordinates based on regression from a data set of Google China and satellite imagery coordinates.[26] An attempt by Wu Yongzheng using FFT analysis gave a result much like the leaked code.[27]

From the leaked code,[20] GCJ-02 appears to use the SK-42 reference system, same as the system used by Beijing 1954.

BD-09

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

BD-09 is a geographic coordinate system used by Baidu Maps, adding further encryption to the already encrypted GCJ-02.[28] Baidu provides an API call to convert from Google or GPS (WGS-84) coordinates into Baidu coordinates.[11] Similar to GCJ-02, there are no APIs to convert in the other direction, but open source implementations in R [12] and various other languages [21] exist.

Reverse-transforming the coordinates

GCJ-02 appears to use multiple high-frequency noises of the form 20n \sin{}(180 k \times lat_{rad}), effectively generating a transcendental equation and thus elliminating analytical solutions. However, the open-source “reverse” transformations make use of the properties of GCJ-02 that the transformed coordinates are not too far from WGS-84 and are monotonic related to corresponding WGS-84 coordinates:[12]

# inspired by https://github.com/googollee/eviltransform/blob/master/c/transform.c
# We use complex to hold coords, just for ease-of-arithmetic operations.
# approx-eq: (a_gcj ≈ a_wgs) → (gcj_delta(a_wgs) ≈ gcj_delta(a_gcj))
def gcj_to_wgs_rough(g : complex) -> complex:
    # for wgs_to_gcj, we use `+'.
    return g - wgs_to_gcj_delta(g)

# monotonic makes sure that it converges;
# approx-eq makes sure that it's fast enough.
# inspired by https://github.com/caijun/geoChina/blob/master/R/cst.R
def gcj_to_wgs_exact(gcjCoord : complex) -> complex:
    max_diff = 1e-12
    newCoord = oldCoord = gcjCoord
    while abs(newCoord - oldCoord) > max_diff:
        oldCoord = newCoord
        newCoord = gcjCoord - wgs_to_gcj_delta(newCoord) 
    return newCoord

The rough method is reported to give some 1~2 meter accuracy,[21] while the exact method is able to get "centimeter accuracy" in two iterations.[29] Since the two properties ensure some basic functionality of the coordinate system, it's unlikely that the methods will change with new coordinate systems. Actually, the BD-to-GCJ code works in a manner much like the rough method.[12]

The China GPS shift problem

Google.com Maps display satellite imagery using the WGS-84 coordinate system, and street maps using the GCJ-02 datum

The China GPS offset problem is the name associated with a class of issues stemming from the difference between the GCJ-02 and WGS-84 datums. Global Positioning System coordinates are expressed using the WGS-84 standard and when plotted on street maps of China that follow the GCJ-02 coordinates, they appear off by a large (often over 500 meters) and variable amount. Authorized providers of location-based services and digital maps (such as AutoNavi or NavInfo) must purchase a "shift correction" algorithm that enables plotting GPS locations correctly on the map.[30] Satellite imagery and user-contributed street map data sets, such as those from OpenStreetMap also display correctly because they have been collected using GPS devices (albeit technically illegally - see Legislation).

Some map providers, such as Nokia's Here, choose to also offset their satellite imagery layer to match the GCJ-02 street map.[31]

Google has worked with Chinese LBS provider AutoNavi since 2006 to source its maps in China.[32] google.cn/maps (formerly Google Ditu) uses the GCJ-02 system for both its street maps[33] and satellite imagery.[34] google.com/maps also uses GCJ-02 data for the street map, but doesn't shift the satellite imagery layer, which continues to use WGS-84 coordinates,[35] for reasons unknown. Google Earth also uses WGS-84 to display the satellite imagery.[36]

Overlaying GPS tracks on Google.com Maps and any street maps sourced from Google.com via its API, will lead to a similar display offset problem, because GPS tracks use WGS-84, and Google.com maps use GCJ-02. The issue has been reported numerous times on the Google Product Forums since 2009,[37] with 3rd party applications emerging to fix it.[38] Data sets with offsets for large lists of Chinese cities exist for sale.[39] The problem was observed as early as 2008, and the causes were unclear, with (misguided) speculation that imported GPS chips were tampered with code that caused incorrect reporting of coordinates.[40] It is still unclear whether GPS chips manufactured in China return GCJ-02 coordinates directly, or if they return WGS-84 coordinates, which approved map software can convert to GCJ-02.[citation needed]

Hong Kong and Macau

Under One Country Two Systems, legislation in mainland China does not apply in Hong Kong and Macau SARs and there are no similar restrictions in the SARs. Therefore, the GPS shift problem does not apply. However, at the border between the SARs and mainland China, the data shown by online maps are broken [41] when the shifted data and correct data overlaps. This poses problems to users travelling across the border, and is particularly confusing to visitors not aware of this problem.

References

  1. 1.0 1.1 Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. 8.0 8.1 Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. 11.0 11.1 Lua error in package.lua at line 80: module 'strict' not found.
  12. 12.0 12.1 12.2 12.3 12.4 12.5 Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. Lua error in package.lua at line 80: module 'strict' not found.
  16. Lua error in package.lua at line 80: module 'strict' not found.
  17. Lua error in package.lua at line 80: module 'strict' not found.
  18. Lua error in package.lua at line 80: module 'strict' not found.
  19. Lua error in package.lua at line 80: module 'strict' not found.
  20. 20.0 20.1 Lua error in package.lua at line 80: module 'strict' not found.
  21. 21.0 21.1 21.2 Lua error in package.lua at line 80: module 'strict' not found.
  22. Lua error in package.lua at line 80: module 'strict' not found.
  23. Lua error in package.lua at line 80: module 'strict' not found.
  24. Lua error in package.lua at line 80: module 'strict' not found.
  25. Lua error in package.lua at line 80: module 'strict' not found.
  26. Lua error in package.lua at line 80: module 'strict' not found.
  27. Lua error in package.lua at line 80: module 'strict' not found.
  28. Lua error in package.lua at line 80: module 'strict' not found.
  29. Lua error in package.lua at line 80: module 'strict' not found.
  30. Lua error in package.lua at line 80: module 'strict' not found.
  31. Lua error in package.lua at line 80: module 'strict' not found.
  32. Lua error in package.lua at line 80: module 'strict' not found.
  33. Lua error in package.lua at line 80: module 'strict' not found.
  34. Lua error in package.lua at line 80: module 'strict' not found.
  35. Lua error in package.lua at line 80: module 'strict' not found.
  36. Lua error in package.lua at line 80: module 'strict' not found.
  37. Lua error in package.lua at line 80: module 'strict' not found.
  38. Lua error in package.lua at line 80: module 'strict' not found.
  39. Lua error in package.lua at line 80: module 'strict' not found.
  40. Lua error in package.lua at line 80: module 'strict' not found.
  41. Google Maps near Hong Kong-Shenzhen border