I am currently working in a domestic map navigation company. This article is a PPT that I made for a technology sharing session organized in the company some time ago. The content of the article is mainly based on the content of this PPT. Through this article, you can understand the relevant technologies in the map navigation industry. The PPT content mainly includes map-related professional knowledge, Baidu and AutoNavi SDK overall framework, data sources, industry overview, etc. Regarding the technical knowledge related to the map engine, I have verified it with my colleagues in the company's map engine development, and I have also shown this PPT to them, and helped point out some of the problems. This article is mainly for sharing. If you have any questions, please point them out. Thank you! Map development expertise Latitude and longitude Latitude and longitude Latitude and longitude are a geographical coordinate system, mainly used to represent the spherical coordinate system of the earth. Latitude and longitude can locate any position on the earth. The north-south direction is called latitude, and the east-west direction is called longitude. Latitude: The equator has the longest latitude. The farther away from the equator, the shorter the latitude circumference, that is, the smaller the latitude. South of the equator is called south latitude, and north of the equator is called north latitude. The latitude range is 0-90, and the equator is 90, the smallest of the two levels. Longitude: Longitude is also called meridian. Any two meridians are equal in length and start at the North and South Poles. Longitude is divided by the prime meridian. The east is called east longitude and the west is called west longitude. East longitude is positive and west longitude is negative. The longitude value range is 0-180, and the prime meridian is 0. 180 degrees east longitude, which is 180 degrees west longitude, is the Bering Strait. The Bering Strait is the international date line, and the date difference is one day. According to longitude, the earth is divided into 24 time zones, each time zone has minutes, and minutes contain seconds. projection projection projection When making maps, the concept of projection is very important. Our earth is round, and the coordinates of the earth are spherical coordinates. Spherical coordinates are three-dimensional coordinates (x, y, z), while our maps are two-dimensional (x, y). We need to convert the three-dimensional coordinates of the sphere into two-dimensional coordinates of the plane. The concept of projection has been used in coordinate transformation for a long time. Commonly used projections are: cylindrical projection, conic projection, azimuthal projection, and Mercator projection is used in our map navigation. Mercator projection Mercator projection Baidu, Amap, and Google all use the Mercator projection, which has a big drawback, which is that it produces huge deformation in high-latitude areas (north and south latitudes). The deformation is more serious in high-latitude areas such as Russia, Greenland, Africa, and Antarctica. Mercator projection The five countries above are: Russia, Australia, China, Brazil, and Canada. We put these five countries on the same latitude to compare them and found that the difference is not too big. But if we put them in the picture above, Russia is several times the size of China. Foreign developers have developed a website that can pull different countries to the same latitude, which can then display the true proportion of the country's area. Website address: http://thetruesize.com/ Goode Projection Goode Projection The Goode projection avoids the problem of map distortion. This projection divides the map into several parts and then connects the parts together along the equator. We can see that Greenland has been divided into two parts above. This projection is not suitable for development and does not look good. Pyramid Model Pyramid Model It is impossible to display a world map on a mobile phone, so the concept of the pyramid model (that is, scale) is introduced. We can display different resolutions according to different zoom ratios. In the map application, we use our fingers to zoom in and out on the map. The changes in the map display size are all based on the pyramid model to organize the tile images. Tile Coordinate System Tile Coordinate System The tile coordinate system is used in conjunction with the pyramid model. At different zoom levels, the number of tiles in the same area is also different. The more tiles there are, the more detailed the area is, and the larger the zoom ratio is. The tile coordinate system is used in both 2D and 3D scenes. When the network is not good, we can see the loading process of map tiles and the size and position of tiles. Coordinate encryption
According to Chinese law, map providers must offset the longitude and latitude of maps. The National Bureau of Surveying and Mapping has developed a set of encryption standards, which is the commonly used GCJ-02. There are two main formats for longitude and latitude coordinate encryption, GPS coordinate system (WGS-84) and Mars coordinate system (GCJ-02). The encryption algorithm is open source and can be searched. The international latitude and longitude coordinate standard is WGS-84, and China must at least use GCJ-02 developed by the National Bureau of Surveying and Mapping to encrypt the geographic location for the first time. Since the encryption of each navigation SDK provider is not unified, the map data of Baidu, Amap, and Google are not unified and need to be converted again. Map Location Map Location There are three main mobile positioning methods: GPS, Wi-Fi, and base stations. However, Android and iOS are different. Android allows users to choose and set the positioning method, but iOS is selected by the system, and we do not have the authority to operate the positioning method. iOS does not allow third-party positioning, so current map applications are all encapsulations of system positioning. If there is a GPS signal, the iOS system will give priority to GPS positioning, followed by Wi-Fi positioning. If the Wi-Fi signal is not good, it will choose base station positioning. Google has the highest accuracy in positioning. Google uses big data analysis to record every positioning using Google Maps. The next time you locate again, you can directly analyze it based on information such as the Mac address to improve positioning accuracy. A more tragic problem is that some older iOS devices do not have GPS positioning modules, such as some older versions of iPads. Such devices cannot be located without Wi-Fi. Geocoding and reverse geocoding Example images Geocoding: also known as geographic parsing, which obtains the corresponding longitude and latitude information from a detailed structured address. For example, the address of No. 27, Zhongguancun South Street, Haidian District, Beijing, can obtain a unique longitude and latitude information. Reverse geocoding: that is, reverse geographic parsing, which obtains a structured address information from a longitude and latitude information. For example, lng:116.31985, lat:39.959836 longitude and latitude can obtain geographic information similar to the above. The iOS system API, Amap SDK, and Baidu SDK all provide us with geocoding and reverse geocoding APIs, but we need to pay attention to the conversion of longitude and latitude. The longitude and latitude returned by different map SDKs are encrypted differently. We need to convert them when passing in and receiving longitude and latitude parameters. Map data source Gaode NavInfo The more active data collection companies in China are mainly Amap and NavInfo. Baidu does not have the qualifications for data collection (it recently acquired Daodaotong), so its data mainly relies on NavInfo. NavInfo cooperates closely with the National Bureau of Surveying, Mapping and Geoinformation. The data source is mainly provided by the National Bureau of Surveying, Mapping and Geoinformation, and some of the data is also self-surveyed. AutoNavi has good surveying and aerial photography capabilities. It mainly surveys and maps data by itself, and some data is also provided by the National Bureau of Surveying, Mapping and Geoinformation. Data surveying and mapping units cooperate with each other and will purchase data that they do not have. In China, the data sources for map developers such as Google Maps and Apple Maps are almost all from these two companies. POI data POI POI data is a kind of vector data, including food, shops, banks, gas stations, etc., which are all POI data, and are generally represented by bubbles or pins on the map. Data can be collected through vehicle-mounted GPS cameras, or captured or purchased from service-oriented Internet companies. Since Baidu and AutoNavi provide external SDKs, some data can also be obtained through users using map SDKs. Baidu's map data mainly relies on NavInfo and TD Ameritrade, while Amap mainly relies on self-collection. Generally, these data are also purchased from Internet service providers such as Dianping, Ctrip, and Koubei, and POI data is also purchased from each other. Raster - 2D Map Sangetsu Sangetsu 2D scene: light map application, simple location sharing, point of interest annotation, route display, etc. The 2D model display effect is not very good. When the zoom ratio is small, it looks blurry (the clarity looks OK when the zoom ratio is larger). The description of a place in a raster model is composed of many layers of images, each layer represents different information (such as roads). Raster models usually render a base map first, and then overlay layers such as road conditions and POI on the base map. The Grid images are all pre-processed on the server. You can download the processed images from the server and stitch them locally. Since the images are downloaded locally, the layers cannot be changed locally. In terms of performance, the server consumes a lot of performance to synthesize the images, but the client consumes less performance and occupies less memory, so it is smoother to use. Vector - 3D Map Vector Map Vector Map 3D scene: map-heavy applications, with LBS as the core function, require offline maps, better rendering effects, and in-app navigation. For example, taxi applications and travel navigation applications, 3D models have better rendering effects, and generally, this 3D model must be used when using navigation functions. Vector data is downloaded from the server and then synthesized and drawn on the client, so we can control the display of the map and it is more customizable. Vector graphics look clearer and have better rendering effects. However, vector graphics consume a lot of mobile phone performance, occupy a lot of mobile phone memory, and consume a lot of CPU and GPU. The performance consumption of the server is smaller than that of the 2D scene, because the server only loads the original data and transmits it to the client, leaving the drawing processing of the synthetic drawing and other layer rendering to the client. It improves the flexibility of the client and better effects, but sacrifices the performance of the client, which has both advantages and disadvantages. 3D Map 3D Map 3D maps are developed based on 3D map data. 3D maps look more three-dimensional and can present 3D buildings and shadow effects on the map. Moreover, as the user operates the map, the angle, shadow and other effects of the buildings will also change accordingly. During the transition process of 3D maps, fake 3D maps have also appeared. This kind of map can only be translated in plane but not rotated, and is the product of the transition between data plane map and 3D map. Foreign Maps Foreign Maps Baidu Maps currently supports foreign map services in some countries, such as Singapore, South Korea, Japan, Thailand, etc. You can directly view and search for some POIs in these countries on the latest Baidu Maps app, as well as use navigation and other functions. So far, only Baidu supports foreign map services, and Amap does not support this service for the time being. In places where Baidu and Amap do not support, since the server has no data, it will not render and it will look white. Real-life map Real-life map Real-life maps were originally developed by Google. This technology requires the cooperation of software and hardware, as well as a large amount of data processing to complete. Collecting real scenes requires a variety of real scene collection tools, including car collection, bicycle collection, human collection, etc. This is mainly due to the need to deal with a variety of collection locations. When collecting, the data is bound to the GPS location in real time, so that it is clear where it was collected. After data collection, engineers need to perform complex data processing to form the real-life data we see. Real-life data is generally static and not updated in real time. In order to protect the privacy of the user being collected, key parts of the real-life data need to be blurred, such as faces and license plates. Indoor Maps Indoor Maps Indoor positioning is a positioning mode combined with 3D positioning. This positioning can be performed indoors. Indoor positioning directly locates a store at a certain location on a certain floor, and the floor can be selected. In traditional positioning, because there are multiple floors in a building, there will be overlapping positioning problems, and the GPS signal in the building is not very good or even non-existent. Therefore, some new technologies have emerged to achieve positioning in buildings: AGPS (Assisted Global Positioning System), Wi-Fi fingerprint positioning, zigbee chip positioning, RFID smart tag technology, and ibeacon launched by Apple. Among them, AutoNavi uses Wi-Fi fingerprint positioning technology. Baidu heat map Baidu heat map First, Baidu was the first to support the heat map function, which indicates that the era of big data is getting closer. The heat map is inferred based on the usage of Baidu Maps mobile client and SDK in these areas. These inferred data can be network requests, number of opens, etc., and the distribution of people can be inferred through these data. According to Baidu's previous CCTV reports, these data can even predict congestion in scenic spots and prevent large-scale stampedes and other mass incidents. The heat map becomes darker as the density of the same area changes. However, due to the characteristics of the statistical method, the statistical data is not very accurate. For example, there is a big difference between daytime and nighttime. It is only used as a reference. Map SDK Architecture Amap SDK Structure Amap SDK Structure Annotation: single point annotation, inherited from UIView, can use some basic properties of UIView, and introduces a reuse mechanism (Baidu also has the same implementation, including some taxi apps, all of which are implemented using Annotation). Overlay: Multi-point annotation, directly rendered by the engine, the UI can be customized through the SDK API, and multi-point annotation is used to identify a route or a certain area. Other: cloud search, geocoding and reverse geocoding, navigation path planning, positioning, POI search, etc. Differences between MapKit and Amap SDK contrast The Amap logo on the right is black and is displayed in the lower right corner. This is the MapKit.framework of the iOS system. The Amap logo in the left picture is blue and is displayed in the lower left corner. This is Amap’s own SDK. Apple's MapKit only uses Amap's data, but the API was developed by Apple itself. Baidu Map SDK Framework Baidu Map SDK Framework Cross-platform engine:
Baidu Maps has added some practical features to Amap, such as heat maps, cycling, personalized maps, etc. These features are not available on Amap, but Amap also has some very good features. Both have their own advantages. Baidu Maps and Amap Maps both have 2D and 3D functions. 2D is a purely flat display without the effect of elevating buildings. Baidu Map SDK Framework Baidu Map SDK Framework Baidu SDK main module division:
Baidu SDK is divided into six major modules. You can download the corresponding modules according to your needs, which will reduce the size of the downloaded SDK. Baidu authentication strategy: Users can interact with Baidu Open Cloud in two ways, including authentication and anonymous. Authentication is used in many places in the SDK. For example, when loading a map, if the authentication fails, the map will not be displayed. Baidu attaches great importance to SDK authentication. Layer Rendering Layer Rendering Baidu Map rendering is divided into multiple layers, and the rendering target of each layer is different. Customized annotations and overlays on the map are collectively called map overlays. Multiple layers are superimposed to form a vector map. The Baidu Map SDK map level is currently 19, and buildings, roads, rivers, schools, parks, etc. can be rendered according to different zoom levels. Baidu Maps supports gestures such as multi-touch, double-click to zoom in, multi-touch to zoom out, rotation, etc. It also supports operations such as drawing points, polylines, circles, polygons, etc., and can customize heat maps, tile maps, etc. Baidu Personalized Map Baidu Personalized Map Baidu Maps launched personalized maps in January 2016. The SDK provides personalized map templates, which can be used to change the base map color and style. Download the template from the Baidu Developer Platform. You can modify the color and style of the ground, water system, grassland, road, railway, subway, POI, etc. through the map template, and then call the method provided by the SDK to read the template. Map Industry Chain Map Industry Chain Active Statistics The first picture is a statistical report from 2014. This statistical report is not very comprehensive and some navigation applications are not included. In this statistical report, we found that Amap is the only company that covers the entire industrial chain, and Amap is present in every link of the industrial chain. In April 2014, Alibaba completed its $1.5 billion acquisition of AutoNavi, making AutoNavi a wholly-owned subsidiary of Alibaba. |
<<: Yu Yang of Analysys: Data is the new energy in the future Internet world
>>: How do app entrepreneurs get investment?
Arrangements for clubs in Nanjing that require re...
The online advertising market is becoming increas...
Delivery is like fighting a war. Many times the o...
Memory allocation in Java It is mainly divided in...
Early this morning, Apple pushed the iOS 17.2 Bet...
Although Tik Tok is a platform with huge traffic....
The traffic of movie commentary accounts has ente...
Today is the third anniversary of the death of th...
When applying for a 400 phone, many users often a...
How to do user operations? What are some good met...
This article will take Cemoy, an Australian skinc...
The effect is poor. What went wrong? First, let’s...
Huang Zhizhong personally taught: 35-day super pe...
As a national-level APP, the importance of WeChat...
80% of companies will do bidding promotion during...