Google map location Offset Correction

Source: Internet
Author: User

Google map location tag correction

 

 

Technical Exchange QQ: 1148824289

Problem Overview

Google maps are used in China, and there is a shift problem. When a vehicle is clearly on the road and hits the map, it may be on the roof of another person or in the river, I heard that our country asked them to do this out of security concerns. I will not say that much. The following describes how to solve this problem.

 

Solution Principle

There are some algorithms on the Internet to solve this problem, or other solutions, which do not seem to be accurate. I have introduced this method with high accuracy, but I have to work with the specific data. The data volume is very large, there is a multiple g, which is corrected by matching. The following describes the principles.

The offset is not necessarily regular, and I am not sure whether it is regular. I think it is irregular and random. The offset principle is to cut a map of China into N blocks of tofu, and cut n blocks of Chinese blocks into N blocks of tofu. A block of bean curd is a rectangle, the offset of a point in a rectangle is fixed, that is, an offset of a rectangle.

Now the question is how to enter the longitude and latitude for you, find the rectangle you belong to, and find the rectangle you belong to, then you find the offset, then you can add an offset to the longitude and latitude to obtain the corrected longitude and latitude.

 

Solution

The following is a data source with a total of about 1700 million pieces of data. That is to say, there are about 1700 million Rectangles and a total of about GB. For example, the first column is the row number, the second and third columns indicate the longitude and latitude of the rectangle block, and the fourth and fifth columns indicate the offset of the rectangle block.

Load memory Matching Method

Load the data source to the memory, write a software program, publish an interface, input the latitude and longitude, return the corrected latitude and longitude, and create a large linked list to sort one of the columns and perform binary search, quickly lock rectangular blocks. Advantages and disadvantages of this method:

Advantage: fast response and high efficiency, which can be called by multiple clients.

Disadvantage: it takes some time to develop and eat memory.

 

Database Matching Method

Store the data source to the database, write a stored procedure in the database, enter the latitude and longitude, and return the corrected latitude and longitude. Advantages and disadvantages of this method:

Advantage: it is easy to develop and can be saved to the database directly. The access is also simple. You can directly access the database.

Disadvantage: the database is under high pressure and the efficiency is lower.

Technical Exchange QQ: 1148824289

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.