Geographic information establishing method, electronic equipment and storage medium
By combining the locally constructed spherical geometry on electronic devices with a visual device model, the map extent is dynamically determined, solving the problem of establishing a geographic information system in a network-free environment and achieving accurate geographic information support in a network-free environment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN TIANHE DEFENCE TECH
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-17
AI Technical Summary
Existing geographic information systems are unable to meet the actual application needs of emergency scenarios in environments without or with weak networks, and cannot effectively establish geographic information support systems.
By constructing a standardized spherical geometry locally on the electronic device as a spatial reference, combining it with a visual device model to perceive the user's viewing angle, dynamically determining the map range, and retrieving map tiles from a local database, the loading information of the map tiles is accurately calculated to generate a visualized 3D map.
Accurate geographic information was established in a network-free environment, solving the problem that existing technologies cannot provide effective geographic information support. All data comes from a local database, ensuring the accuracy of texture mapping and the integrity of data rendering.
Smart Images

Figure CN121883741A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geographic information technology, and more specifically, to a geographic information creation method, electronic device, and storage medium. Background Technology
[0002] With the development of information technology, Geographic Information Systems (GIS) are playing an increasingly important role in key areas such as emergency management, disaster relief, public safety, and military operations. GIS can provide spatial data support for emergency command, enabling functions such as visualization of disaster situations, spatial analysis of resource allocation, and route planning. It is one of the core supporting technologies of modern emergency response systems.
[0003] Currently, most emergency response systems rely heavily on internet connectivity and online map services provided by third-party map service providers. Existing geographic information systems have serious limitations in emergency scenarios with no or weak internet access, making it difficult to meet practical application needs. Summary of the Invention
[0004] The purpose of this application is to address the shortcomings of the prior art by providing a geographic information creation method, electronic device, and storage medium to improve the accuracy of geographic information creation.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for establishing geographic information, the method comprising: An initial three-dimensional Earth model is established. Based on the location information of the initial three-dimensional Earth model and the vision device model, the map information to be loaded is determined. The map information to be loaded includes the latitude and longitude information of the map to be loaded. Based on the map information to be loaded and the scaling level of the initial 3D Earth model, the loading information of each map tile to be loaded at the scaling level is determined, and each map tile to be loaded is obtained from the local database. The loading information is used to indicate the position of the map tile to be loaded in the initial 3D Earth model. Based on the loading information of each of the map tiles to be loaded, the map tiles to be loaded are loaded and overlaid onto the initial three-dimensional earth model to obtain the target three-dimensional map.
[0006] Optionally, establishing the initial three-dimensional Earth model includes: Establish a spherical model with a preset radius. The center of the sphere is the origin of the three-dimensional coordinate system. The north pole of the sphere is located in the positive direction of the Y-axis of the sphere, the south pole of the sphere is located in the negative direction of the Y-axis of the sphere, and the ocean zero point of the sphere is located in the positive direction of the X-axis of the sphere. The Arctic region and the Antarctic region corresponding to the sphere model are respectively completed to obtain the initial three-dimensional Earth model.
[0007] Optionally, determining the map information to be loaded based on the position information of the initial 3D Earth model and the visual device model includes: The distance between the visual device model and the surface of the initial three-dimensional earth model is determined based on the location information of the visual device model. The map information to be loaded is determined based on the distance.
[0008] Optionally, determining the map information to be loaded based on the distance includes: If the distance is greater than the radius of the initial 3D Earth model, then the map information to be loaded is determined to be all latitude and longitude. If the distance is less than or equal to the radius of the initial 3D Earth model, then based on the distance and the radius of the initial 3D Earth model, multiple boundary latitude and longitude coordinates to be loaded are determined, and these multiple boundary latitude and longitude coordinates to be loaded are used as the map information to be loaded.
[0009] Optionally, determining the loading information of each map tile to be loaded at the zoom level based on the map information to be loaded and the zoom level of the 3D earth model includes: Based on the latitude and longitude of each boundary in the map information to be loaded, determine multiple boundary location points under the zoom level and the latitude and longitude information of each boundary location point; Based on the latitude and longitude information of each boundary location point and the scaling level, the boundary map tile corresponding to each boundary location point is determined, and each boundary map tile and each intermediate map tile contained in each boundary map tile are used as the map tile to be loaded under the scaling level. Based on each of the map tiles to be loaded and the zoom level, determine the loading information of each of the map tiles to be loaded at the zoom level.
[0010] Optionally, determining the boundary map tile corresponding to each boundary location point based on the latitude and longitude information of each boundary location point and the zoom level includes: Based on the longitude of the boundary location point and the zoom level, determine the column coordinates of the boundary map tile corresponding to the boundary location point; Based on the latitude of the boundary location point and the zoom level, determine the row coordinates of the boundary map tile corresponding to the boundary location point.
[0011] Optionally, determining the loading information of each map tile to be loaded at the zoom level based on each of the map tiles to be loaded and the zoom level includes: Based on the row and column coordinates of the map tile to be loaded and the scaling level, determine the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the scaling level, wherein the row and column coordinates are the row and column coordinates of the map tile when the scaling level is the preset minimum level; Based on the sub-coordinates and the scaling level, determine the latitude and longitude of each angle corresponding to each sub-tile; Based on the latitude and longitude of each angle and the radius of the initial three-dimensional Earth model, the three-dimensional coordinates corresponding to the latitude and longitude of each angle are determined, and the three-dimensional coordinates corresponding to the latitude and longitude of each angle are used as the loading information of the map tile to be loaded.
[0012] Optionally, determining the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the zoom level based on the initial row and column coordinates of the map tile to be loaded and the zoom level includes: If the scaling level is greater than a preset level threshold, then the sub-coordinate of the sub-tile is determined to be half of the map tile to be loaded; If the scaling level is less than or equal to a preset level threshold, the sub-coordinates of each sub-tile are determined based on the initial row and column coordinates of the map tile to be loaded and the scaling level.
[0013] Secondly, embodiments of this application also provide a geographic information establishment apparatus, the apparatus comprising: A module is established to create an initial 3D Earth model. Based on the location information of the initial 3D Earth model and the vision device model, the map information to be loaded is determined. The map information to be loaded includes the latitude and longitude information of the map to be loaded. The determination module is used to determine the loading information of each map tile to be loaded at the scaling level based on the map information to be loaded and the scaling level of the initial three-dimensional earth model, and to obtain each map tile to be loaded from the local database. The loading information is used to indicate the position of the map tile to be loaded in the initial three-dimensional earth model. The loading module is used to load each of the map tiles to be loaded onto the initial three-dimensional earth model based on the loading information of each of the map tiles to be loaded, so as to obtain the target three-dimensional map.
[0014] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the application runs, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the geographic information establishment method described in the first aspect.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is read and executes the steps of the geographic information establishment method described in the first aspect.
[0016] The beneficial effects of this application are: This application provides a geographic information creation method, electronic device, and storage medium. By constructing a standardized spherical geometry locally on the electronic device as a spatial reference, basic modeling can be completed without relying on external resources. A visual device model is introduced to perceive the user's current viewing perspective, and the required map range is dynamically determined by combining the visual device model with a global model, i.e., determining the map information to be loaded. Then, based on the map information and zoom level, the loading information of each map tile is accurately calculated, i.e., determining the 3D coordinates of each map tile on the global model, ensuring the accuracy of the mapping. Furthermore, all map tile data originates from data pre-stored in a local database, enabling end-to-end data reading and rendering without a network connection, ultimately generating a visualized 3D target map. This successfully solves the problem of existing technologies being unable to establish an effective geographic information support system in a network-free environment. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a geographic information creation method provided in an embodiment of this application; Figure 2 A flowchart illustrating the second geographic information creation method provided in this application embodiment; Figure 3 A schematic diagram of a sphere model in three-dimensional coordinates provided for an embodiment of this application; Figure 4 A schematic diagram of a sphere model with a low scaling level provided in an embodiment of this application; Figure 5 This is a schematic diagram showing the completed sphere model according to an embodiment of this application; Figure 6 A flowchart illustrating the third geographic information creation method provided in this application embodiment; Figure 7 A distance diagram provided for an embodiment of this application; Figure 8 A flowchart illustrating the fourth geographic information creation method provided in this application embodiment; Figure 9 A flowchart illustrating the fifth geographic information creation method provided in this application embodiment; Figure 10 A flowchart illustrating the sixth geographic information creation method provided in this application embodiment; Figure 11 A schematic diagram of an apparatus for a geographic information establishment method provided in an embodiment of this application; Figure 12 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0020] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0021] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0022] Optionally, the geographic information establishment method provided in this application embodiment can be applied to an electronic device, such as a mobile phone, tablet computer, laptop computer, PDA, desktop computer, or other terminal device with computing power and display function, or it can be a server. Specifically, it can be applied to applications in terminal devices, such as mobile phone applications (APP) and computer application systems.
[0023] Figure 1 This is a flowchart illustrating a geographic information creation method provided in an embodiment of this application. The execution subject of this method is as described above: electronic device. Figure 1 As shown, the method includes: S101. Establish an initial 3D Earth model. Based on the location information of the initial 3D Earth model and the vision device model, determine the map information to be loaded.
[0024] The map information to be loaded may include the latitude and longitude information of the map to be loaded.
[0025] Optionally, establishing an initial 3D Earth model refers to constructing a geometrically approximate spherical structure in the 3D coordinate system of an electronic device, serving as the spatial carrier for map tiles. This initial 3D Earth model refers to a 3D Earth model without loaded map tiles, which can be used as a 3D spatial reference framework for subsequent map tile loading and rendering. After completing the construction of the initial 3D Earth model, it is necessary to determine the map information that needs to be loaded in the current scene.
[0026] Optionally, the drawback of the map information to be loaded depends on the location information of the visual device model, which simulates the user's viewing perspective. This visual device model can be, for example, a virtual camera, integrated into a 3D engine for interactive browsing of 3D scenes. The map information to be loaded, i.e., the range of the map area to be loaded, can be determined using a preset method based on the initial 3D Earth model and the location information of the visual device model. This map information includes the latitude and longitude boundaries of the map area to be loaded, specifically including the left boundary longitude, right boundary longitude, upper boundary latitude, and lower boundary latitude, used to define the spatial range of map tiles to be extracted from the local database.
[0027] S102. Based on the map information to be loaded and the scaling level of the initial 3D Earth model, determine the loading information of each map tile to be loaded at the scaling level, and obtain each map tile to be loaded from the local database.
[0028] The loading information refers to the position of the map tile to be loaded in the initial 3D Earth model. This position refers to the coordinates of a 3D point in space, so that the map tile can be attached to the initial 3D Earth model.
[0029] The scaling level of the initial 3D earth model is determined in advance based on the user's actual needs. Different needs require different scaling levels to avoid unnecessary high-resolution data consuming system resources. The local database refers to an offline map database pre-stored inside electronic devices or removable storage media. It contains map tile image files at the first scaling level and is stored using a "row number-column number" index path.
[0030] Optionally, during the process of determining the loading information of each map tile to be loaded under the zoom level, the row and column coordinates of each map tile to be loaded can also be determined. Then, a query request can be initiated from the local database based on the row and column coordinates of each map tile to be loaded to check whether there is a map tile corresponding to the row and column coordinates. If there is, the queried map tile can be temporarily stored in the memory cache.
[0031] S103. Based on the loading information of each map tile to be loaded, load each map tile to be loaded onto the initial three-dimensional earth model to obtain the target three-dimensional map.
[0032] Optionally, after obtaining the loading information of each map tile to be loaded, that is, after obtaining the spatial positioning parameters of each map tile to be loaded and its location on the initial 3D Earth model, the geographic information visualization construction stage begins, namely the 3D loading and rendering coverage of the map tiles to be loaded. Here, loading coverage refers to binding each map tile to be loaded as a texture image to its corresponding polygonal mesh in 3D space, and then rendering it using a graphics rendering engine, so that each map tile visually fits naturally onto the Earth's surface.
[0033] The map tiles to be loaded, obtained from the local database, are then accurately mapped and fitted onto the corresponding surface areas of the initial 3D model. Once all the map tiles to be loaded have been covered, a target 3D map with real geographic semantics and spatial structure is obtained.
[0034] In this embodiment, a standardized spherical geometry is constructed locally on the electronic device as a spatial reference, enabling basic modeling without relying on external resources. A visual device model is introduced to perceive the user's current viewing angle, and the required map range is dynamically determined by combining the visual device model with the Earth model, thus defining the map information to be loaded. Then, based on the map information and zoom level, the loading information of each map tile is accurately calculated, determining the 3D coordinates of each tile on the Earth model, ensuring the accuracy of the mapping. Furthermore, all map tile data originates from data pre-stored in a local database, allowing for end-to-end data reading and rendering without an internet connection, ultimately generating a visualized 3D target map. This successfully solves the problem of existing technologies being unable to establish an effective geographic information support system in a network-free environment.
[0035] Figure 2 A flowchart illustrating the second geographic information establishment method provided in this application embodiment is shown below. Figure 2 As shown, the process of establishing the initial three-dimensional Earth model in S101 above may include: S201. Establish a sphere model with a preset radius. The center of the sphere model is the origin of the three-dimensional coordinate system. The North Pole of the sphere model is located in the positive direction of the Y-axis of the sphere model, the South Pole of the sphere model is located in the negative direction of the Y-axis of the sphere model, and the zero point of the ocean of the sphere model is located in the positive direction of the X-axis of the sphere model.
[0036] The preset radius can be, for example, 6,371,000 kilometers. The center of the sphere model is positioned as the origin of the three-dimensional coordinate system (0, 0, 0). The North Pole is located on the positive Y-axis of the sphere model, the South Pole is located on the negative Y-axis, and the ocean zero point is located on the positive X-axis. The resulting sphere model is as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of a sphere model in three-dimensional coordinates provided in an embodiment of this application.
[0037] Optionally, the Earth model is composed of multiple triangular facets, each of which is a plane. Complex shapes are achieved by increasing the density of these facets. For recommended later texture mapping of the Earth model, every two facets form a quadrilateral. At low zoom levels, because a single map tile spans a large arc of the Earth, modeling with only two facets is insufficient to recreate the shape of the Earth's surface; therefore, more facets are needed for stitching. Figure 4 This is a schematic diagram of a sphere model with a low scaling level provided in an embodiment of this application. The low scaling level is, for example, scaling level 5 and scaling levels below scaling level 5, including scaling level 4, scaling level 3, scaling level 2, and scaling level 1.
[0038] S202. Complete the Arctic region and Antarctic region corresponding to the sphere model respectively to obtain the initial three-dimensional Earth model.
[0039] Optionally, in the Mercator projection, the representation of dimensions is limited near the poles. The map tiles cover the area between 85.05112878 degrees North and 85.05112878 degrees South latitude. Outside this dimensional range, the spherical model needs to be completed, specifically for the Arctic and Antarctic regions. The Antarctic region refers to a circle centered at the South Pole with a radius of 4.94887122 degrees. The Arctic region refers to a circle centered at the North Pole with a radius of 4.94887122 degrees. For both the Antarctic and Arctic regions, 32 triangular faces are used to complete the region, resulting in the initial 3D Earth model. Figure 5 This is a schematic diagram showing the sphere model after completion processing according to an embodiment of this application.
[0040] Figure 6 A flowchart illustrating the third geographic information establishment method provided in this application embodiment is shown below. Figure 6 As shown, in step S101 above, determining the map information to be loaded based on the position information of the initial 3D Earth model and the visual device model may include: S301. Determine the distance between the visual device model and the surface of the initial three-dimensional earth model based on the location information of the visual device model.
[0041] Optionally, the subtended angle of the vision device model can be set to... ,like Figure 7 As shown, Figure 7 In the diagram, the circle represents the outer surface of the initial 3D Earth model, O is the center of the initial 3D Earth model, point E is the position of the visual device model, point A is the perpendicular point on the surface of the initial 3D Earth model as observed from the center of the visual device model, and angle AEB is half the angle of the visual device model. .
[0042] Optionally, the distance between the visual device model and the surface of the initial 3D Earth model can be determined based on the tangent principle and trigonometric relationships. This distance is as follows: Figure 7 AE in the middle.
[0043] S302. Determine the map information to be loaded based on the distance.
[0044] Specifically, the map information to be loaded can be determined based on the distance between the visual device model and the surface of the initial 3D Earth model. That is, the map information to be loaded will be different when the distance between the visual device model and the surface of the initial 3D Earth model is different.
[0045] Optionally, determining the map information to be loaded based on distance in S302 above may include: If the distance is greater than the radius of the initial 3D Earth model, then the map information to be loaded is determined to be all latitude and longitude coordinates. When the entire initial 3D Earth model is within the observation range of the visual device model, the boundary of the viewing angle is tangent to the initial 3D Earth model. According to the tangent theorem and trigonometric relationships, the distance between the surface of the visual device model and the initial 3D Earth model is equal to the radius of the initial 3D Earth model. That is, when the distance between the surface of the visual device model and the initial 3D Earth model is greater than the radius of the initial 3D Earth model, it means that the entire initial 3D Earth model is within the observation range of the visual device model, and the entire initial 3D Earth model needs to be loaded.
[0046] If the distance is less than or equal to the radius of the initial 3D Earth model, then based on the distance and the radius of the initial 3D Earth model, determine the multiple boundary latitude and longitude coordinates to be loaded, and use these multiple boundary latitude and longitude coordinates as the map information to be loaded. The boundary latitude and longitude coordinates to be loaded include the left boundary longitude, right boundary longitude, upper boundary latitude, and lower boundary latitude.
[0047] Among them, based on the distance and the radius of the initial three-dimensional Earth model, the latitude and longitude of multiple boundaries to be loaded are determined, which can be specifically calculated by the following formulas (I) to (IV).
[0048] Formula (1) Formula (II) Formula (3) Formula (IV) in, The longitude value of the left boundary. The longitude value of the right boundary. The latitude value of the upper boundary. The latitude value of the lower boundary. The longitude of the center point of the initial 3D Earth model. denoted as , where is the latitude of the center point of the initial 3D Earth model, r is the radius of the initial 3D Earth model, and h is the distance between the visual device model and the surface of the initial 3D Earth model.
[0049] Figure 8 A flowchart illustrating the fourth geographic information establishment method provided in this application embodiment is shown below. Figure 8 As shown, in step S102 above, determining the loading information of each map tile to be loaded at a given scaling level based on the map information to be loaded and the scaling level of the initial 3D Earth model can include: S401. Based on the latitude and longitude of each boundary in the map information to be loaded, determine multiple boundary location points under the zoom level and the latitude and longitude information of each boundary location point.
[0050] Optionally, if the latitude and longitude of each boundary are calculated in step S302 above, specifically including the longitude of the left boundary, the longitude of the right boundary, the latitude of the upper boundary, and the latitude of the lower boundary, then the latitude and longitude of the upper left boundary point can be determined based on the longitude of the left boundary and the latitude of the upper boundary; the latitude and longitude of the lower left boundary point can be determined based on the longitude of the left boundary and the latitude of the lower boundary; the latitude and longitude of the upper right boundary point can be determined based on the longitude of the right boundary and the latitude of the upper boundary; and the latitude and longitude of the lower right boundary point can be determined based on the longitude of the right boundary and the latitude of the lower boundary. This allows for the determination of the four boundary points and their latitude and longitude information.
[0051] S402. Based on the latitude and longitude information and zoom level of each boundary location point, determine the boundary map tile corresponding to each boundary location point, and use each boundary map tile and each intermediate map tile in each boundary map tile as the map tile to be loaded under the zoom level.
[0052] The determined boundary map tile refers to the row and column coordinates (c, k) of the determined boundary map tile at zoom level 1, where c is the left row coordinate and k is the column coordinate.
[0053] Specifically, the top-left boundary map tile corresponding to the top-left boundary point can be determined based on the latitude and longitude information and zoom level of the top-left boundary point; the bottom-left boundary map tile corresponding to the bottom-left boundary point can be determined based on the latitude and longitude information and zoom level of the bottom-left boundary point; the top-right boundary map tile corresponding to the top-right boundary point can be determined based on the latitude and longitude information and zoom level of the top-right boundary point; and the bottom-right boundary map tile corresponding to the bottom-right boundary point can be determined based on the latitude and longitude information and zoom level of the bottom-right boundary point. All intermediate map tiles enclosed by the top-left, bottom-left, top-right, and bottom-right boundary map tiles are then used as map tiles to be loaded.
[0054] S403. Based on each map tile to be loaded and the zoom level, determine the loading information for each map tile to be loaded at the zoom level.
[0055] Optionally, after determining the row and column coordinates of each map tile to be loaded, the loading information of each map tile to be loaded can be determined using a preset method based on the row and column coordinates and scaling level of each map tile to be loaded, that is, the three-dimensional coordinates of each map tile to be loaded on the initial three-dimensional earth model can be determined.
[0056] Figure 9A flowchart illustrating the fifth geographic information establishment method provided in this application embodiment is shown below. Figure 9 As shown, in step S402 above, determining the boundary map tile corresponding to each boundary location point based on the latitude and longitude information and zoom level can include: S501. Determine the column coordinates of the boundary map tile corresponding to the boundary location point based on the longitude and zoom level.
[0057] Specifically, it is calculated using the following formula (V).
[0058] Formula (5) Where c is the column coordinate of the map tile, lon is the longitude of the location point, and n is the zoom level.
[0059] S502. Determine the row coordinates of the boundary map tiles corresponding to the boundary location points based on the latitude and zoom level.
[0060] Specifically, it can be calculated using the following formula (vi).
[0061] Formula (VI) Where k is the row coordinate of the map tile, lat is the latitude of the location point, and n is the zoom level.
[0062] Figure 10 A flowchart illustrating the sixth geographic information establishment method provided in this application embodiment is shown below. Figure 10 As shown, in step S403 above, determining the loading information of each map tile to be loaded at each zoom level based on the map tile to be loaded and the zoom level may include: S601. Based on the row and column coordinates of the map tile to be loaded and the scaling level, determine the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the scaling level.
[0063] The row and column coordinates of the map tile to be loaded refer to the row and column coordinates of the map tile when the zoom level is the preset minimum level.
[0064] Optionally, for each map tile to be loaded, the sub-coordinates of each sub-tile corresponding to the map tile at the zoom level can be determined based on the row and column coordinates of the map tile to be loaded and the zoom level. The sub-coordinates refer to the row and column coordinates of the sub-tile.
[0065] S602. Determine the latitude and longitude of each sub-tile based on its sub-coordinates and scaling level.
[0066] Optionally, after obtaining the sub-coordinates of each sub-tile, the latitude and longitude of the four corners of each map tile are calculated using the following formula (VII) according to the Mercator projection principle.
[0067] Formula (VII) Where n is the scaling level, Let t be the row coordinate of the tile, lon1 be the longitude of the left side of the tile, lon2 be the longitude of the right side of the tile, lat1 be the latitude of the top side of the tile, and lat2 be the latitude of the bottom side of the tile. After obtaining lon1, lon2, lat1, and lat2, the latitude and longitude of each corner can be obtained.
[0068] S603. Based on the latitude and longitude of each angle and the radius of the initial three-dimensional earth model, determine the three-dimensional coordinates corresponding to the latitude and longitude of each angle, and use the three-dimensional coordinates corresponding to the latitude and longitude of each angle as the loading information of the map tile to be loaded.
[0069] Optionally, after obtaining the latitude and longitude of each corner corresponding to each sub-tile, the three-dimensional coordinates of each three-dimensional coordinate point in the initial three-dimensional model can be converted into latitude and longitude using the following formula (viii). Then, they are matched with the latitude and longitude of each corner, and the three-dimensional coordinates matched with the latitude and longitude of each corner are used as the three-dimensional coordinates corresponding to the latitude and longitude of each corner.
[0070] Formula (8) Where lona is the longitude of each angle, lata is the latitude of each angle, (x, y, z) are the three-dimensional coordinates, and r is the radius of the initial Earth model. ; ; .
[0071] Optionally, determining the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the zoom level in step S601, based on the row and column coordinates of the map tile to be loaded and the zoom level, may include: If the scaling level is greater than the preset level threshold, the sub-coordinates of the sub-tile are determined to be half of the map tile to be loaded, that is, the map tile to be loaded is attached to the two triangular faces.
[0072] If the zoom level is less than or equal to a preset threshold, the sub-coordinates of each sub-tile are determined based on the row and column coordinates of the map tile to be loaded and the zoom level. Specifically, at zoom level 1, the row and column coordinates of the map tile to be loaded are (c, k). When the zoom level increases by one level, the map tiles are divided into finer sub-tiles, and the number of tiles becomes four times that of the previous zoom level. For example, at zoom level 2, the sub-coordinates of the four sub-tiles are the top left sub-tile (2c, 2k), the top right sub-tile (2c+1, 2k), the bottom left sub-tile (2c, 2k+1), and the bottom right sub-tile (2c+1, 2k+1), and so on, to obtain the sub-coordinates of each sub-tile at each zoom level.
[0073] The preset level threshold is, for example, 5. That is, when the zoom level is greater than or equal to 5, a map tile needs to cover... There are 3 triangular faces, where n is the zoom level. When the zoom level is greater than 5, one map tile covers two triangular faces. That is, when the zoom level is greater than 5, it is not necessary to calculate the sub-coordinates of the sub-tiles of the map to be loaded. The latitude and longitude of the four corners of the map tile to be loaded can be converted into three-dimensional coordinates.
[0074] Figure 11 A schematic diagram of an apparatus for establishing geographic information provided in an embodiment of this application is shown below. Figure 11 As shown, the device includes: The module 701 is used to establish an initial three-dimensional earth model and determine the map information to be loaded based on the position information of the initial three-dimensional earth model and the vision device model. The map information to be loaded includes the latitude and longitude information of the map to be loaded. The determining module 702 is used to determine the loading information of each map tile to be loaded at the scaling level based on the map information to be loaded and the scaling level of the initial three-dimensional earth model, and to obtain each map tile to be loaded from the local database. The loading information is used to indicate the position of the map tile to be loaded in the initial three-dimensional earth model. The loading module 703 is used to load each of the map tiles to be loaded onto the initial three-dimensional earth model based on the loading information of each of the map tiles to be loaded, so as to obtain the target three-dimensional map.
[0075] Optionally, the establishment module 701 is specifically used for: Establish a spherical model with a preset radius. The center of the sphere is the origin of the three-dimensional coordinate system. The north pole of the sphere is located in the positive direction of the Y-axis of the sphere, the south pole of the sphere is located in the negative direction of the Y-axis of the sphere, and the ocean zero point of the sphere is located in the positive direction of the X-axis of the sphere. The Arctic region and the Antarctic region corresponding to the sphere model are respectively completed to obtain the initial three-dimensional Earth model.
[0076] Optionally, the establishment module 701 is specifically used for: The distance between the visual device model and the surface of the initial three-dimensional earth model is determined based on the location information of the visual device model. The map information to be loaded is determined based on the distance.
[0077] Optionally, the establishment module 701 is specifically used for: If the distance is greater than the radius of the initial 3D Earth model, then the map information to be loaded is determined to be all latitude and longitude. If the distance is less than or equal to the radius of the initial 3D Earth model, then based on the distance and the radius of the initial 3D Earth model, multiple boundary latitude and longitude coordinates to be loaded are determined, and these multiple boundary latitude and longitude coordinates to be loaded are used as the map information to be loaded.
[0078] Optionally, the determining module 702 is specifically used for: Based on the latitude and longitude of each boundary in the map information to be loaded, determine multiple boundary location points under the zoom level and the latitude and longitude information of each boundary location point; Based on the latitude and longitude information of each boundary location point and the scaling level, the boundary map tile corresponding to each boundary location point is determined, and each boundary map tile and each intermediate map tile contained in each boundary map tile are used as the map tile to be loaded under the scaling level. Based on each of the map tiles to be loaded and the zoom level, determine the loading information of each of the map tiles to be loaded at the zoom level.
[0079] Optionally, the determining module 702 is specifically used for: Based on the longitude of the boundary location point and the zoom level, determine the column coordinates of the boundary map tile corresponding to the boundary location point; Based on the latitude of the boundary location point and the zoom level, determine the row coordinates of the boundary map tile corresponding to the boundary location point.
[0080] Optionally, the root determination module 702 is specifically used for: Based on the row and column coordinates of the map tile to be loaded and the scaling level, determine the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the scaling level, wherein the row and column coordinates are the row and column coordinates of the map tile when the scaling level is the preset minimum level; Based on the sub-coordinates and the scaling level, determine the latitude and longitude of each angle corresponding to each sub-tile; Based on the latitude and longitude of each angle and the radius of the initial three-dimensional Earth model, the three-dimensional coordinates corresponding to the latitude and longitude of each angle are determined, and the three-dimensional coordinates corresponding to the latitude and longitude of each angle are used as the loading information of the map tile to be loaded.
[0081] Optionally, the determining module 702 is specifically used for: If the scaling level is greater than a preset level threshold, then the sub-coordinate of the sub-tile is determined to be half of the map tile to be loaded; If the scaling level is less than or equal to a preset level threshold, the sub-coordinates of each sub-tile are determined based on the initial row and column coordinates of the map tile to be loaded and the scaling level.
[0082] Figure 12 This is a structural block diagram of an electronic device 800 provided in an embodiment of this application. (See diagram below.) Figure 12 As shown, the electronic device may include: a processor 801 and a memory 802.
[0083] Optionally, a bus 803 may also be included, wherein the memory 802 is used to store machine-readable instructions executable by the processor 801. When the electronic device 800 is running, the processor 801 and the memory 802 communicate via the bus 803. When the machine-readable instructions are executed by the processor 801, the method steps in the above method embodiments are performed.
[0084] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the method steps described in the above-described geographic information establishment method embodiments.
[0085] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or modules may be electrical, mechanical, or other forms.
[0086] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0087] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method of establishing geographic information, characterized by, The method includes: An initial three-dimensional Earth model is established. Based on the location information of the initial three-dimensional Earth model and the vision device model, the map information to be loaded is determined. The map information to be loaded includes the latitude and longitude information of the map to be loaded. Based on the map information to be loaded and the scaling level of the initial 3D Earth model, the loading information of each map tile to be loaded at the scaling level is determined, and each map tile to be loaded is obtained from the local database. The loading information is used to indicate the position of the map tile to be loaded in the initial 3D Earth model. Based on the loading information of each of the map tiles to be loaded, the map tiles to be loaded are loaded and overlaid onto the initial three-dimensional earth model to obtain the target three-dimensional map.
2. The geographic information establishing method according to claim 1, characterized by, The establishment of the initial three-dimensional Earth model includes: Establish a spherical model with a preset radius. The center of the sphere is the origin of the three-dimensional coordinate system. The north pole of the sphere is located in the positive direction of the Y-axis of the sphere, the south pole of the sphere is located in the negative direction of the Y-axis of the sphere, and the ocean zero point of the sphere is located in the positive direction of the X-axis of the sphere. The Arctic region and the Antarctic region corresponding to the sphere model are respectively completed to obtain the initial three-dimensional Earth model.
3. The geographic information establishing method according to claim 1, wherein, The step of determining the map information to be loaded based on the position information of the initial 3D Earth model and the visual device model includes: The distance between the visual device model and the surface of the initial three-dimensional earth model is determined based on the location information of the visual device model. The map information to be loaded is determined based on the distance.
4. The geographic information establishing method according to claim 3, wherein, Determining the map information to be loaded based on the distance includes: If the distance is greater than the radius of the initial 3D Earth model, then the map information to be loaded is determined to be all latitude and longitude. If the distance is less than or equal to the radius of the initial 3D Earth model, then based on the distance and the radius of the initial 3D Earth model, multiple boundary latitude and longitude coordinates to be loaded are determined, and these multiple boundary latitude and longitude coordinates to be loaded are used as the map information to be loaded.
5. The geographic information establishing method according to claim 1, wherein, The step of determining the loading information of each map tile to be loaded at the zoom level based on the map information to be loaded and the zoom level of the 3D earth model includes: Based on the latitude and longitude of each boundary in the map information to be loaded, determine multiple boundary location points under the zoom level and the latitude and longitude information of each boundary location point; Based on the latitude and longitude information of each boundary location point and the scaling level, the boundary map tile corresponding to each boundary location point is determined, and each boundary map tile and each intermediate map tile contained in each boundary map tile are used as the map tile to be loaded under the scaling level. Based on each of the map tiles to be loaded and the zoom level, determine the loading information of each of the map tiles to be loaded at the zoom level.
6. The geographic information establishing method according to claim 5, wherein, The step of determining the boundary map tile corresponding to each boundary location point based on the latitude and longitude information of each boundary location point and the zoom level includes: Based on the longitude of the boundary location point and the zoom level, determine the column coordinates of the boundary map tile corresponding to the boundary location point; Based on the latitude of the boundary location point and the zoom level, determine the row coordinates of the boundary map tile corresponding to the boundary location point.
7. The geographic information establishing method according to claim 5, wherein, The step of determining the loading information of each map tile to be loaded at a given zoom level, based on each of the map tiles to be loaded and the zoom level, includes: Based on the row and column coordinates of the map tile to be loaded and the scaling level, determine the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the scaling level, wherein the row and column coordinates are the row and column coordinates of the map tile when the scaling level is the preset minimum level; Based on the sub-coordinates and the scaling level, determine the latitude and longitude of each angle corresponding to each sub-tile; Based on the latitude and longitude of each angle and the radius of the initial three-dimensional Earth model, the three-dimensional coordinates corresponding to the latitude and longitude of each angle are determined, and the three-dimensional coordinates corresponding to the latitude and longitude of each angle are used as the loading information of the map tile to be loaded.
8. The geographic information establishing method according to claim 7, wherein, The step of determining the sub-coordinates of each sub-tile corresponding to the map tile to be loaded at the zoom level based on the initial row and column coordinates of the map tile to be loaded and the zoom level includes: If the scaling level is greater than a preset level threshold, then the sub-coordinate of the sub-tile is determined to be half of the map tile to be loaded; If the scaling level is less than or equal to a preset level threshold, the sub-coordinates of each sub-tile are determined based on the initial row and column coordinates of the map tile to be loaded and the scaling level.
9. An electronic device, comprising: It includes a memory and a processor, the memory storing a computer program executable by the processor, and the processor executing the computer program to implement the steps of the geographic information establishment method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the geographic information establishment method as described in any one of claims 1-8.