(Google's National Map correction data offset data Mars coordinate correction solution)

Source: Internet
Author: User

Conversion from http://blog.163.com/mark-_-chen/blog/static/10820522620103910405771)

China Map and satellite map are saved at an offset, which is determined by the China Planning Bureau.AlgorithmIn fact, there are no special rules. His generation algorithms are regular, but this rule is hard for you and me to get. How can we solve this deviation, after all, satellite maps and maps are switched in map development. Who doesn't want the maps to be switched over!
Later I found Google's map service, DITU. there is no deviation at the beginning of gogle, maps. services starting with Google have deviations. I began to look for the offset algorithm of Google. I used to figure and crack the data of Google's mobile phone version beforehand, it is estimated that I used my own compression or encryption algorithm, and finally did not find the rule, and then I tried to crack the web version.
However, I am not particularly familiar with the interfaces of the web version, so this cracking gave up the analysis.Source codeInstead, the exclusion method is used directly.
That is to block all the addresses accessed by the map one by one and find the gas offset used for the website.
Http://ditu.google.cn/maps/vp? SPNs = 0.0, 0.0 & Z = 18 & Vp = 39.111195, 117.148067
Remember to use fildder and Adblock of fixfox to clear the browser cache for each test.
Analysis of the rule of each returned content, Huang Tian pays off, I finally got it done, the following is my interface

GoogleChina Map offset Interface

1.Interface address:Http://ditu.google.cn/maps/vp? SPNs = 0.0, 0.0 & Z = 18 & Vp = 39.111195, 117.148067

(Note: Both. CN and. com are supported. If I use a domestic server, I will select. cn as the U.S. server and select. com)

2.Valid part of the returned content:

3. (39.111195, 117.148067, 18, [9,-2, 18,-4, 37,-8, 74,-16,149,-33,298,-67,596,-135,119 3, -270])

4.SPNsThe parameter is unknown for the time being.SPNsParameter. Any two decimal places are separated by commas (,).

VPParameter latitude value, separated by commas,ZThe parameter is a map zoom level and has no practical significance.

5. The valid number in the retrieved part is [9,-2, 18,-4, 37,-8, 74,-16,149,-33,298,-67,596,-134,119 2,
-268] This array has a total8Group number, each of which is a group.11Level18Level map and satellite map The number of offset pixels. The number in the previous group is exactly equal to the number in the next group, except for two. To get the most precise offset, select 18 Level offset 1193 , -270 , 1193 Is X Offset pixels with precision in the direction, -270 Is Y Vertical offset Pixel

6. To convert the longitude and latitude offset, we need the latitude and longitude. 39.111195 , 117.148067 Convert 18 Level pixel value 25620917 And 55392414 And then add the offset respectively. -270,1193, Then it is converted to latitude and longitude 39.11231854918217 And 117.15446412563324 , That is, the longitude and latitude after the offset

Data longitude
One offset per 0.01 longitude and latitude

Total data size (9557005)

CSV file in Data Format
One file per longitude

A total of 62 files from
Total size 480 MB

Data Introduction
Longitude and latitude in turn. This position is offset by Pixel X and Y (the 18th offset of Google Map, not to the upper level except 2)

Latitude and longitude offset
It is enough to retain 6 decimal places for positioning.

 

 

 

Using this method, the whole country can be located within 5 meters, and there is basically no offset in big cities.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.