All published maps of China are deviated. GPS devices sold in China are modified to give the same deviated coordinates. If you don’t know, you may read here, here, here or here. Fortunately, the **same** deviation algorithm is applied on all maps I have seen, including Garmin (unistrong in China) GPS maps, mapabc.com, Google Maps/Earth. The algorithm is secrete and is only accessible by authority and companies such as garmin and google. Needless to say, this is very annoying for GPS users. Many individuals tried to discover the deviation algorithm by GPS measurement and correlation and found the algorithm to be not only nonlinear but very complicated to describe.

I accidentally found the Chinese version of Google Map ditu.google.com to be able to correlate satellite image with map, and it gives the amount of deviation for any location in China. This URL queries the deviation of 34.29273N,108.94695E (Xi’an): http://ditu.google.com/maps/vp?spn=0.001,0.001&t=h&z=18&vp=$34.29273,108.94695 (seems it’ doesn’t work now)

With enough sample data, we should be able to get a regression function, which, should resemble the deviation algorithm. I’m not good at regression so I’m putting up all my data and hope someone can help out. It can be downloaded from here. The format is very simple: four fields (longitude, latitude, longitude deviation and latitude deviation) separated by tab. Longitude deviation means (deviated_longitude – true_longitude). The points are sampled with 0.025 degree separation, i.e. 40 samples per degree. There are 1529737 points (lines of text) in the file. Only points in mainland China are available. Figure 1 and 2 shows an overview of the data.

There is another file, which contains samples from 8 selected lines (4 west-east, 4 south-north). The sample resolution is higher (200 samples per degree). It is used to plot Figure 3-6. I think it’s helpful for regression analysis.

Here are the plots of the data:

Some observations:

- The longitude deviation is always positive (deviate to the east). The maximum is 0.0085562 degree.
- The latitude deviation ranges from -0.0038542 (to the south) to +0.0028230 (to the north) degree.
- It’s very obvious that there are sinusoid component of period 1 and 1/3. (see Fig. 3, 4 and 6)
- Fig. 4. looks simple. You may think it’s f(x)=b*sin(a*x) + b*sin(3*a*x) + c*x + d. You are wrong. There are other small components.
- To make discussion easier, let’s define fdx(x,y) to be the longitude deviation of a point with longitude x and latitude y. Similarly, fdy(x,y) to be the latitude deviation of that point. So, Figure 3 shows fdx(x,25.12), fdx(x,32.24), … Figure 6 shows fdy(85.52,x), fdy(97.84,x)
- I suggest using fourier transform, but I’m not good at it.

Happy regression!

2011/10/25 at 3:57 pm |

did you have any success with findining the right function?

2011/10/25 at 4:52 pm |

Good to see the first reply after 1.5 years. No, not yet.

2012/09/08 at 3:30 pm |

Thank you for the unlocking tool. It works perfect on Mac.

2012/10/10 at 11:18 pm |

Thanks for ‘gimgtools’. An fascinating piece of work!

Do you know if Is there is a way to convert NT formated maps into in editable format?

2012/10/22 at 11:59 am |

Hi Versender, I’m not aware of any, but I’m definitely interested in it.

2012/12/16 at 5:28 pm |

[…] в виде статьи «All Maps in China are Transformed» от Jian Shuo Wang и «China Map Deviation as a Regression Problem» от Wu […]

2013/05/12 at 4:13 pm |

Hey,

I’ve worked on your data and processed it with Fourier discrete cosine transforms and polynomial regressions. I’ve a version here that works pretty well, with 4-5 meters precision, implemented in Objective-C: https://github.com/maxime/ChinaMapDeviation

Thank you for providing all the data, it has been extremely useful.

2013/05/12 at 11:24 pm |

Good to see my data being useful. I have also done some research on the regression function, but haven’t got time to publish it. I will defiantly check your code and maybe refer to it.

2013/10/08 at 3:07 pm |

There has been some progress on solving the problem. I have put my results here: http://wuyongzheng.github.io/china-map-deviation/paper.html

2013/11/28 at 3:23 pm |

I have been surfing online more than three hours today, but I by no means discovered any fascinating article like yours.

It is beautiful price sufficient for me. Personally, if all webmasters and bloggers made excellent content material

as you probably did, the web might be a lot more helpful than ever before.

2014/09/29 at 5:19 pm |

Seems this problem has been perfectly solved. https://on4wp7.codeplex.com/SourceControl/changeset/view/21483#353936 Comparing my solution and this one, I missed the square root component.

2014/10/20 at 2:26 am |

Great work! I’ve been wondering for this stuff two yrs ago when my girlfriend went to China for work and sent me places she visited. Watching Google Maps I noticed that sattelite view doesn’t correspond street view and it was a problem. I then found ditu.google.cn and there wasn’t that deviation, but that site didnt have option “photograps”… So now it all seems to be clear except how can i use google maps without deviation?

Oleg from Ukraine

2015/10/11 at 1:57 pm |

We need new transform algorithm !!!

data at 2015.10.11

NMEA from GPS source：

lat = 39.5768506

lon = 116.2097481

Real Location (From 1. android API 2. picked by BaiduMap)：

lat = 39.96165504

lon = 116.35180069

If you have any improvement,

Please contact me @ maojianwei2016@126.com

Thank you very much !

2015/11/23 at 3:24 am |

I guess spatial regression rather than conventional regression because location matters in this case. OLS will not be enough. By the way, where did you get these two datasets, the google link that has expired?

2016/10/27 at 4:43 pm |

Your posts is extremely appealing