Method, device, computer device and medium for vector slice flat mapping

By utilizing a quadtree structure and a mipmap-based texture size reduction method in massive city-level vector data, vector slices are dynamically loaded and rendered, solving the problems of real-time rendering performance and dynamic style support, and realizing an efficient vector data ground-mount model.

CN122473293APending Publication Date: 2026-07-28GLODON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GLODON CO LTD
Filing Date
2025-01-24
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously meet the requirements of real-time rendering performance and dynamic style support in the context of massive vector data at the city level.

Method used

By determining the set of vector slices within the current field of view, a texture image is created and applied to the ground plane model. The vector slices are dynamically loaded and rendered using a quadtree structure. Dynamic style support is achieved by combining the mipmap with the texture size decreasing and the viewport size for drawing.

Benefits of technology

In city-level massive vector data, it achieves improved real-time rendering performance and supports dynamic styles, which is suitable for the ground-based model requirements of city-level massive vector data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122473293A_ABST
    Figure CN122473293A_ABST
Patent Text Reader

Abstract

The application provides a method and device for vector slice ground-pasting model, computer equipment and medium. The method comprises the following steps: determining a vector slice set in a current field of view, wherein the vector slice set comprises a plurality of vector slices in different zoom levels and different layers; creating a texture corresponding to each zoom level; traversing each layer of the vector slice set, determining the vector slice located in the layer and the viewport size of the vector slice, and drawing the vector slice on the texture corresponding to the zoom level according to the viewport size to obtain a texture image corresponding to each zoom level; and pasting the texture image on a ground-pasting model. Through the application, the real-time rendering performance and dynamic style support can be simultaneously considered when the vector data is pasted on the ground-pasting model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics processing technology, and in particular to a method, apparatus, computer device, and medium for vector slice modeling. Background Technology

[0002] In smart city construction, navigation and mapping applications, and virtual reality (VR) and augmented reality (AR) applications, vector data mapping technology is used to map two-dimensional vector data onto three-dimensional terrain or model surfaces, thereby enhancing the realism and visualization of the data. However, with increasing application complexity, especially in the need for large-scale vector data processing at the city level, efficiently implementing vector data mapping technology has become a key technical challenge.

[0003] In response, the inventors discovered that in a prior art, a spatial partitioning algorithm is used to divide vector data into multiple sub-regions based on geographical scope. The vector data within each sub-region forms vector slices, and ground-fitting models are achieved by directly drawing these vector slices. However, this method is only suitable for small-scale scenarios. For example, it can meet the requirements for ground-fitting models when rendering GeoJson layers with Cesium, but it cannot meet the performance requirements for real-time rendering in scenarios with massive amounts of vector data at the city level.

[0004] Another existing technology divides vector data within a geographic area into multiple fixed-size raster blocks through grid partitioning, converting the vector data into raster tiles, and then loading these raster tiles as needed to achieve ground-based modeling. However, since raster tiles are bound to fixed styles, they need to be re-sliced ​​once the style changes, thus not supporting dynamic rendering and making it difficult to meet the dynamic style effect requirements of complex vector data.

[0005] Therefore, when implementing vector data-based ground-mount models, how to simultaneously ensure real-time rendering performance and support for dynamic styles has become a pressing technical problem in this field. Summary of the Invention

[0006] The purpose of this invention is to provide a method, apparatus, computer device, and medium for vector slice-based ground-mount modeling, in order to solve the technical problems in the prior art.

[0007] On the one hand, in order to achieve the above objectives, the present invention provides a method for vector slices to be applied to a ground-mounted model.

[0008] The method for applying vector slices to a ground plane model includes: determining a set of vector slices within the current field of view, wherein the set of vector slices includes multiple vector slices at different zoom levels and on different layers; creating a texture for each zoom level; traversing each layer of the set of vector slices, determining the vector slices located on the layer and the viewport size of the vector slices, and drawing the vector slices onto the texture corresponding to the zoom level according to the viewport size, thereby obtaining a texture image for each zoom level; and applying the texture image to the ground plane model.

[0009] Further, the steps for determining the set of vector slices within the current field of view include: Step S1: Constructing a quadtree based on the scaling level of the vector slices and the spatial relationship between the vector slices, wherein the vector slice with a scaling level of 0 is used as the root node of the quadtree; Step S2: Creating a stack and placing the root node of the quadtree into the stack; Step S3: Determining whether the stack is empty, wherein if the stack is empty, proceeding to step S4, and if the stack is not empty, proceeding to step S5; Step S4: Outputting the set of vector slices; Step S5: Obtaining... The current top element of the stack; Step S6: Determine the visibility of the top element. If the top element is not visible, return to step S3. If the top element is visible, proceed to step S7. Step S7: Determine whether the top element needs to be subdivided. If the top element does not need to be subdivided, proceed to step S8. If the top element needs to be subdivided, proceed to step S9. Step S8: Write the top element into the vector slice set and return to step S3. Step S9: Push the quadtree child nodes of the top element onto the stack and return to step S3.

[0010] Furthermore, the step of determining the set of vector tiles within the current field of view also includes: obtaining the terrain height within the current field of view, wherein the terrain height data includes the maximum height, minimum height, and center height within the current field of view, and updating the camera frustum based on the terrain height; the step of determining the visibility of the top element of the stack includes: calculating the AABB of the top element of the stack; and determining whether the top element of the stack is visible by intersecting the AABB of the top element of the stack with the frustum.

[0011] Further, the step of determining whether the top element of the stack needs to be subdivided includes: determining whether the top element of the stack has reached the current scaling level; when the top element of the stack has reached the current scaling level, determining that the top element of the stack does not need to be subdivided; when the top element of the stack has not reached the current scaling level, determining whether the distance between the top element of the stack and the camera is less than a subdivision threshold; when the distance between the top element of the stack and the camera is greater than or equal to the subdivision threshold, determining that the top element of the stack does not need to be subdivided; when the distance between the top element of the stack and the camera is less than the subdivision threshold, determining that the top element of the stack needs to be subdivided.

[0012] Further, the step of calculating the AABB of the top element of the stack includes: calculating the geographical range of the top element of the stack based on its index; and calculating the AABB of the top element of the stack based on its geographical range.

[0013] Furthermore, when creating a texture for each scaling level, the texture size for each scaling level decreases using a mipmap method, wherein the lower the scaling level, the smaller the texture size.

[0014] Further, the step of determining the viewport size of the vector slice includes: calculating the geographic extent of the vector slice; merging the geographic extents of vector slices belonging to the same scaling level to obtain a merged extent corresponding to the scaling level; normalizing the geographic extent of the vector slice according to the merged extent corresponding to the scaling level; mapping the normalized geographic extent of the vector slice to the texture corresponding to the scaling level to obtain the texture size of the vector slice; and obtaining the viewport size of the vector slice according to the texture size of the vector slice.

[0015] Further, applying the texture image to the ground-decal model includes: clearing the color buffer, depth buffer, and stencil buffer; rendering the texture image onto the ground or model surface; setting the color buffer and depth buffer to read-only; enabling depth testing, rendering the front of the shadow body, and when the depth test is successful, setting the value of the stencil buffer +1; rendering the back of the shadow body, and when the depth test is successful, setting the value of the stencil buffer -1; for pixels whose stencil buffer value is not equal to 0, outputting vector slice texture sampling results; for pixels whose stencil buffer value is equal to 0, maintaining the rendering effect; and outputting the texture image of the ground-decal model.

[0016] On the other hand, in order to achieve the above objectives, the present invention provides a device for applying vector slices to a ground-mounted model.

[0017] The device for creating a vector slice model includes: a determining module for determining a set of vector slices within the current field of view, wherein the set of vector slices includes multiple vector slices at different zoom levels and on different layers; a creating module for creating a texture for each zoom level; a first processing module for traversing each layer of the vector slice set, determining the vector slices located on the layer and the viewport size of the vector slices, and drawing the vector slices onto the texture corresponding to the zoom level according to the viewport size, thereby obtaining a texture image corresponding to each zoom level; and a second processing module for applying the texture image to the model.

[0018] To achieve the above objectives, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0019] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method.

[0020] The method, apparatus, computer device, and medium for applying vector slices to a ground-mount model provided by this invention first determine a set of vector slices within the current field of view. This set of vector slices includes multiple vector slices at different zoom levels and on different layers. Then, a texture is created for each zoom level. Next, each layer of the vector slice set is traversed to determine the vector slices located on the layer and their viewport sizes. The vector slices are then drawn onto the texture corresponding to their respective zoom levels according to the viewport sizes, resulting in a texture image for each zoom level. Finally, the texture image is used to apply the ground-mount model. This invention addresses two key issues. First, the rendering results of vector slices are converted into texture images, serving as input for subsequent rendering. This shifts complex vector processing to the texture generation stage, reducing real-time rendering pressure. Furthermore, the texture images organize vector slices by scaling level, allowing independent data management at each scaling level. This ensures that simplified data is loaded at lower levels (far view) and detailed data is loaded at higher levels (near view), reducing loading and rendering overhead. Additionally, within the current field of view, vector slices are rendered to textures based on the viewport size of each slice, further improving real-time performance. Second, the texture images are dynamically generated from vector slices, rather than being pre-rendered raster slices with fixed styles. This allows for dynamic adjustments to the rendering results based on real-time style requirements (such as color, transparency, linewidth variations, etc.). Since texture image rendering is an independent process for each layer of vector slices, different style rules can be applied to different layers during adjustments, allowing for flexible adjustments to the texture image generation process. In summary, this invention achieves a balance between real-time rendering and dynamic style support, making it particularly suitable for the needs of ground-based models with massive amounts of city-level vector data. Attached Figure Description

[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart of a method for applying vector slices to a ground-mounted model according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of the vector slice scheduling stage in the method for creating a vector slice-based ground-mount model provided in Embodiment 2 of the present invention; Figure 3 This is a flowchart of the vector data drawing stage in the method for creating a vector slice model according to Embodiment 2 of the present invention; Figure 4 This is a block diagram of the device for creating a vector slice ground-mount model according to Embodiment 3 of the present invention; Figure 5 This is a hardware structure diagram of a computer device provided in Embodiment 4 of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0023] Example 1 This invention provides a method for creating vector slice-based ground-map models. This method adds a new rendering pass to the vector data when implementing ground-map models. First, the vector data is drawn onto a texture to obtain a texture image, and then the texture image is rendered. In other words, a dedicated drawing logic for vector data is added, thus simultaneously ensuring real-time rendering performance and dynamic style support. Specifically, Figure 1 The flowchart is a method for applying vector slices to a ground-mount model according to Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the method for vector slices to be applied to the ground model provided in this embodiment includes the following steps S101 to S104.

[0024] Step S101: Determine the set of vector slices within the current field of view.

[0025] The vector slice set includes multiple vector slices at different scaling levels and on different layers.

[0026] This step identifies the vector tiles that need to be loaded and processed within the current field of view, reducing unnecessary data loading and thus improving rendering efficiency. Specifically, the vector data is divided into multiple sub-regions according to geographical extent using a spatial partitioning algorithm. Each vector tile contains vector objects and their attribute information within that region. Vector tiles can be stored in formats such as GeoJson, TopoJson, and MapBox Vector Tile (MVT).

[0027] In this step, each vector tile corresponds to a portion of the geographic area. It determines which vector tiles are within the current field of view and defines these as a set of vector tiles, serving as the processing target for the current frame. Based on view distance and zoom level logic, the set of vector tiles to be loaded comes from vector tiles at multiple zoom levels. For near views, higher-level (larger zoom level) vector tiles are loaded to display more detail; for distant views, lower-level (smaller zoom level) vector tiles are loaded to cover a larger geographic area. Simultaneously, all vector tiles corresponding to each level are considered as vector tiles belonging to that level. Vector tiles belonging to the same level can originate from one layer or multiple layers; only the row and column numbers of the vector tiles need to be recorded to support subsequent rendering.

[0028] Step S102: Create a texture for each scaling level.

[0029] Specifically, this step creates a texture for each scaling level. The texture size can be determined based on the number of vector slices and resolution requirements of the scaling level. Optionally, when creating textures, the texture size can be a power of 2 (e.g., 256×256, 512×512) to improve rendering efficiency. When assigning textures to scaling levels, lower-resolution textures are assigned to lower levels (far view) to display large areas of low-precision vector slices, while higher-resolution textures are assigned to higher levels (near view) to display close-up details.

[0030] Step S103: Traverse each layer of the vector slice set, determine the vector slice located in the layer and the viewport size of the vector slice, and draw the vector slice onto the texture corresponding to the scaling level according to the viewport size to obtain the texture image corresponding to each scaling level.

[0031] This step involves drawing the data of each vector slice onto the texture corresponding to its scaling level, generating a complete texture image that serves as input for subsequent rendering and provides data support for rendering.

[0032] Specifically, in this step, the layers are traversed, and for each layer, its vector slices are determined. Each vector slice is then processed individually, and each slice is drawn onto its corresponding texture to avoid data confusion. Optionally, when drawing vector slices, their drawing range in the texture, i.e., the viewport size, is calculated based on their position and size within the merged vector slice area. Within the calculated viewport size, the vector slice data is drawn as texture onto the texture corresponding to its scaling level. Finally, vector slices at the same scaling level are drawn layer by layer onto their corresponding textures, generating a complete texture image for each scaling level that contains data from all layers.

[0033] Step S104: Apply the texture image to the model.

[0034] This step involves applying the generated texture image to the terrain (ground-based) or 3D model (model-based) according to the scene requirements.

[0035] Specifically, texture images can be likened to shadows, thus achieving the effect of being applied to the ground and the model. When applying textures to the ground, a shadow volume rendering pass is inserted after the terrain rendering is complete. Similarly, when applying textures to the model, a pass can be inserted after the model rendering is complete. Whether a corresponding rendering pass is needed can be determined in the algorithm flow.

[0036] In the method of applying vector slices to a ground map model provided in this embodiment, the first step is to determine the set of vector slices within the current field of view. This set of vector slices includes multiple vector slices at different zoom levels and on different layers. Then, a texture is created for each zoom level. Next, each layer of the vector slice set is traversed to determine the vector slices located on the layer and the viewport size of the vector slices. The vector slices are then drawn onto the texture corresponding to their respective zoom level according to the viewport size, resulting in a texture image for each zoom level. Finally, the texture image is used to apply the ground map model. The vector tile-based ground-tile modeling method provided in this embodiment has two advantages. First, the rendering results of vector tiles are converted into texture images, which serve as input for subsequent rendering. This shifts the complex vector data processing to the texture generation stage, reducing real-time rendering pressure. Simultaneously, the texture images organize vector tiles by scaling level, allowing independent management of data at each scaling level. This ensures that only simplified data is loaded at lower levels (far view) and detailed data is loaded at higher levels (near view), helping to reduce loading and rendering overhead. Furthermore, within the current field of view, vector tiles are drawn to textures according to the viewport size of each vector tile, further improving real-time performance. Second, the texture images are dynamically generated from vector tiles, rather than pre-rendered raster tiles with fixed styles. Therefore, it supports dynamic adjustment of the rendering results based on real-time style requirements (such as color, transparency, line width changes, etc.). The rendering of texture images is an independent process for each layer of vector tiles, allowing for the application of different style rules and the setting of different dynamic styles for different layers, enabling flexible adjustment of the texture image generation process. Considering both aspects, this embodiment achieves a balance between real-time rendering and dynamic style support, making it particularly suitable for the needs of ground-tile models with massive city-level vector data.

[0037] Optionally, in one embodiment, the specific steps for determining the set of vector slices within the current field of view in step S101 include: Step S1: Construct a quadtree based on the scaling level of the vector slices and the spatial relationship between the vector slices.

[0038] Specifically, a quadtree is a hierarchical tree structure. Each level of the quadtree corresponds to the zoom level of a vector slice. The vector slice with a zoom level of 0 serves as the root node of the quadtree. As the number of levels in the quadtree increases, the zoom level of the vector slices also increases. The spatial relationships between vector slices define the parent-child relationships of the quadtree. Through hierarchy and spatial relationships, the quadtree organizes vector slices into an efficient tree structure for dynamic loading and rendering optimization.

[0039] Step S2: Create a stack and push the root node of the quadtree onto the stack.

[0040] After creating the stack, the root node of the quadtree is pushed onto the stack during the stack initialization phase, providing an entry point for subsequent recursive subdivision.

[0041] Step S3: Determine if the stack is empty. If the stack is empty, proceed to step S4; if the stack is not empty, proceed to step S5.

[0042] Step S4: Output a set of vector slices.

[0043] Step S5: Get the top element of the current stack.

[0044] In step S3, it is determined whether the stack is empty. If it is empty, it indicates that the traversal and processing of all vector slices have been completed. At this time, step S4 is executed to output the vector slice set. In subsequent steps, when a vector slice is determined to be within the current field of view, it is added to the vector slice set. Therefore, the vector slice set output when the stack is empty is the complete set of vector slices within the current field of view.

[0045] If it is not empty, proceed from step S5, popping the top element from the stack each time, that is, the vector slice node located at the top of the current stack, for subsequent processing.

[0046] Step S6: Determine the visibility of the top element of the stack.

[0047] When the top element of the stack is not visible, return to step S3; when the top element of the stack is visible, execute step S7.

[0048] During rendering, only vector slices within the current field of view are rendered. Vector slices outside the current field of view do not need to be rendered and can be discarded, thereby reducing unnecessary computation and memory overhead. Therefore, in step S6, the visibility of the obtained top element of the stack is first determined. If it is not visible, the top element of the stack is discarded, and the process returns to step S3 above to continue determining whether the stack is empty. If it is visible, the top element of the stack needs to undergo the following steps for further processing.

[0049] Step S7: Determine whether the top element of the stack needs to be subdivided.

[0050] When the top element of the stack does not need to be subdivided, step S8 is executed; when the top element of the stack needs to be subdivided, step S9 is executed.

[0051] By determining whether the top element of the stack needs subdivision, the resolution of vector slices can be dynamically controlled, thereby balancing rendering accuracy and performance. Optionally, when determining whether the top element of the stack needs subdivision, first check if the top element has already reached the highest subdivision level. If it has, no further subdivision is needed. If not, calculate the distance from the top element of the stack to the camera. If the distance is close, subdivision is needed to display more details; if the distance is far, no subdivision is needed, and the current level is maintained.

[0052] Step S8: Write the top element of the stack into the vector slice collection.

[0053] If step S7 determines that no further subdivision is needed, then the top element of the stack is written into the vector slice set, and the process returns to step S3 to continue determining whether the stack is empty.

[0054] Step S9: Push the quadtree child nodes of the top element of the stack onto the stack.

[0055] If step S7 determines that further subdivision is needed, push the quadtree child node of the top element onto the stack, return to step S3, and continue to determine whether the stack is empty.

[0056] The vector tile-based model provided in this embodiment uses a quadtree data structure to hierarchically organize vector tiles at different scaling levels, giving the vector data a clear spatial relationship. Starting with the vector tile at scaling level 0 as the root node, it is progressively decomposed into finer child nodes, ensuring the clarity and ease of operation of the data structure. This improves the storage and query efficiency of large-scale vector tile data. The visibility and subdivision requirements of vector tiles are dynamically determined based on the field of view, ensuring visual clarity and detail display. Simultaneously, rendering performance is significantly optimized, reducing the loading and processing overhead of high-resolution data and adapting to dynamic changes in camera perspective. A stack mechanism is used to traverse the quadtree layer by layer, and vector tiles outside the field of view are removed based on visibility judgment, skipping invisible vector tiles directly to avoid loading and processing data outside the view frustum. When a vector tile needs subdivision, its child nodes are dynamically pushed onto the stack, and the visibility and subdivision requirements of each child node are further judged, expanding the quadtree branches layer by layer until all vector tiles requiring rendering are determined, avoiding the need to expand the entire quadtree at once and improving traversal efficiency. Vector tiles that meet the visibility requirements and do not require further subdivision are written into the vector tile set. The final output tile set contains all vector tiles that need to be loaded and rendered within the current field of view, ensuring data integrity, guaranteeing rendering accuracy, and avoiding omissions or redundant loading of tile data. This provides efficient and accurate data support for subsequent texture image generation and rendering. When the field of view changes, i.e., according to the dynamic changes of the camera (such as movement, scaling, and rotation), the logic in steps S1 to S9 quickly determines which vector tiles need to be rendered and updates the vector tile set within the view frustum in real time. This provides a smooth user experience for dynamic scenes (such as GIS, virtual reality, real-time navigation, etc.) and ensures that the correct vector tile set is always rendered when the view changes.

[0057] Optionally, in one embodiment, the step of determining the set of vector tiles within the current field of view further includes: obtaining the terrain height within the current field of view, wherein the terrain height data includes the maximum height, minimum height, and center height within the current field of view, and updating the camera frustum based on the terrain height; the step of determining the visibility of the top element of the stack includes: calculating the AABB of the top element of the stack; and determining whether the top element of the stack is visible by intersecting the AABB of the top element with the frustum.

[0058] Specifically, in step S6 above, when determining the visibility of the top element of the stack (the vector slice located at the top of the current stack), the intersection of its AABB and the view frustum is used. Here, AABB (Axis-Aligned Bounding Box) is a geometric structure used to represent the boundary range of an object in three-dimensional space. The AABB of a vector slice is a three-dimensional representation of its spatial range. The range in the X direction is determined by the minimum and maximum longitude of the vector slice, the range in the Y direction is determined by the minimum and maximum latitude of the vector slice, and the range in the Z direction is irrelevant to the visibility determination and does not require precise data. The current field of view is the spatial area that the camera can observe, referring to the part of the scene that needs to be rendered in the current frame. This spatial area is defined by the camera's view frustum, and the boundary of the view frustum determines the spatial area of ​​the field of view. Objects within the current field of view are all located within the view frustum.

[0059] To achieve the judgment in step S6 above, the maximum height, minimum height, and center height within the current field of view are first obtained. The maximum height is the highest point within the field of view, used to determine the possible upper limit of the visible area. The minimum height is the lowest point within the field of view, used to determine the possible lower limit of the visible area. The center height can be the average height of the field of view, used to adjust the center position of the camera's frustum, improving judgment accuracy. Then, based on the obtained terrain height information, the camera's frustum is adjusted every frame.

[0060] When further judging the visibility of the vector slice, the geometric intersection algorithm between the vector slice AABB and the camera's view frustum is used. If the AABB is completely outside the view frustum, the vector slice is not visible and is discarded; if the AABB is completely or partially inside the view frustum, the vector slice is visible and is retained.

[0061] The vector tile-based ground-mounting model method provided in this embodiment dynamically updates the camera's view frustum using terrain height data within the field of view. This ensures that the upper and lower boundaries of the view frustum closely match the terrain range, avoiding misjudgments caused by a fixed view frustum range. Intersection of the AABB with the view frustum accurately determines whether each vector tile is within the current view frustum range, reducing false positives. Vector tiles outside the view frustum are directly culled, avoiding the loading and processing of this data and saving computational and memory resources. For different terrain conditions (such as flat and complex terrain), the camera's view frustum range is dynamically adjusted to improve culling efficiency. Especially for scenes with large terrain elevation differences, the culling logic is adjusted using terrain height data to ensure the integrity of vector tiles within the field of view. The AABB, combined with terrain height data, provides an accurate spatial description for vector tiles, adapting to complex 3D scenes. Furthermore, as the camera position and viewing angle change dynamically, the technical solution provided by this embodiment can update the camera's view frustum and determine the visibility of vector slices in real time, ensuring that all visible vector slices within the current field of view are always rendered when the user moves or zooms the view, reducing the loading and drawing of invisible vector slices, saving GPU and CPU resources, loading only visible vector slices, and optimizing memory and bandwidth usage.

[0062] Optionally, in one embodiment, the step of determining whether the top element of the stack needs to be subdivided includes: determining whether the top element of the stack has reached the current scaling level; when the top element of the stack has reached the current scaling level, determining that the top element of the stack does not need to be subdivided; when the top element of the stack has not reached the current scaling level, determining whether the distance between the top element of the stack and the camera is less than a subdivision threshold; when the distance between the top element of the stack and the camera is greater than or equal to the subdivision threshold, determining that the top element of the stack does not need to be subdivided; when the distance between the top element of the stack and the camera is less than the subdivision threshold, determining that the top element of the stack needs to be subdivided.

[0063] Specifically, when determining whether the top element of the stack (the vector slice at the top of the current stack) needs subdivision, the system first checks if the top element has reached the current zoom level. This means checking if the vector slice is already at the highest detail level required by the current view. Each vector slice has a zoom level. If the zoom level of the vector slice being assessed is equal to the target zoom level of the current view, the vector slice is already sufficiently detailed and does not require further subdivision. If not, the system further checks if the distance between the vector slice and the camera is less than a subdivision threshold. This subdivision threshold can be determined based on the distance between the vector slice and the camera, and the height of the camera from the terrain. When the vector slice is close to the camera (i.e., the horizontal distance is small), a larger subdivision threshold is set to allow for more subdivision levels. When the camera is high above the terrain (i.e., the height is large), the need for subdivision is reduced, and a smaller subdivision threshold is set, suitable for rendering larger vector slices. If the distance between the vector slice and the camera is less than the subdivision threshold, subdivision is not required; otherwise, subdivision is required.

[0064] The vector tile-based modeling method provided in this embodiment dynamically subdivides nearby vector tiles based on distance and scaling level, displaying higher resolution and more detail; distant vector tiles maintain a lower resolution, reducing rendering and loading overhead, thus providing a clear near-field and coarse-grained view effect, optimizing rendering efficiency and visual experience. By checking the scaling level and distance, it also avoids repeatedly subdividing already sufficiently fine vector tiles, significantly reducing high-level data loading for distant vector tiles, reducing memory and bandwidth pressure, improving rendering efficiency, and saving hardware resources. By combining scaling level and subdivision threshold, vector tiles of different resolutions can be displayed simultaneously in the same view; nearby vector tiles display details, while distant vector tiles reduce unnecessary details, providing a more natural layer transition effect for large-scale terrain rendering, map rendering, and virtual scenes.

[0065] Optionally, in one embodiment, the step of calculating the AABB of the top element of the stack includes: calculating the geographical range of the top element of the stack based on its index; and calculating the AABB of the top element of the stack based on its geographical range.

[0066] Specifically, when calculating the AABB of the top element of the stack (the vector tile at the top of the current stack), the geographic extent of the vector tile is first calculated based on its index. The index of the vector tile is determined by its row and column numbers and scaling level. Based on the row and column numbers and scaling level, the longitude and latitude ranges of the vector tile, i.e., its geographic extent, can be obtained. Considering the algorithm's efficiency and the fact that frustum culling in this example is not sensitive to height, it is not necessary to query the height range of each vector tile when determining the height range of the AABB. Instead, all terrain extents within the field of view can be simply assigned to the AABB.

[0067] The vector tile-based ground-tile model method provided in this embodiment utilizes AABB to accurately describe the geographic extent of the vector tile, providing a mathematical foundation for subsequent frustum culling, occlusion detection, and subdivision. In large-scale map or terrain scenes, the efficient representation and computation of AABB can significantly improve the efficiency of visibility detection, occlusion culling, and subdivision. The camera's frustum is calculated every frame and updated based on the acquired terrain height information, adapting to scenes with significant terrain undulations. Combined with the accurately calculated AABB geographic extent, this ensures the accuracy and efficiency of the rendered content.

[0068] Optionally, in one embodiment, in step S102, when creating a texture for each scaling level, the texture size for each scaling level decreases using a Mipmap method, wherein the lower the scaling level, the smaller the texture size.

[0069] Specifically, a mipmap is a pre-generated collection of multi-resolution textures. Each mipmap level texture is a scaled-down version of the original texture. Each level of texture covers the same geographical area, but the resolution decreases progressively. The size of the mipmap texture decreases in the zoom level. That is, the lower the zoom level (smaller zoom level), the wider the scene field of view, and the lower the resolution texture with a higher mipmap level is used; the higher the zoom level (larger zoom level), the narrower the scene field of view, and the higher the resolution texture with a lower mipmap level is used to display more details.

[0070] Assuming the original texture size is 512×512, using the Mipmap decreasing method: Scaling level Z=0: 32×32; Scaling level Z=1: 64×64; Scaling level Z=2: 128×128; Scaling level Z=3: 256×256; Scaling level Z=4: 512×512.

[0071] Generally speaking, a higher layer level indicates higher vector slice precision, so a higher texture resolution is also required to avoid blurring caused by insufficient texture resolution. The texture size mentioned above is just an example. In actual processing, the maximum texture resolution of 512×512 is often insufficient. We can increase it to 2048×2048 or even higher.

[0072] The vector-slice-based ground-map model method provided in this embodiment uses a mipmap approach to progressively decrease the texture size at each scaling level. For distant scenes, this reduces the use of high-resolution textures, thereby reducing computational and memory overhead. Simultaneously, lower-resolution textures contain fewer pixels, allowing for faster texture sampling by the GPU during rendering. Furthermore, directly scaling down high-resolution textures in distant scenes leads to loss of detail and sampling distortion. Pre-generated mipmaps allow the system to select a suitable resolution, avoiding distortion caused by texture scaling. Mipmaps also mitigate texture jitter caused by distance, improving visual quality.

[0073] Optionally, in one embodiment, the step of determining the viewport size of a vector slice includes: calculating the geographic extent of the vector slice; merging the geographic extents of vector slices belonging to the same scaling level to obtain a merged extent corresponding to the scaling level; normalizing the geographic extent of the vector slice according to the merged extent corresponding to the scaling level; mapping the normalized geographic extent of the vector slice to the texture corresponding to the scaling level to obtain the texture size of the vector slice; and obtaining the viewport size of the vector slice according to the texture size of the vector slice.

[0074] Specifically, the viewport size refers to the display range of a vector slice within a texture. Its calculation requires a conversion and mapping from geographic extent to texture extent. A detailed description of calculating the geographic extent of a vector slice can be found above. After calculating the geographic extent of a vector slice, the geographic extents of multiple vector slices within the same scaling level are merged to form a larger merged extent. For example, all vector slices at the same scaling level can be traversed to find the minimum and maximum geographic extent values, thus obtaining the merged extent. For a single vector slice, the ratio of its geographic extent to the merged extent is normalized to the [0, 1] interval. This facilitates the subsequent mapping of the normalized geographic extent to the texture coordinate system, thereby obtaining the extent of the vector slice within the texture, i.e., the vector slice texture size. Finally, the viewport size of the vector slice on the actual screen can be calculated.

[0075] The vector tile-based model provided in this embodiment ensures that the coordinates of the vector tile on the texture accurately correspond to the geographical range through normalization and texture mapping. It merges ranges at the same scaling level, reduces redundant texture data loading, improves rendering efficiency, calculates the viewport size based on the texture range, achieves precise positioning of the vector tile, avoids display errors or resource waste, and the normalized data is easy to sample and draw, reducing complex calculations and adapting to real-time rendering requirements. At the same time, it supports dynamic scaling level adjustment of vector tiles, ensuring the consistency of multi-resolution texture mapping at different scaling levels.

[0076] Optionally, in one embodiment, applying a texture image to a ground-demo model includes: clearing the color buffer, depth buffer, and stencil buffer; rendering the texture image onto the ground or model surface; setting the color buffer and depth buffer to read-only; enabling a depth test, rendering the front of the shadow volume, and when the depth test is successful, incrementing the value of the stencil buffer by 1, rendering the back of the shadow volume, and when the depth test is successful, decrementing the value of the stencil buffer by 1; for pixels with stencil buffer values ​​not equal to 0, outputting vector slice texture sampling results, and for pixels with stencil buffer values ​​equal to 0, maintaining the rendering effect; and outputting the texture image of the ground-demo model.

[0077] Specifically, when applying texture images to the model, the rendering pipeline is first initialized by clearing the color buffer, depth buffer, and stencil buffer. This removes residual data from the previous rendering, ensuring the correctness of the current frame's rendering. When clearing the color buffer, the frame buffer's color data is reset to the background color; when clearing the depth buffer, the depth value of each pixel is reset to its initial value (e.g., the maximum depth value); and when clearing the stencil buffer, the stencil value of each pixel is reset to its default value (e.g., 0). By setting the color and depth buffers to read-only, the written color and depth data is prevented from being overwritten during subsequent rendering, protecting the completed texture mapping results and providing a foundation for subsequent shadow rendering. Then, a depth test is enabled, and the shadow volume is rendered. Specifically, the depth relationship between the front of the shadow body and scene objects is detected through frontal rendering of the shadow body. A depth test is enabled, and the front of the shadow body (the part visible from the light source) is rendered. When the depth test is successful, the stencil buffer value of the corresponding pixel is incremented by 1. Similarly, the depth relationship between the back of the shadow body and scene objects is detected through backal rendering of the shadow body. Specifically, the back of the shadow body (the part facing away from the light source) is rendered. When the depth test is successful, the stencil buffer value of the corresponding pixel is decremented by 1, ensuring that the stencil buffer records the pixel markers of the shadow body's covered area. In other words, a stencil buffer value greater than 0 indicates that the pixel is within the shadow body, and the vector slice texture sampling result is output to render the shadow effect; a value equal to 0 indicates that the pixel is not within the shadow body. When the stencil test passes, the color value of the current pixel is not changed. This process effectively distinguishes between ground-hugging and non-ground-hugging areas.

[0078] The method of using vector tiles to create ground-mapped models, as provided in this embodiment, separates the ground-mapped model area from other areas through shadow volume rendering, thus achieving the basic rendering. By employing depth testing, stencil buffer operations, and buffer protection, redundant computation and resource consumption are reduced, improving the efficiency of real-time rendering. This embodiment supports both texture mapping for planar terrain and texture mapping for complex 3D models, making it suitable for scenarios such as Geographic Information Systems (GIS), Virtual Reality (VR), and game rendering.

[0079] Example 2 Embodiment 2 of the present invention provides a method for vector slicing to model, the whole process is divided into two stages: the CPU vector slicing scheduling stage and the GPU vector data rendering stage.

[0080] During the CPU's vector tile scheduling phase, all visible vector tiles in the current view are calculated, involving quadtree search and view frustum pruning. Figure 2 This is a flowchart of the vector slice scheduling stage in the method for creating a vector slice-based ground-mount model according to Embodiment 2 of the present invention, as follows: Figure 2 As shown, the vector slice scheduling phase specifically includes the following steps: At the start of the current frame, i.e., during the data initialization phase at the beginning of a frame's rendering, the vector tile set records of the previous frame are cleared, and preparations are made to calculate the vector tiles within the new field of view, ensuring that the calculations for the current frame are independent. The maximum and minimum terrain heights and the height of the field of view center are obtained for subsequent updates to the camera's view frustum. A stack containing only vector tiles at level 0 is constructed; it is checked whether the stack is empty; if so, all recorded vector tile results are returned, along with the current frame's endpoint; otherwise, the top element of the stack is popped, and the visibility of the vector tile is calculated; if visible, it is determined whether the vector tile needs to be subdivided; if subdivision is required, the quadtree child nodes of the current vector tile are pushed onto the stack, the AABB of the child nodes is updated according to the terrain height, and the process of checking whether the stack is empty is returned; if subdivision is not required, the vector tile is recorded, and the process of checking whether the stack is empty is returned; if not visible, the process of checking whether the stack is empty is returned directly.

[0081] The steps for calculating the visibility of vector slices include: 1.1) Calculate the world size based on the current zoom level and the size of each vector slice; 1.2) Calculate the camera model matrix based on the terrain height, camera height, and world size; 1.3) Calculate the camera's clipping matrix based on parameters such as the camera's near and far planes; 1.4) Calculate the view frustum based on the camera's model matrix and clipping matrix; 1.5) In world coordinates, the visibility is obtained by finding the intersection of the AABB of the vector slice and the view frustum.

[0082] The steps to determine whether further subdivision is necessary include: 2.1) If the vector slice level reaches the current zoom level, further subdivision is not required; 2.2) Calculate the optimal subdivision distance of the vector slice based on the distance between the vector slice and the camera and the height of the camera from the terrain. If the distance between the vector slice and the camera is less than this value, subdivision is required. During the GPU's vector data rendering phase, rendering commands are executed according to the rendering mode, which is determined by whether or not the model needs to be rendered to the ground. The rendering process is divided into two parts based on whether the effect of rendering to the ground is required. One part is direct rendering, which follows the same logic as existing engines, rendering directly to world space based on the coordinates of vector slices within the viewport. The other part is implementing the effect of rendering to the ground.

[0083] Figure 3This is a flowchart of the vector data drawing stage in the method for creating a vector tile model according to Embodiment 2 of the present invention, as shown below. Figure 3 As shown, after drawing begins, all vector slices within the viewport are acquired. Then, it's determined whether the drawing mode should achieve a ground-penetrating / model-penetrating effect. If not, drawing proceeds directly. If so, all layers are traversed, the coordinates of the vector slices in each layer are calculated, and the vector slices are categorized according to their scaling level. A texture is prepared for each scaling level. All vector slices in each layer are traversed, the corresponding viewport size is calculated, and the corresponding texture is obtained based on the scaling level of the vector slice. The texture is then drawn onto the texture to obtain the texture image. Finally, based on the vector slice range and the texture image, a shadow volume is used to achieve a ground-penetrating / model-penetrating effect, completing the rendering. When categorizing all vector slices, a texture needs to be prepared for each scaling level. To reduce memory requirements, the texture size for each level can be decreased using mipmaps without affecting the rendering effect. When calculating the viewport size of the vector slices, if orthographic projection is used to draw onto the texture, the size can be directly obtained from the position of the vector slice within the merged vector slice range and the corresponding texture size.

[0084] In this embodiment, the influence of terrain height is considered when scheduling vector tiles, and the AABB and view frustum of the vector tiles are corrected accordingly to ensure the correct clipping results. All vector tiles are classified by level and rendered onto textures. Shadow volume technology is used to realize the ground-attached model of vector data. This combines the advantages of vector tiles and rasterized tiles, realizes dynamic rendering of vector data, and can automatically rasterize vector data, thereby giving the two-dimensional plane data elevation information. This solves the performance and effect problem of the ground-attached model of city-level vector data, so that city-level vector tiles can also be applied to various scenarios.

[0085] Example 3 Corresponding to Embodiment 1 above, Embodiment 3 of the present invention provides a method, apparatus, computer equipment and medium for vector slices to be applied to a ground-mounted model. The corresponding technical features and effects can be referred to Embodiment 1 above, and will not be repeated in this embodiment. Figure 4 The apparatus for creating a vector slice ground-mount model provided in Embodiment 3 of the present invention, such as Figure 4 As shown, the device includes: a determination module 201, a creation module 202, a first processing module 203, and a second processing module 204.

[0086] The determination module 201 is used to determine the set of vector slices within the current field of view, wherein the set of vector slices includes multiple vector slices at different zoom levels and different layers; the creation module 202 is used to create a texture corresponding to each zoom level; the first processing module 203 is used to traverse each layer of the set of vector slices, determine the vector slices located in the layer and the viewport size of the vector slices, and draw the vector slices onto the textures corresponding to the zoom level according to the viewport size, thereby obtaining a texture image corresponding to each zoom level; the second processing module 204 is used to apply the texture image to the model.

[0087] Further, when determining the set of vector slices within the current field of view, the specific steps performed by the module include: Step S1: Constructing a quadtree based on the scaling level of the vector slices and the spatial relationship between the vector slices, wherein the vector slice with a scaling level of 0 is used as the root node of the quadtree; Step S2: Creating a stack and placing the root node of the quadtree into the stack; Step S3: Determining whether the stack is empty, wherein if the stack is empty, step S4 is executed, and if the stack is not empty, step S5 is executed; Step S4: Outputting the set of vector slices; Step S5: Obtain the top element of the current stack; Step S6: Determine the visibility of the top element. If the top element is not visible, return to step S3; if the top element is visible, proceed to step S7; Step S7: Determine whether the top element needs to be subdivided. If the top element does not need to be subdivided, proceed to step S8; if the top element needs to be subdivided, proceed to step S9; Step S8: Write the top element into the vector slice set and return to step S3; Step S9: Push the quadtree child nodes of the top element onto the stack and return to step S3.

[0088] Furthermore, when determining the set of vector tiles within the current field of view, the specific steps performed by the determining module include: obtaining the terrain height within the current field of view, wherein the terrain height data includes the maximum height, minimum height, and center height within the current field of view; updating the camera frustum based on the terrain height; and determining the visibility of the top element of the stack by: calculating the AABB of the top element of the stack; and determining whether the top element of the stack is visible by intersecting the AABB of the top element with the frustum.

[0089] Further, the step of determining whether the top element of the stack needs to be subdivided includes: determining whether the top element of the stack has reached the current scaling level; when the top element of the stack has reached the current scaling level, determining that the top element of the stack does not need to be subdivided; when the top element of the stack has not reached the current scaling level, determining whether the distance between the top element of the stack and the camera is less than a subdivision threshold; when the distance between the top element of the stack and the camera is greater than or equal to the subdivision threshold, determining that the top element of the stack does not need to be subdivided; when the distance between the top element of the stack and the camera is less than the subdivision threshold, determining that the top element of the stack needs to be subdivided.

[0090] Further, the step of calculating the AABB of the top element of the stack includes: calculating the geographical range of the top element of the stack based on its index; and calculating the AABB of the top element of the stack based on its geographical range.

[0091] Furthermore, when creating a texture for each scaling level, the texture size for each scaling level decreases using a mipmap method, wherein the lower the scaling level, the smaller the texture size.

[0092] Further, when determining the viewport size of the vector slice, the first processing module specifically performs the following steps: calculating the geographic extent of the vector slice; merging the geographic extents of vector slices belonging to the same scaling level to obtain a merged extent corresponding to the scaling level; normalizing the geographic extent of the vector slice according to the merged extent corresponding to the scaling level; mapping the normalized geographic extent of the vector slice to the texture corresponding to the scaling level to obtain the texture size of the vector slice; and obtaining the viewport size of the vector slice according to the texture size of the vector slice.

[0093] Furthermore, when the first processing module applies the texture image to the ground model, the specific steps it performs include: clearing the color buffer, depth buffer, and stencil buffer; rendering the texture image onto the ground or model surface; setting the color buffer and depth buffer to read-only; enabling depth testing, rendering the front of the shadow body, and when the depth test is successful, setting the value of the stencil buffer by +1; rendering the back of the shadow body, and when the depth test is successful, setting the value of the stencil buffer by -1; for pixels whose stencil buffer value is not equal to 0, outputting vector slice texture sampling results; for pixels whose stencil buffer value is equal to 0, maintaining the rendering effect; and outputting the texture image applied to the ground model.

[0094] Example 4 This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 5 As shown, the computer device 01 in this embodiment includes, but is not limited to, a memory 011 and a processor 012 that can be interconnected via a system bus, such as... Figure 5 As shown. It should be noted that, Figure 5 Only a computer device 01 with component memory 011 and processor 012 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0095] In this embodiment, the memory 011 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 011 may be an internal storage unit of the computer device 01, such as the hard disk or memory of the computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 01. Of course, the memory 011 may include both the internal storage unit and its external storage device of the computer device 01. In this embodiment, the memory 011 is typically used to store the operating system and various application software installed on the computer device 01, such as the program code of the vector slice ground-mounting model device in Embodiment 2. In addition, memory 011 can also be used to temporarily store various types of data that have been output or will be output.

[0096] In some embodiments, processor 012 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 012 is typically used to control the overall operation of computer device 01. In this embodiment, processor 012 is used to run program code stored in memory 011 or process data, such as a method for applying vector tiles to a ground plane model.

[0097] Example 5 This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores a computer program. When the program is executed by a processor, it implements the corresponding function. The computer-readable storage medium of this embodiment is used to store a device for storing vector slice ground tile models. When executed by a processor, it implements the method of vector slice ground tile models of Embodiment 1.

[0098] It should be noted that, in this document, 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. Unless otherwise specified, 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 that element.

[0099] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0101] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for applying vector slices to a ground-mount model, characterized in that, include: Determine the set of vector slices within the current field of view, wherein the set of vector slices includes multiple vector slices at different zoom levels and on different layers; Create one texture for each of the aforementioned scaling levels; Traverse each layer of the vector slice set, determine the vector slice located in the layer and the viewport size of the vector slice, and draw the vector slice onto the texture corresponding to the scaling level according to the viewport size to obtain the texture image corresponding to each scaling level; Apply the texture image to the model.

2. The method for vector slice-based ground-mounting model according to claim 1, characterized in that, The steps to determine the set of vector tiles within the current field of view include: Step S1: Construct a quadtree based on the scaling level of the vector slice and the spatial relationship between the vector slices, wherein the vector slice with a scaling level of 0 is used as the root node of the quadtree; Step S2: Create a stack and put the root node of the quadtree into the stack; Step S3: Determine whether the stack is empty. If the stack is empty, proceed to step S4. If the stack is not empty, proceed to step S5. Step S4: Output the set of vector slices; Step S5: Get the top element of the current stack; Step S6: Determine the visibility of the top element of the stack. If the top element of the stack is not visible, return to step S3. If the top element of the stack is visible, execute step S7. Step S7: Determine whether the top element of the stack needs to be subdivided. If the top element of the stack does not need to be subdivided, proceed to step S8. If the top element of the stack needs to be subdivided, proceed to step S9. Step S8: Write the top element of the stack into the vector slice set, and return to step S3; Step S9: Push the quadtree child node of the top element of the stack onto the stack, and return to step S3.

3. The method for vector slice-based ground-mounting model according to claim 2, characterized in that, The step of determining the set of vector tiles within the current field of view further includes: obtaining the terrain height within the current field of view, wherein the terrain height data includes the maximum height, minimum height, and center height within the current field of view, and updating the camera frustum based on the terrain height; The steps for determining the visibility of the top element of the stack include: calculating the AABB of the top element of the stack; and determining whether the top element of the stack is visible by finding the intersection of the AABB of the top element of the stack with the view frustum.

4. The method for vector slice-based ground-mounting model according to claim 3, characterized in that, The steps to determine whether the top element of the stack needs to be subdivided include: Determine whether the top element of the stack has reached the current scaling level; When the top element of the stack reaches the current scaling level, it is determined that the top element of the stack does not need to be subdivided. If the top element of the stack has not reached the current scaling level, determine whether the distance between the top element of the stack and the camera is less than the subdivision threshold; When the distance between the top element of the stack and the camera is greater than or equal to the subdivision threshold, it is determined that the top element of the stack does not need to be subdivided; When the distance between the top element of the stack and the camera is less than the subdivision threshold, it is determined that the top element of the stack needs to be subdivided.

5. The method for vector slice-based ground-mounting model according to claim 4, characterized in that, The steps for calculating the AABB of the top element of the stack include: The geographical range of the top element of the stack is calculated based on its index. Calculate the AABB of the top element of the stack based on its geographical range.

6. The method for vector slice-based ground-mounting model according to claim 1, characterized in that, When creating a texture for each scaling level, the texture size for each scaling level decreases using a mipmap method, wherein the lower the scaling level, the smaller the texture size.

7. The method for vector slice-based ground-mounting model according to claim 1, characterized in that, The steps for determining the viewport size of the vector slice include: Calculate the geographic extent of the vector slice; Merge the geographic extents of the vector tiles belonging to the same scaling level to obtain the merged extent corresponding to the scaling level; The geographic range of the vector slice is normalized according to the merging range corresponding to its scaling level; The geographic extent of the normalized vector slice is mapped to the texture corresponding to its scaling level to obtain the texture size of the vector slice; The viewport size of the vector slice is obtained based on the texture size of the vector slice.

8. The method for vector slice-based ground-mounting model according to claim 1, characterized in that, The texture image is used to create a ground-mount model, including: Clear the color buffer, depth buffer, and stencil buffer; Render the texture image onto the ground or model surface; Set the color buffer and the depth buffer to read-only; Enable depth testing, render the front of the shadow body, and when the depth test is successful, increment the value of the stencil buffer by 1. Render the back of the shadow body, and when the depth test is successful, decrement the value of the stencil buffer by 1. For pixels whose template buffer values ​​are not equal to 0, output vector slice texture sampling results; for pixels whose template buffer values ​​are equal to 0, maintain the rendering effect. Output the texture image of the ground-mount model.

9. A device for applying vector slices to a ground-mounted model, characterized in that, include: A determination module is used to determine the set of vector slices within the current field of view, wherein the set of vector slices includes multiple vector slices at different zoom levels and on different layers; A module is created to create a texture for each of the aforementioned scaling levels; The first processing module is used to traverse each layer of the vector slice set, determine the vector slice located in the layer and the viewport size of the vector slice, and draw the vector slice onto the texture corresponding to the scaling level according to the viewport size, so as to obtain the texture image corresponding to each scaling level; The second processing module is used to apply the texture image to the model.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.