To Baidu API Baidu map accurate overlay and coordinate transformation solution research

Source: Internet
Author: User

The original: Baidu API to Baidu Map accurate overlay and coordinate conversion solution research

1. Background

The current project if you want to use Baidu map, you have to load Baidu's development package, and then through the interface provided by Baidu to call Baidu Map and will need to mark the points displayed in the Baidu map and so on.

This scenario has a significant disadvantage:

A. Damage to the original system. A set of systems developed from the bottom, its map loading method is from the bottom through the conversion of the column number to load. and Baidu map must be out of this program by calling Baidu API to achieve, destroying the entire system architecture, and caused a lot of functions based on the original architecture can not be used.

B. The vector service itself is not available. Because Baidu uses the non-standard Mars coordinates, their own collection of large amounts of SHP data if not corrected to the Baidu coordinate system, is not correctly superimposed on the Baidu map. This also caused, when we put the SHP data vector release, because the coordinates obtained from Baidu is not the coordinates of the corresponding coordinate system of the vector service, so that the accurate query and other functions.

C. Features such as feature display cannot be customized. Features such as the display must use the Baidu API, the features such as parameters and so on the map to mark it on Baidu. This limits the customization of features to display.

D. Many other issues. Due to the need to use the Baidu development package, limited the AGS JS or ol effective use.

Then, whether we can not use Baidu API, Baidu map to achieve the accurate loading, as well as the implementation of its own layer can be accurately superimposed on the Baidu map, so that its own layer corresponding to the vector service can be used correctly?

I would like to give you a general introduction of the current two weeks I and a colleague of the research results.

2. Solution 2.1 Baidu Map non-API Reference

If we can figure out the map level of Baidu Map, transduction origin, tile size. We can not use Baidu's API to call Baidu map.

Through the analysis of Baidu code, as well as the standard transverse Mercator projection research, we successfully obtained the various parameters of Baidu map.

2.2 Coordinate conversion

We have divided the coordinate transformation into online conversion and offline conversion, and developed the relevant tools.

The function of the tool is to import the SHP layer into the tool and convert the SHP layer into a SHP layer in the Baidu coordinate system.

The principle of the tool is: establish the control Point library, use the algorithm, realize coordinate transformation.

3. Results show

4. Questions

At present, the results have not been used in the project, there are many areas need to improve or research or implementation: such as tool efficiency, precision centimeter-level promotion, self-made Baidu tile download tools.

And at present, the coordinates are transferred to the map coordinate system of Baidu. Through the algorithm, we should be able to convert Baidu coordinates into a universal coordinate system, but here is also related to how Baidu map tiles (raster pictures) corrected to the general map, this difficulty than simple vector data conversion is much more difficult.

In the current application, if you want to use Baidu map, in addition to our GIS part, need mobile phone group, MIS Group, real group, etc., all need to save the data for the coordinates of the Baidu coordinate system, so each group docking up is more convenient. However, the data saved at this time is the data in the Baidu coordinate system, and if it is to be used by other companies, it has to be re-calculated as the coordinates of the universal coordinate system.

Can be seen, the use of large projects is still a lot of inconvenience. However, this issue is the use of Baidu map of the general problem, and whether we have to go to Baidu API is irrelevant.

--Welcome reprint, but retain the copyright, please indicate the source in obvious place: http://www.cnblogs.com/naaoveGIS/

To Baidu API Baidu map accurate overlay and coordinate transformation solution research

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.