Method, device and medium for rendering three-dimensional terrain map

CN115908725BActive Publication Date: 2026-09-11AUTONAVI SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211305806.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2026-09-11
Estimated Expiration
2042-10-24

AI Technical Summary

Benefits of technology

[0013] The technical solution provided in this disclosure has the following advantages compared with the prior art:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908725B_ABST
    Figure CN115908725B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a method and device for rendering a three-dimensional terrain map, and a medium. The method comprises obtaining a position and an elevation angle of an observation point, and a size of a rendering viewport; determining a visible area based on the position and the elevation angle of the observation point and the size of the rendering viewport; obtaining a tile texture of a target area from a two-dimensional vector map, so that the target area contains the visible area and is located within a range of a corresponding area of the rendering viewport on the two-dimensional vector map; and rendering a three-dimensional terrain map of the target area based on a texture of the target area and elevation data of the target area. The method can improve the rendering efficiency of the three-dimensional map, reduce the number of times and the amount of tile texture cutting, and reduce memory consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic map technology, and in particular to a method, apparatus, device, and medium for rendering three-dimensional topographic maps. Background Technology

[0002] A 3D topographic map is an electronic map that displays the actual geographical elevation. It can be applied to scenarios such as displaying outdoor sports routes, viewing drone flight paths, and previewing elevations. In practice, the rendering efficiency of 3D topographic maps has always been a key concern for those skilled in the art; therefore, improving the rendering efficiency of 3D maps is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0003] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and medium for rendering three-dimensional topographic maps.

[0004] A first aspect of this disclosure provides a method for rendering a three-dimensional topographic map. The method includes: acquiring the position and elevation angle of an observation point, and the size of a rendering viewport; determining a visible area based on the position and elevation angle of the observation point and the size of the rendering viewport, wherein the visible area refers to the field of view of the observation point that can be displayed on the rendering viewport; extracting tile textures of a target area from a two-dimensional vector map, wherein the target area includes the visible area and is located within the area corresponding to the rendering viewport on the two-dimensional vector map; and rendering a three-dimensional topographic map of the target area based on the texture and elevation data of the target area.

[0005] A second aspect of this disclosure provides a three-dimensional terrain map rendering apparatus, comprising:

[0006] The acquisition module is used to acquire the position and elevation angle of the observation point, as well as the size of the rendering viewport;

[0007] The determination module is used to determine the visible area based on the position and elevation angle of the observation point and the size of the rendering viewport. The visible area refers to the field of view of the observation point that can be displayed on the rendering viewport.

[0008] The capture module is used to capture the tile texture of a target area from a 2D vector map. The target area includes the visible area and is located within the area of ​​the rendering viewport on the 2D vector map.

[0009] The rendering module is used to render a 3D topographic map of the target area based on the texture and elevation data of the target area.

[0010] A third aspect of this disclosure provides a terminal device including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor can perform the method described in the first aspect.

[0011] A fourth aspect of this disclosure provides a computer program product stored in a storage medium, which, when run, can execute the method described in the first aspect.

[0012] A fifth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed, can perform the method described in the first aspect.

[0013] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0014] In this embodiment, the position and elevation angle of the observation point and the size of the rendering viewport are obtained. Based on these factors, the visible area is determined. Tile textures of the target area are extracted from a 2D vector map, ensuring that the target area includes the visible area and lies within the area corresponding to the rendering viewport on the 2D vector map. A 3D terrain map of the target area is then rendered based on its texture and elevation data. Because this embodiment only trims the visible area within the area of ​​the rendering viewport on the 2D vector map, rather than the entire area corresponding to the rendering viewport, it eliminates the need to trim every tile texture within the area corresponding to the rendering viewport. This reduces the number and frequency of tile texture trimming, decreases the memory consumption of tile texture caching, and reduces the number of texture rendering operations and workload, thereby improving rendering efficiency. Furthermore, in this embodiment of the invention, the actual field of view of the observation point is based on the part that can be displayed in the rendering viewport (i.e., the visible area) when the tile texture is extracted. By extracting the texture of a smaller area to include the visible area, and then fusing the texture and elevation data of that area, not only can the amount of rendering work be reduced, but the rendering effect of the three-dimensional terrain map can also be made more in line with the real perspective, thereby improving the user's sense of immersion. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0016] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of a rendering scene provided in an embodiment of this disclosure;

[0018] Figure 2 This is a flowchart of a three-dimensional terrain map rendering method provided in an embodiment of this disclosure;

[0019] Figure 3 This is a schematic diagram of an observation scenario provided in an embodiment of this disclosure;

[0020] Figure 4 This is a schematic diagram of a method for determining a visible area provided in an embodiment of this disclosure;

[0021] Figure 5 This is a schematic diagram of a method for determining the field of view provided in an embodiment of this disclosure;

[0022] Figure 6A This is a schematic diagram of the coordinate system of a two-dimensional vector map;

[0023] Figure 6B This is a schematic diagram of the coordinate system for rendering the viewport;

[0024] Figure 6C yes Figure 6B The coordinate system in the image is the coordinate system after translation;

[0025] Figure 7 This is a schematic diagram of a rendering viewport provided in an embodiment of this disclosure;

[0026] Figure 8 This is a schematic diagram of a three-dimensional terrain map rendering method provided in an embodiment of this disclosure;

[0027] Figure 9 This is a flowchart of another method for rendering a three-dimensional terrain map provided in this embodiment of the disclosure;

[0028] Figure 10 This is a schematic diagram of a method for determining a target region provided in an embodiment of this disclosure;

[0029] Figure 11 This is a schematic diagram of the structure of a three-dimensional terrain map rendering device provided in an embodiment of this disclosure;

[0030] Figure 12 This is a schematic diagram of the structure of a terminal device according to an embodiment of this disclosure. Detailed Implementation

[0031] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0032] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0033] To facilitate understanding of the solutions in the embodiments of this disclosure, some terms involved in the embodiments of this disclosure will first be explained.

[0034] Vector maps are vectorized data files created by scanning and reconstructing the real world to obtain map elements, and then vectorizing these map elements.

[0035] Elevation data refers to the elevation value of the terrain.

[0036] A tile is a region or block that is cut from a vector map into a certain size and format at a certain zoom level or scale. Each region or block can be understood as a tile.

[0037] Tile texture refers to the graphics or patterns contained on a tile.

[0038] A three-dimensional topographic map is a map format that allows you to view the actual geographical elevation.

[0039] The Open Graphics Library (OpenGL) is a cross-language, cross-platform application programming interface for rendering two-dimensional or three-dimensional vector graphics.

[0040] Frame Buffer Object (FBO) is used in OpenGL to render data onto the screen for display.

[0041] In traditional methods, 3D topographic maps can be generated directly by adding elevation data for each coordinate location to a 2D vector map. However, adding elevation data to each coordinate location leads to a surge in map data volume. For users, this typically requires downloading the map to their device, and the increased map data volume can strain the device's memory, significantly impacting user experience.

[0042] To address the problems of traditional methods, related technologies offer a scheme for generating 3D terrain maps. This scheme involves each tile having a fixed size. The size and location of the display screen determine the area corresponding to the screen in the 2D vector map (hereinafter referred to as the screen range), and the tiles contained within that screen range. When rendering the 3D terrain map, each tile within the screen range needs to be clipped. Then, based on the elevation data corresponding to that range and the texture on the clipped tiles, the 3D terrain map for that range is rendered. However, this scheme requires calculating information for all tiles within the screen range and using an FBO (Frame Buffer Object) to extract the texture of each tile within the screen range. This results in numerous frame buffering operations, slow rendering speed, and low efficiency.

[0043] To improve the rendering efficiency of 3D topographic maps, this disclosure provides a method for rendering 3D topographic maps. For example, Figure 1 This is a schematic diagram of a rendering scene provided in an embodiment of this disclosure, such as... Figure 1 As shown, in the method provided in this embodiment, the field of view of the observation point can be determined by the position and elevation angle of the observation point and the size of the rendering viewport. Figure 1 The portion of the dashed area contained in the leftmost sub-map that falls on the rendering viewport (hereinafter referred to as the visible area, i.e., the portion of the dashed area that is captured by the rendering viewport) is then cropped from the 2D vector map to form the target area. Figure 1 The tile texture (exemplarily represented by the bold black area in the second sub-figure from the left) ensures that the target area includes the visible area and its range lies within the area corresponding to the rendering viewport on the 2D vector map. Therefore, a 3D terrain map of the target area can be rendered based on the tile texture and elevation data of the target area. The method provided in this disclosure not only reduces the number and amount of tile texture extraction, improving rendering efficiency, but also makes the rendered 3D terrain map more realistic, enhancing the user's immersion.

[0044] certainly Figure 1 This is merely an illustrative example and not a sole limitation of this disclosure. For instance, in other embodiments, the target area may not be... Figure 1 It is not the shape distribution in the middle, but other shape distributions.

[0045] To better understand the solutions of the embodiments of this disclosure, the solutions of the embodiments of this disclosure will be described below in conjunction with exemplary embodiments.

[0046] Figure 2 This is a flowchart of a three-dimensional terrain map rendering method provided in this disclosure embodiment. This method can be executed, exemplarily, by a terminal device, such as a mobile phone, in-vehicle computer, tablet computer, wearable device, server, or other device with computing and data rendering capabilities. Figure 2 As shown, the method may include the following steps:

[0047] Step 201: Obtain the position and elevation angle of the observation point and the size of the rendering viewport.

[0048] In this embodiment of the disclosure, when observing from a certain location in a specific direction, this location can be referred to as the observation point.

[0049] The location of an observation point can be understood as a positioning location, such as the current location of the terminal device as collected by the positioning system on the terminal device. Alternatively, in other embodiments, the location of an observation point can also be understood as a user-specified location, such as a location selected by the user on a map through preset operations, or a location specified by entering coordinates or a name in a search area. In the embodiments of this disclosure, the location of the observation point may include longitude, latitude, and elevation.

[0050] The elevation angle of an observation point can be understood as the angle from which the observation point is viewed in a specific direction. For example, Figure 3 This is a schematic diagram of an observation scenario provided by an embodiment of this disclosure. Position A in the diagram can be understood as the observation position of the observation point, and angle α can be understood as the observation angle for observation in direction B, i.e., the elevation angle. In this embodiment, the magnitude and direction of the elevation angle can be determined based on the height and attitude of the terminal device; the method for determining this angle can be found in related technologies.

[0051] In one embodiment of this disclosure, the elevation angle of the observation point can be a preset default value. In another embodiment, the elevation angle of the observation point can be obtained by the user adjusting a default elevation angle value. For example, the user can change the observation angle by sliding or dragging on the display interface, and the target elevation angle value can be obtained by weighting the change with the default angle value. Alternatively, in yet another feasible embodiment, the user can set the elevation angle value in a setting area provided on the display interface, and then obtain the user-set elevation angle value from the setting area. Of course, the above methods are only exemplary and not the only methods. In fact, in other embodiments, the method of obtaining the elevation angle of the observation point can be specifically set according to the specific scenario, and is not limited to one or several specific methods.

[0052] In this embodiment of the disclosure, the rendering viewport can be understood as the display area of ​​the screen or the target rendering area. For ease of understanding, it can be exemplarily understood as the display area of ​​the screen in this embodiment of the disclosure. The size of the rendering viewport can be directly obtained from the terminal device.

[0053] Step 202: Based on the position and elevation angle of the observation point and the size of the rendering viewport, determine the visible area. The visible area refers to the field of view of the observation point that can be displayed on the rendering viewport.

[0054] In this embodiment of the disclosure, the field of view refers to the planar area obtained by observing the area at a certain elevation angle from the position of the observation point and performing Mercator projection processing on the observed area. The visible area can be understood as the part of the field of view of the observation point that falls on the rendering viewport.

[0055] There are various methods for determining the visible area in this embodiment of the disclosure. For ease of understanding, an exemplary determination method will be described below.

[0056] Example, Figure 4 This is a schematic diagram of a method for determining a visible area provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, in one embodiment, the method for determining the visible area may include the following steps:

[0057] Step 401: Determine the field of view of the observation point based on its location and elevation angle.

[0058] Example, Figure 5 This is a schematic diagram of a method for determining the field of view provided in an embodiment of this disclosure. Figure 5 In this diagram, "r" represents the Earth's radius, "h" represents the terrain elevation, "H" represents the height of the observation point relative to the terrain elevation, "b" represents the central angle, and ray L represents the line of sight directly from the observation point. The area represented by the arc R is the observed range of the observation point, which can be represented by 2π*(r+h)*b, where the symbol "*" indicates multiplication. Then, by applying Mercator projection to this range, the observed range can be converted into the field of view on a plane.

[0059] Step 402: Determine the area of ​​the rendering viewport on the two-dimensional vector map based at least on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport.

[0060] In some embodiments of this disclosure, the transformation relationship between the coordinate system of the two-dimensional vector map (hereinafter referred to as the first coordinate system) and the coordinate system of the rendering viewport (hereinafter referred to as the second coordinate system) can be determined based on the origin offset and the deflection angle between the first and second coordinate systems. For example, Figure 6A This is a schematic diagram of the coordinate system of a two-dimensional vector map, namely the first coordinate system. Figure 6BThis is a schematic diagram of the coordinate system of the rendering viewport, namely the second coordinate system. P(x,y) is any point in the second coordinate system. The offset of the origin O of the first coordinate system relative to the origin O' of the second coordinate system is (x1,y1), and the deflection angle of the first coordinate system relative to the second coordinate system is θ. The transformation relationship between the first and second coordinate systems can be as follows: First, based on the offset of the origin O of the first coordinate system relative to the origin O' of the second coordinate system, move the origin O' of the second coordinate system to the position of the origin O of the first coordinate system. At this point, the coordinates of point P become P(x+x1,y+y1). Figure 6C The coordinate system shown is translated. Based on this, and with the first coordinate system being deflected by θ relative to the second coordinate system, the second coordinate system is deflected by θ, and the coordinates of point P become: ((x+x1)*cos(θ)+(y+y1)sin(θ),(y+y1)*cos(θ)-(x+x1)sin(θ)). At this time, the coordinates of point P after transformation are the coordinates of point P in the first coordinate system, that is, the coordinate system of the two-dimensional vector map.

[0061] Based on the above conversion relationship, in one embodiment of this disclosure, the first coordinate range of the rendering viewport in the coordinate system of the rendering viewport can be converted into a second coordinate range in the coordinate system of the two-dimensional vector map according to the conversion relationship between the coordinate system of the rendering viewport and the coordinate system of the two-dimensional vector map. At this point, the second coordinate range can be directly determined as the area range of the rendering viewport on the two-dimensional vector map. Alternatively, the second coordinate range can be corrected according to a pre-set correction offset, and the corrected range can be determined as the area range of the rendering viewport on the two-dimensional vector map. For example, a correction amount for the horizontal coordinate and a correction amount for the vertical coordinate can be pre-set. After obtaining the second coordinate range, the horizontal and vertical coordinates of the second coordinate range can be corrected based on the correction amounts for the horizontal and vertical coordinates to obtain the corrected area. By correcting the second coordinate range, the impact of algorithm errors can be reduced, and the accuracy can be improved.

[0062] Alternatively, in another embodiment of this disclosure, the direct line-of-sight position of the observation point can be determined first based on the location and elevation angle of the observation point. This direct line-of-sight position corresponds to an actual geographic coordinate, and each point in the two-dimensional vector map also corresponds to an actual geographic coordinate. Therefore, the location of the direct line-of-sight position of the observation point in the two-dimensional vector map can be determined based on the geographic coordinates of the direct line-of-sight position, i.e., the direct line-of-sight position of the observation point in the two-dimensional vector map. See also Figures 6A-6CBased on the transformation relationship, the relative position of the direct line of sight on the rendering viewport can be obtained. Since the tiles surrounding each position in the 2D vector map are known, based on the information of the tiles surrounding the direct line of sight, the relative position of the direct line of sight on the rendering viewport, and the size of the rendering viewport, it is possible to determine how many tiles can be accommodated in each direction relative to the aforementioned relative position within the rendering viewport, and which tiles these tiles correspond to on the 2D vector map. Thus, the range of tiles contained within the rendering viewport on the 2D vector map is the range of the rendering viewport on the 2D vector map. For example, Figure 7 This is a schematic diagram of a rendering viewport provided in an embodiment of this disclosure. Figure 7 Let G be the relative position of the viewpoint's line of sight on the rendering viewport. Based on the position of G and the size of the rendering viewport, we can determine the spatial dimensions of G in the front, back, left, and right directions. Assuming each tile is a 4096*4096 square, dividing the spatial dimensions in each direction by 4096 gives the number of tiles in each direction. This is just an example and not the only possible solution. Furthermore, based on the relative position of each tile to G and the coordinates of G in the 2D vector map, we can obtain the coordinates of each tile in the 2D vector map. Therefore, based on the coordinates of all the tiles contained in the rendering viewport in the 2D vector map, we can determine the area of ​​the rendering viewport within the 2D vector map. Figure 7 This is for illustrative purposes only and is not the only valid approach.

[0063] By utilizing the relationship between the direct line of sight and the surrounding tiles, the tiles contained in the rendering viewport and the area of ​​the rendering viewport in the 2D vector map can be determined, which can improve the accuracy of area determination.

[0064] Step 403: Determine the visible area as the area where the field of view and the rendering viewport overlap on the two-dimensional vector map.

[0065] After obtaining the field of view of the observation point, the part of the field of view that falls within the area of ​​the rendering viewport on the two-dimensional vector map is the visible area.

[0066] In this embodiment, the field of view of the observation point is determined by the position and elevation angle of the observation point; the area of ​​the rendering viewport on the two-dimensional vector map is determined based on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport; the area where the field of view and the area of ​​the rendering viewport on the two-dimensional vector map overlap is determined as the visible area, which can ensure the accuracy of the visible area and improve the efficiency of the visible area determination.

[0067] It should be noted that Figure 4The method provided is only one way to determine the visible area, not all methods. For example, in other implementations, after determining the field of view of the observation point, the field of view of the observation point can also be transformed into the coordinate system of the rendering viewport according to the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport, so that the part of the field of view that falls in the rendering viewport is determined as the visible area.

[0068] Step 203: Extract the tile texture of the target area from the two-dimensional vector map. The target area includes the visible area and is located within the area of ​​the rendering viewport on the two-dimensional vector map.

[0069] In this embodiment of the disclosure, the target area can be an area of ​​arbitrary shape, which includes a visible area and is located within the area corresponding to the rendering viewport on the two-dimensional map.

[0070] The target region can be any region encompassing the visible area, arbitrarily determined based on the location and extent of the visible area, and its extent lies within the area corresponding to the rendering viewport on the 2D map. Alternatively, in some implementations, it can be a region determined based on preset rules. For example, the visible area itself can be considered part of the target region, while another part of the target region can be determined by the positional relationship between the tiles and the boundaries of the visible area. Specifically, if a tile located near the boundary of the visible area has one part inside the visible area and one part outside the visible area, then the part of the tile outside the visible area is also considered part of the target region. Of course, the above example is only one possible form of preset rules, not the only form. For example, in other implementations, only the visible area can be considered as the target region.

[0071] Step 204: Based on the texture and elevation data of the target area, render a three-dimensional terrain map of the target area.

[0072] The elevation data of the target area can be obtained from preset data sources, such as servers that provide map or navigation services, but is not limited to the servers listed here.

[0073] In one embodiment of this disclosure, a three-dimensional terrain map can be rendered using the texture and elevation data of the target area in a two-dimensional vector map coordinate system. At this time, the latitude and longitude coordinates of the three-dimensional terrain map are the coordinates of the two-dimensional vector map. Then, according to the transformation relationship between the coordinate system of the two-dimensional quality map and the coordinate system of the rendering viewport, the three-dimensional terrain map is transformed into the rendering viewport.

[0074] In another embodiment of this disclosure, the position of the texture of the target area on the rendering viewport and the correspondence between the elevation data of the target area and the position on the rendering viewport can be determined first based on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport. Then, a three-dimensional terrain map can be rendered in the rendering viewport based on the texture and elevation data after coordinate transformation.

[0075] In rendering 3D terrain maps based on texture and elevation data of the target area, methods such as... can be used. Figure 8 The method shown. Specifically, Figure 8 This is a schematic diagram of a three-dimensional terrain map rendering method provided in an embodiment of this disclosure. Figure 8 As shown, the target area can first be triangulated into multiple triangles. Then, based on the coordinates of each triangle and the corresponding elevation data, the elevation data is overlaid on the triangles to obtain terrain with elevation information. Finally, the texture on each triangle is rendered onto the corresponding location of the terrain to obtain a 3D terrain map.

[0076] In this embodiment, the position and elevation angle of the observation point and the size of the rendering viewport are obtained. Based on these factors, the visible area is determined. Tile textures of the target area are extracted from a 2D vector map, ensuring that the target area includes the visible area and lies within the area corresponding to the rendering viewport on the 2D vector map. A 3D terrain map of the target area is then rendered based on its texture and elevation data. Because this embodiment only trims the visible area within the area of ​​the rendering viewport on the 2D vector map, rather than the entire area corresponding to the rendering viewport, it eliminates the need to trim every tile texture within the area corresponding to the rendering viewport. This reduces the number and frequency of tile texture trimming, decreases the memory consumption of tile texture caching, and reduces the number of texture rendering operations and workload, thereby improving rendering efficiency. Furthermore, in this embodiment of the invention, the actual field of view of the observation point is based on the part that can be displayed in the rendering viewport (i.e., the visible area) when the tile texture is extracted. By extracting the texture of a smaller area to include the visible area, and then fusing the texture and elevation data of that area, not only can the amount of rendering work be reduced, but the rendering effect of the three-dimensional terrain map can also be made more in line with the real perspective, thereby improving the user's sense of immersion.

[0077] Figure 9 This is a flowchart of another method for rendering a three-dimensional terrain map provided in this disclosure, such as... Figure 9 As shown, the method includes:

[0078] Step 901: Obtain the position and elevation angle of the observation point and the size of the rendering viewport.

[0079] Step 902: Based on the position and elevation angle of the observation point and the size of the rendering viewport, determine the visible area. The visible area refers to the field of view of the observation point that can be displayed on the rendering viewport.

[0080] The execution methods of steps 901 and 902 can be found in the relevant parts of steps 201 and 202 in the above embodiments, and will not be repeated here.

[0081] Step 903: Based on the position of the visible area in the 2D vector map, extract multiple consecutive sub-regions from the tile texture of the 2D vector map, so that the area composed of multiple consecutive sub-regions includes the visible area and is located within the area corresponding to the rendering viewport on the 2D vector map.

[0082] Example, Figure 10 This is a schematic diagram of a method for determining a target region provided in an embodiment of this disclosure. Figure 10 In this context, the trapezoidal region can be understood as the visible area. During the determination of the target region, multiple consecutive sub-regions can be defined sequentially from the top or bottom boundary of the visible area to the other side, ensuring that the area formed by these sub-regions includes the visible area and is smaller than the rendering viewport. These sub-regions are then extracted from the tile texture of the 2D vector map. The areas of each sub-region can be the same or different. For example, in... Figure 10 The diagram shows cases where the areas of the sub-regions differ. Figure 10Starting from the top of the visible area, the length of the rectangle is defined by the bottom edge of the visible area at the top of the rendering viewport. A preset rectangle width, such as 4096 pixels, is used as the width of the rectangle, resulting in rectangular region A1. Further, the texture corresponding to region A1 can be extracted from a 2D vector map. Then, the portion of the long side of rectangular region A1 opposite the top of the rendering viewport, which is truncated by the two sloping sides of the trapezoidal visible area, is obtained. It is determined whether the two ends of this portion are located in the middle of the tile's edge length. If so, this portion is extended to both sides until its endpoints are at the tile's endpoints. The extended edge is then used as the long side, and the preset rectangle width is used as the rectangle to obtain the second rectangular region A2. This process continues until the bottom of the rendering viewport is reached. It should be noted that if the width reaching the bottom of the rendering viewport is less than the preset rectangle width when determining the last rectangular region, a feasible approach is to still determine the last rectangular region according to the preset rectangle width, and use the area formed by the last rectangular region and the other determined regions as the target region. Another feasible approach is to use the remaining width reaching the bottom of the rendering viewport as the width of the rectangle to determine the last rectangular area, and then use the area formed by the last rectangular area and the already determined rectangular area as the target area.

[0083] exist Figure 10 In this model, the area of ​​each sub-region decreases sequentially from the top boundary to the bottom boundary of the visible area. By setting the area to decrease sequentially, the amount of rendering data can be reduced and rendering efficiency can be improved.

[0084] Step 904: Based on the texture and elevation data of the target area, render a three-dimensional terrain map of the target area.

[0085] The implementation method of step 904 can be found in the part related to step 204 in the above embodiments, and will not be repeated here.

[0086] In this embodiment, based on the position of the visible area in a 2D vector map, multiple consecutive sub-regions are extracted from the tile texture of the 2D vector map. This ensures that the area formed by these multiple consecutive sub-regions includes the visible area and is smaller than the area corresponding to the rendering viewport on the 2D vector map. This reduces the number and frequency of tile extraction while maintaining the integrity of the tiles within the visible area. Furthermore, when the user makes minor adjustments to the viewpoint, it is not necessary to extract large areas of tiles again; the current rendering result is sufficient to meet the user's needs for small-scale adjustments.

[0087] Figure 11 This is a schematic diagram of a three-dimensional terrain map rendering device provided in an embodiment of this disclosure. This device can be exemplarily understood as the terminal device or some functional modules within the terminal device in the above embodiments. For example... Figure 11 As shown, the rendering device 1100 includes:

[0088] The acquisition module 1101 is used to acquire the position and elevation angle of the observation point and the size of the rendering viewport;

[0089] The determination module 1102 is used to determine the visible area based on the position and elevation angle of the observation point and the size of the rendering viewport. The visible area refers to the field of view of the observation point that can be displayed on the rendering viewport.

[0090] The cropping module 1103 is used to crop the tile texture of a target area from a two-dimensional vector map. The target area includes the visible area and is located within the area range corresponding to the rendering viewport on the two-dimensional vector map.

[0091] The rendering module 1104 is used to render a three-dimensional terrain map of the target area based on the texture and elevation data of the target area.

[0092] In one implementation, the determining module 1102 includes:

[0093] The first determining submodule is used to determine the field of view of the observation point based on the position and elevation angle of the observation point;

[0094] The second determining submodule is used to determine the area range of the rendering viewport on the two-dimensional vector map based at least on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport.

[0095] The third determining submodule is used to determine the area where the field of view and the area range overlap as the visible area.

[0096] In one implementation, the second determining submodule is specifically used for:

[0097] Based on the location and elevation angle of the observation point, determine the direct line-of-sight position of the observation point in the two-dimensional vector map;

[0098] Based on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport, the relative position of the line of sight on the rendering viewport is determined.

[0099] Based on information about the tiles surrounding the direct line of sight, the relative position of the direct line of sight on the rendering viewport, and the size of the rendering viewport, the tiles contained in the rendering viewport are determined.

[0100] Based on the tiles contained in the rendering viewport, the area range of the rendering viewport on the two-dimensional vector map is determined.

[0101] In one implementation, the second determining submodule is specifically used for:

[0102] Based on the transformation relationship between the coordinate system of the rendering viewport and the coordinate system of the two-dimensional vector map, the first coordinate range of the rendering viewport in the coordinate system of the rendering viewport is transformed into the second coordinate range in the coordinate system of the two-dimensional vector map.

[0103] Based on the second coordinate range, the area range of the rendering viewport on the two-dimensional vector map is determined.

[0104] In one embodiment, the cropping module 1103 is used to crop multiple consecutive sub-regions from the tile texture of the two-dimensional vector map based on the position of the visible region in the two-dimensional vector map, such that the region composed of the multiple consecutive sub-regions includes the visible region and is located within the area range corresponding to the rendering viewport on the two-dimensional vector map.

[0105] In one implementation, the areas of the plurality of consecutive sub-regions decrease sequentially.

[0106] In one implementation, the rendering module 1104 is used for:

[0107] Based on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport, the position of the texture of the target area on the rendering viewport and the correspondence between the elevation data of the target area and its position on the rendering viewport are determined.

[0108] Based on the position of the texture of the target region on the rendering viewport and the correspondence between the elevation data of the target region and its position on the rendering viewport, a three-dimensional terrain map of the target region is rendered in the rendering viewport.

[0109] The apparatus provided in this disclosure is capable of performing... Figures 2-10 The methods in any of the embodiments are similar in execution and beneficial effects, and will not be described again here.

[0110] This disclosure also provides a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor can perform the above-described... Figures 2-10 The methods in any of the embodiments are similar in execution and beneficial effects, and will not be described again here.

[0111] Example, Figure 12 This is a schematic diagram of the structure of a terminal device according to an embodiment of this disclosure. See below for details. Figure 12The diagram illustrates a structural schematic suitable for implementing the terminal device 1400 in the embodiments of this disclosure. The terminal device 1400 in the embodiments of this disclosure may include, but is not limited to, devices with computing and data rendering capabilities such as laptops, tablets, mobile phones, in-vehicle computers, servers, and wearable devices. Figure 12 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0112] like Figure 12 As shown, the terminal device 1400 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage device 1408 into a random access memory (RAM) 1403. The RAM 1403 also stores various programs and data required for the operation of the terminal device 1400. The processing unit 1401, ROM 1402, and RAM 1403 are interconnected via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0113] Typically, the following devices can be connected to I / O interface 1405: input devices 1406 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1407 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1408 including, for example, magnetic tape, hard disk, etc.; and communication devices 1409. Communication device 1409 allows terminal device 1400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 A terminal device 1400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0114] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1409, or installed from storage device 1408, or installed from ROM 1402. When the computer program is executed by processing device 1401, it performs the functions defined in the methods of embodiments of this disclosure.

[0115] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0116] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.

[0117] The aforementioned computer-readable medium carries one or more programs, which, when executed by a processing device, cause the processing device to: acquire the position and elevation angle of an observation point, and the size of a rendering viewport; determine a visible area based on the position and elevation angle of the observation point and the size of the rendering viewport, wherein the visible area refers to the field of view of the observation point that can be displayed on the rendering viewport; extract tile textures of a target area from a two-dimensional vector map, wherein the target area includes the visible area and is located within the area corresponding to the rendering viewport on the two-dimensional vector map; and render a three-dimensional terrain map of the target area based on the texture and elevation data of the target area.

[0118] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0120] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0121] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0123] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can perform the above-described functions. Figures 2-10 The methods in any of the embodiments are similar in execution and beneficial effects, and will not be described again here.

[0124] This disclosure also provides a computer program product, which is stored in a storage medium. When the program product is run, it can achieve... Figures 2-10 The methods in any of the embodiments are similar in execution and beneficial effects, and will not be described again here.

[0125] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0126] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for rendering a three-dimensional terrain map, wherein, include: Obtain the position and elevation angle of the observation point, as well as the size of the rendering viewport; Based on the position and elevation angle of the observation point and the size of the rendering viewport, the visible area is determined, whereby the visible area refers to the field of view of the observation point that can be displayed on the rendering viewport. Based on the position of the visible area in the two-dimensional vector map, multiple consecutive sub-regions are extracted from the tile texture of the two-dimensional vector map, such that the target area composed of the multiple consecutive sub-regions includes the visible area and is located within the area corresponding to the rendering viewport on the two-dimensional vector map, and the areas of the multiple consecutive sub-regions decrease sequentially. Based on the texture and elevation data of the target area, a three-dimensional terrain map of the target area is rendered.

2. The method of claim 1, wherein, The determination of the visible area based on the position and elevation angle of the observation point and the size of the rendering viewport includes: Based on the location and elevation angle of the observation point, the field of view of the observation point is determined; The area of ​​the rendering viewport on the two-dimensional vector map is determined based on at least the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport. The area where the field of view and the region overlap is defined as the visible region.

3. The method of claim 2, wherein, The determination of the region of the rendering viewport on the two-dimensional vector map based on the transformation relationship between at least the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport includes: Based on the location and elevation angle of the observation point, determine the direct line-of-sight position of the observation point in the two-dimensional vector map; Based on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport, the relative position of the line of sight on the rendering viewport is determined. Based on information about the tiles surrounding the direct line of sight, the relative position of the direct line of sight on the rendering viewport, and the size of the rendering viewport, the tiles contained in the rendering viewport are determined. Based on the tiles contained in the rendering viewport, the area range of the rendering viewport on the two-dimensional vector map is determined.

4. The method of claim 2, wherein, The determination of the region of the rendering viewport on the two-dimensional vector map based on the transformation relationship between at least the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport includes: Based on the transformation relationship between the coordinate system of the rendering viewport and the coordinate system of the two-dimensional vector map, the first coordinate range of the rendering viewport in the coordinate system of the rendering viewport is transformed into the second coordinate range in the coordinate system of the two-dimensional vector map. Based on the second coordinate range, the area range of the rendering viewport on the two-dimensional vector map is determined.

5. The method of claim 1, wherein, The process of rendering a 3D terrain map of the target area based on the texture and elevation data of the target area includes: Based on the transformation relationship between the coordinate system of the two-dimensional vector map and the coordinate system of the rendering viewport, the position of the texture of the target area on the rendering viewport and the correspondence between the elevation data of the target area and its position on the rendering viewport are determined. Based on the position of the texture of the target region on the rendering viewport and the correspondence between the elevation data of the target region and its position on the rendering viewport, a three-dimensional terrain map of the target region is rendered in the rendering viewport.

6. A rendering apparatus of a three-dimensional terrain map, wherein, include: The acquisition module is used to acquire the position and elevation angle of the observation point, as well as the size of the rendering viewport; The determination module is used to determine the visible area based on the position and elevation angle of the observation point and the size of the rendering viewport. The visible area refers to the field of view of the observation point that can be displayed on the rendering viewport. The cropping module is used to crop multiple consecutive sub-regions from the tile texture of the two-dimensional vector map based on the position of the visible region in the two-dimensional vector map, such that the target region composed of the multiple consecutive sub-regions includes the visible region and is located within the area corresponding to the rendering viewport on the two-dimensional vector map, and the areas of the multiple consecutive sub-regions decrease sequentially. The rendering module is used to render a three-dimensional terrain map of the target area based on the texture and elevation data of the target area.

7. A terminal device, wherein, It includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the method as described in any one of claims 1-5.

8. A computer-readable storage medium storing a computer program that, when executed, performs the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Generation method and generation device of three-dimensional map

    CN105740256A

  • Terrestrial space scene simulation method and system based on mobile platform

    CN106296818A