CN115239895A - Mass data loading and optimized rendering method for GIS water environment 3D map - Google Patents

Mass data loading and optimized rendering method for GIS water environment 3D map Download PDF

Info

Publication number
CN115239895A
CN115239895A CN202210689240.1A CN202210689240A CN115239895A CN 115239895 A CN115239895 A CN 115239895A CN 202210689240 A CN202210689240 A CN 202210689240A CN 115239895 A CN115239895 A CN 115239895A
Authority
CN
China
Prior art keywords
map
rendering
data
lod
current database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210689240.1A
Other languages
Chinese (zh)
Other versions
CN115239895B (en
Inventor
刘增祥
李俊林
杨未
甘申东
樊罗杰
赵也
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PowerChina Eco Environmental Group Co Ltd
Original Assignee
China Power Construction Foshan Construction Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Power Construction Foshan Construction Co ltd filed Critical China Power Construction Foshan Construction Co ltd
Priority to CN202210689240.1A priority Critical patent/CN115239895B/en
Priority claimed from CN202210689240.1A external-priority patent/CN115239895B/en
Publication of CN115239895A publication Critical patent/CN115239895A/en
Application granted granted Critical
Publication of CN115239895B publication Critical patent/CN115239895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/36Level of detail

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a massive data loading and optimized rendering method for a GIS water environment 3D map. The method comprises the following steps: obtaining coordinate values of a map at a preset position in a current database, and determining a 3D map solid geometric frame according to the coordinate values; creating an LOD according to map data in a current database and a 3D map solid geometric frame; texture rendering is carried out in each grid in the LOD according to map data in a current database, autonomous optimization rendering of massive map data is achieved through cooperation of the CPU and the GPU, drawing efficiency of the GIS water environment 3D map is improved, and the problem of blocking or delay during front-end rendering loading in the prior art is solved. The method and the device can process the excessive rendering area of the 3D map in the texture rendering process, reconstruct the processed 3D map, prevent the rendering operation from being too slow, avoid wasting CPU and GPU resources and further improve the drawing efficiency.

Description

Mass data loading and optimized rendering method for GIS water environment 3D map
Technical Field
The invention relates to the technical field of data processing, in particular to a massive data loading and optimized rendering method for a 3D map of a water environment of a Geographic Information System (GIS).
Background
A3D map of the GIS water environment is adopted to display the treatment process of the water ecological environment in a visual mode, so that a visual and convenient auxiliary tool is provided for effective treatment of rivers and lakes. The 3DGIS platform is mainly used for carrying out data input, storage, retrieval, display and comprehensive analysis application on collected information such as spatial data, attributes, time, multimedia and the like under the support of a unified data storage standard and a unified interface specification.
Because the water ecological environment needs to be subjected to large-scale careful investigation and effective treatment by finding problems from the source, the investigation is wide in involved range and high in density, and the generated spatial data is wide in element points and large in scale. In the face of mass data loading and optimized rendering, index mechanisms such as semi-automatic means, space creation, attributes and the like are required to support high-performance space data access, and then network data release is carried out through a back-end service.
However, in the face of incremental investigation result data and subsequent dynamic access of an internet of things sensing device, data volume related to a water environment is geometrically multiplied, and an indexing mechanism such as space and attributes is created by a semi-automatic means, so that the mapping efficiency of the GIS water environment 3D map is influenced, and the problem of stagnation or delay during rendering and loading of the front end of massive 3D map data cannot be avoided.
Disclosure of Invention
The embodiment of the invention provides a mass data loading and optimized rendering method for a GIS water environment 3D map, which aims to solve the problems of low drawing efficiency of the GIS water environment 3D map and blockage or delay during front-end rendering and loading in the prior art.
In a first aspect, an embodiment of the present invention provides a method for loading and optimally rendering mass data of a 3D map of a GIS water environment, including:
obtaining coordinate values of a map at a preset position in a current database, and determining a 3D map solid geometric frame according to the coordinate values, wherein the preset position comprises a plurality of boundary positions of map data of all water environments;
creating a level of Detail (LOD) according to the map data in the current database and the 3D map solid geometric frame;
performing texture rendering within each mesh in the LOD according to map data in the current database; during rendering, a Central Processing Unit (CPU) loads map data corresponding to each grid according to current resource data, and a Graphics Processing Unit (GPU) renders the loaded map data;
and performing excessive rendering detection on the 3D map in the texture rendering process, processing an excessively rendered area, and reconstructing the processed 3D map to obtain a 3D target map.
In a possible implementation manner, the obtaining coordinate values of a map of a preset location in a current database includes:
detecting whether a new map record is added in the database;
and when a new map record is added to the database, obtaining the coordinate value of the map at the preset position in the current database of the newly added map record.
In one possible implementation, the creating a LOD according to the map data in the current database and the 3D map solid geometry frame includes:
carrying out gridding segmentation on the 3D map solid geometric frame according to the map data in the current database to obtain an LOD model comprising a plurality of grids;
and performing rasterization processing on each grid in the LOD model to obtain the LOD.
In a possible implementation manner, the performing meshing segmentation on the 3D map solid geometry frame according to the map data in the current database to obtain an LOD model including a plurality of meshes includes:
and according to the map data in the current database, taking the power of 2N as a calculation unit, and carrying out meshing segmentation on the 3D map solid geometric frame in a pyramid mode to obtain an LOD model comprising a plurality of meshes.
In one possible implementation, the performing texture rendering within each mesh in the LOD according to the map data in the current database includes:
acquiring current resource data in a terminal, wherein the current resource data comprises electric quantity of the terminal, CPU operation resources, CPU storage space and rendering operation resources of a GPU;
the CPU takes the map data in the current database as a UI object to be processed according to the current resource data, and loads the map data on a corresponding grid in the LOD in a linear layout mode to obtain a plurality of polygons;
the CPU sends the polygons and the map data corresponding to each polygon to the GPU;
and the GPU carries out texture rendering on the corresponding polygon according to the map data.
In a possible implementation manner, the detecting excessive rendering of the 3D map during texture rendering and processing an excessively rendered area includes:
in the process of texture rendering, acquiring the color corresponding to the currently rendered pixel in the 3D map;
detecting whether the color corresponding to each pixel is consistent with a preset color or not; the preset color is a color corresponding to excessive rendering;
when the color corresponding to the first pixel is consistent with the color in the preset colors, determining that the first pixel is excessively rendered; wherein the first pixel is any one pixel in the 3D map;
determining an excessive rendering degree according to the color corresponding to the first pixel;
and when the areas of the areas where the pigments with the same excessive rendering degree are located are larger than a preset area, processing the excessive rendering areas.
In one possible implementation, the processing the over-rendered area includes:
and performing texture rendering again on the over-rendered area in a relative layout mode.
In a second aspect, an embodiment of the present invention provides a device for loading and optimizing rendering of mass data of a 3D map of a GIS water environment, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring coordinate values of a map of a preset position in a current database, and the preset position comprises a plurality of boundary positions of map data of all water environments;
the calculation module is used for determining a 3D map solid geometric frame according to the coordinate values;
the creation module is used for creating LOD according to the map data in the current database and the 3D map solid geometric frame;
a rendering module, configured to perform texture rendering within each mesh in the LOD according to map data in the current database; during rendering, the CPU loads the map data corresponding to each grid according to the current resource data, and the GPU renders the loaded map data;
the rendering module is further configured to perform over-rendering detection on the 3D map during texture rendering, process an over-rendered area, and reconstruct the processed 3D map to obtain a 3D target map.
In a third aspect, an embodiment of the present invention provides a terminal, which includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where the processor, when executing the computer program, implements the steps of the method for loading and optimizing the rendering of the mass data of the 3D map of the GIS water environment according to the first aspect or any one of the possible implementation manners of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the method for loading and optimizing rendering the mass data of the 3D map of the GIS water environment according to the first aspect or any one of the possible implementation manners of the first aspect are implemented.
The embodiment of the invention provides a massive data loading and optimized rendering method of a GIS water environment 3D map, which is characterized in that a 3D map solid geometric frame is established according to water environment map coordinate values, LOD is automatically established, then, a CPU loads massive data and a GOU is adopted to execute map rendering operation, and the CPU and the GPU are matched to realize autonomous optimized rendering of the massive map data, so that the drawing efficiency of the GIS water environment 3D map is improved, and the problem of blocking or delay during front-end rendering loading in the prior art is solved. The method also carries out excessive rendering detection on the 3D map in the texture rendering process, processes the excessively rendered area, reconstructs the processed 3D map, prevents too slow rendering operation, avoids wasting CPU and GPU resources, enables the CPU and GPU resources to be used for constructing and improving the 3D map of the GIS water environment to the maximum extent, and further improves the drawing efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a method for loading and optimizing rendering of mass data of a 3D map of a GIS water environment according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for simplifying a mesh in an LOD model according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a mass data loading and optimized rendering device for a 3D map of a GIS water environment according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following description is made by way of specific embodiments with reference to the accompanying drawings.
Fig. 1 is a flowchart of an implementation of a method for loading and optimizing rendering of mass data of a 3D map of a GIS water environment according to an embodiment of the present invention, which is detailed as follows:
step 101, obtaining a coordinate value of a map at a preset position in a current database, and determining a 3D map solid geometric frame according to the coordinate value.
Before constructing the 3D map, it is first necessary to construct a maximum frame of the 3D map of the aquatic environment so that all map data of the aquatic environment can be included within the maximum frame of the 3D map.
The preset positions are a plurality of boundary positions including map data of all water environments, and in an embodiment, coordinate values of an upper left corner, an upper right corner, a lower left corner and a lower right corner of a map of the water environment in the current database may be included, for example, (X1, Y1, Z1), (X2, Y2, Z2), (X3, Y3, Z3), (X4, Y4, Z4), respectively. And then respectively obtaining the maximum value on each coordinate axis according to the obtained coordinate values, and constructing a 3D map solid geometric frame according to the determined maximum value on each coordinate axis and the coordinate origin. Specifically, the maximum value of X1-X4, the maximum value of Y1-Y4 and the maximum value of Z1-Z4 are taken, the maximum values are respectively used as map vertexes, each edge of a map scene is calculated, map boundaries are defined through charging, and a 3D map solid geometric frame is constructed.
In one embodiment, whether a new map record is added to the database is detected; when a new map record is added into the database, the coordinate value of the map at the preset position in the current database of the newly added map record is obtained, so that the corresponding 3D map can be determined according to the mass data loading and optimized rendering method of the 3D map under the GIS water environment every time the map record is newly added into the database.
And 102, creating an LOD according to the map data in the current database and the 3D map solid geometry frame.
The LOD technology is used for determining the resource allocation of object rendering according to the positions and the importance of the nodes of the object model in the display environment, reducing the number of faces and the detail of non-important objects and further obtaining high-efficiency rendering operation.
In one embodiment, firstly, gridding and segmenting a 3D map solid geometry frame according to map data in a current database to obtain an LOD model comprising a plurality of grids; and then, rasterizing each grid in the LOD model to obtain the LOD.
When the 3D map solid geometric frame is subjected to gridding segmentation, the 3D map gridding segmentation is realized according to nodes with heavy map data in a current database, and when a gridding segmentation algorithm is executed, the power of 2N is taken as a calculation unit, and the 3D map solid geometric frame is subjected to automatic gridding segmentation in a pyramid mode, namely, the 3D map solid geometric frame is divided into small triangles. It should be noted that, in order to increase the speed of creating the LOD and reduce the rendering workload, the region in the model that does not need the highest precision may be simplified, for example, the pixels in the model region located far away in the model are small, and the rendering precision may be reduced at this time, so as to avoid wasting the computing performance of the terminal. The grid reduction algorithm can be adopted to generate models with different detail levels, and different detail levels are selected to be rendered under different conditions. In this embodiment, vertices that can be optimized in the LOD model of multiple meshes are determined, and then simplification is performed based on the vertices, as shown in fig. 2, a vertex u and a vertex v are connected by a line segment L, the vertex u is moved to the vertex v, that is, the vertex u and the line segment L are deleted, and then all line segments connecting the vertex u are connected to the vertex v, so that simplification of the vertex u is achieved.
And rasterizing each grid in the simplified LOD model through a CPU and a GPU, and defining a calculation rule to complete LOD creation. It should be noted that, in this embodiment, the CPU is mainly used for data processing, and the GPU is used for graphics processing.
The main operation of rasterization is to perform calculation based on each edge of each grid to generate a Document Object Model (DOM), which is a standard Programming Interface for processing extensible markup language (xml), and is an Application Programming Interface (API) independent of platform and language, and which can dynamically access programs and scripts to update the content, structure, and style of www documents. The document may be further processed and the results of the processing may be added to the current page. The DOM is a tree-based API document that requires that the entire document be represented in memory during processing.
In the step, massive map data are loaded at the front end of the terminal, the LOD of the three-dimensional map is established at the rear end, and the smooth loading of a large scene is ensured through the cooperation of the front end and the rear end of the terminal.
Step 103, according to the map data in the current database, texture rendering is performed in each grid in the LOD.
During rendering, the CPU loads the map data corresponding to each grid according to the current resource data, the GPU renders the loaded map data, and the drawing rate of the 3D map is improved through the cooperation of the CPU and the GPU, so that the drawing rate of a graph 60fps is achieved within 16 ms.
This step may include: acquiring current resource data in a terminal, wherein the current resource data comprises electric quantity of the terminal, CPU operation resources, CPU storage space and rendering operation resources of a GPU;
the CPU takes the map data in the current database as a UI object to be processed according to the current resource data, and loads the UI object to a corresponding grid in the LOD in a linear layout mode to obtain a plurality of polygons;
the CPU sends the polygons and the map data corresponding to each polygon to the GPU;
and the GPU carries out texture rendering on the corresponding polygon according to the map data to obtain the colored 3D map.
In the embodiment, the CPU performs the loading calculation to use the resources of the terminal to the maximum extent, and may suspend unimportant processing items in the terminal to increase the processing speed of the CPU.
When the GPU renders, the corresponding pixel is rendered, and when a certain pixel of the same frame is rendered for multiple times, in the multi-layered UI structure, if the invisible UI is also performing the rendering operation, an over-rendering situation occurs, which wastes a large amount of CPU and GPU resources, and at this time, it is necessary to perform over-rendering detection on the rendered pixel in the texture rendering process, see the detailed description of step 103.
And 103, performing excessive rendering detection on the 3D map in the texture rendering process, processing an excessively rendered area, and reconstructing the processed 3D map to obtain a 3D target map.
In the process of texture rendering, acquiring the color corresponding to the currently rendered pixel in the 3D map; detecting whether the color corresponding to each pixel is consistent with a preset color or not; the preset color is a color corresponding to the excessive rendering.
In an embodiment, different colors may be used for the different degrees of overdriving, and the different colors used for the different degrees of overdriving are not limited in this embodiment, for example, they may be used sequentially according to the degree of emphasis of the overdriving degree.
Wherein blue represents over rendering by a factor of 1, i.e. the pixel is rendered twice; green indicates 2 times over-rendering, i.e. the pixel is rendered three times; reddish indicates 3 times over-rendering, i.e. the pixel is drawn four times; dark red indicates that the rendering is over-rendered by a factor of 4, i.e. the pixel is drawn at least five times.
When the color corresponding to the first pixel is consistent with the color in the preset colors, determining that the first pixel is excessively rendered; the first pixel is any one pixel in the 3D map; here, the preset color refers to a color representation adopted for over-rendering, such as blue, green, light red, and dark red representations. If the color of the first pixel is blue, the first pixel is over-rendered, if the color of the first pixel is green, the first pixel is over-rendered, and so on.
Determining an over-rendering degree according to the color corresponding to the first pixel; and when the area of the region where the pigments with the same excessive rendering degree are located is larger than the preset area, processing the excessive rendering region.
In an embodiment, the predetermined threshold areas corresponding to the color block areas with different over-rendering degrees are also different, and the lighter the over-rendering degree is, the larger the corresponding predetermined threshold area is, for example, when the blue color block area is greater than a, the over-rendering processing is required, and when the green color block area is greater than B, the over-rendering processing is required, wherein a is greater than B, and similarly, when the light red color block area is greater than C, the over-rendering processing is required, B is greater than C, and when the dark red color block area is greater than 0, the over-rendering processing is required, that is, the rendered 3D map is not allowed to have dark red.
When the over-rendered area is processed, unnecessary UI layers are reduced, because the linear layout is adopted during the primary rendering, the texture rendering is carried out again on the over-rendered area in a relative layout mode. Specifically, map data corresponding to the over-rendered area is loaded onto each grid in the LOD again in a relative layout manner, and the GPU performs texture rendering on the newly loaded map data and the corresponding polygon.
The linear layout refers to a layout mode in which the current pixel is positioned based on the parent element, two layout modes, namely a horizontal linear layout and a vertical linear layout, can be adopted, and the relative layout refers to a layout mode in which the current pixel is positioned relative to other pixels, so that the layout mode is more flexible relative to the linear layout. Therefore, when the linear layout has large over-rendering, the over-rendering area is re-rendered in a relative layout mode.
After the over-rendering area is processed, the position of each node in a front-end display screen is calculated according to the nodes of the processed 3D map, CSS definitions of the nodes and the subordination relation among the nodes, and the position data of each node is transmitted to the front end to be displayed, so that a user can obtain the 3D map without blockage, waiting and smooth interaction at the front end of the terminal, and user experience is improved.
The rendering operation in steps 103 and 104 can be executed in real time on the cloud server, and the rendered picture is transmitted to the terminal in real time in a video streaming manner, and is smoothly displayed at the front end of the terminal. The rendering operation can also be executed at the rear end of the terminal, and the rendering operation is displayed at the front end of the terminal after the rendering operation is finished.
The massive data loading and optimized rendering method of the GIS water environment 3D map comprises the steps of obtaining coordinate values of a map at a preset position in a current database, and determining a 3D map solid geometric frame according to the coordinate values; creating an LOD according to map data in a current database and a 3D map solid geometric frame; according to the map data in the current database, performing texture rendering in each grid in the LOD; and performing excessive rendering detection on the 3D map in the texture rendering process, processing an excessively rendered area, and reconstructing the processed 3D map to obtain a 3D target map. According to the invention, the autonomous optimization rendering and the excessive rendering real-time dynamic adjustment of massive map data are realized by adopting the cooperation of the CPU and the GPU, the data storage and scheduling service capability in the processing process is improved, the drawing efficiency of the 3D map of the GIS water environment is improved, and the problem of pause or delay in front-end rendering and loading in the prior art is solved. The method has the advantages that real-time rendering calculation is achieved, a user can display rendering results in real time while operating the terminal, the rendering operation can be carried out in real time on the cloud server, the consistent experience of browsing and operating of real-time cross-platform and cross-browser is achieved, the problems that massive three-dimensional model data cannot run at a Web end and the requirement on the performance of the terminal is high are effectively solved, and the whole process data access service capacity is improved. The method also carries out excessive rendering detection on the 3D map in the texture rendering process, processes the excessively rendered area, reconstructs the processed 3D map, prevents too slow rendering operation, avoids wasting CPU and GPU resources, enables the CPU and GPU resources to be used for constructing and improving the 3D map of the GIS water environment to the maximum extent, and further improves the drawing efficiency.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not limit the implementation process of the embodiments of the present invention in any way.
The following are embodiments of the apparatus of the invention, reference being made to the corresponding method embodiments described above for details which are not described in detail therein.
Fig. 3 shows a schematic structural diagram of a mass data loading and optimized rendering device for a 3D map of a GIS water environment according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which are detailed as follows:
as shown in fig. 3, the mass data loading and optimized rendering device for the 3D map of the GIS water environment includes: an acquisition module 301, a calculation module 302, a creation module 303, and a rendering module 304.
An obtaining module 301, configured to obtain coordinate values of a map at a preset position in a current database, where the preset position is a plurality of boundary positions including map data of all water environments;
a calculating module 302, configured to determine a 3D map solid geometry frame according to the coordinate values;
a creating module 303, configured to create an LOD according to the map data in the current database and the 3D map solid geometry frame;
a rendering module 304, configured to perform texture rendering within each mesh in the LOD according to map data in the current database; during rendering, the CPU loads the map data corresponding to each grid according to the current resource data, and the GPU renders the loaded map data;
the rendering module 304 is further configured to perform over-rendering detection on the 3D map during texture rendering, process an over-rendered area, and reconstruct the processed 3D map to obtain a 3D target map.
In a possible implementation manner, when the obtaining module 301 obtains the coordinate value of the map of the preset position in the current database, the obtaining module is configured to:
detecting whether a new map record is added in the database;
and when a new map record is added to the database, obtaining the coordinate value of the map at the preset position in the current database of the newly added map record.
In a possible implementation manner, the creating module 303, when creating an LOD according to the map data in the current database and the 3D map solid geometry frame, is configured to:
carrying out gridding segmentation on the 3D map solid geometric frame according to map data in a current database to obtain an LOD model comprising a plurality of grids;
and performing rasterization processing on each grid in the LOD model to obtain the LOD.
In a possible implementation manner, the creating module 303 is configured to, when performing meshing segmentation on the 3D map solid geometry frame according to map data in the current database to obtain an LOD model including a plurality of meshes,:
and according to map data in the current database, taking the power of 2 as a calculation unit, and carrying out meshing segmentation on the 3D map solid geometric frame in a pyramid mode to obtain an LOD model comprising a plurality of meshes.
In one possible implementation, the rendering module 304, when performing texture rendering within each mesh in the LOD according to the map data in the current database, is configured to:
acquiring current resource data in a terminal, wherein the current resource data comprises electric quantity of the terminal, CPU operation resources, CPU storage space and rendering operation resources of a GPU;
the CPU takes the map data in the current database as a UI object to be processed according to the current resource data, and loads the map data on a corresponding grid in the LOD in a linear layout mode to obtain a plurality of polygons;
the CPU sends the polygons and the map data corresponding to each polygon to the GPU;
and the GPU carries out texture rendering on the corresponding polygon according to the map data.
In a possible implementation manner, when detecting excessive rendering of the 3D map during texture rendering and processing an excessively rendered area, the rendering module 304 is configured to:
in the texture rendering process, acquiring the color corresponding to the currently rendered pixel in the 3D map;
detecting whether the color corresponding to each pixel is consistent with a preset color or not; the preset color is a color corresponding to excessive rendering;
when the color corresponding to the first pixel is consistent with the color in the preset colors, determining that the first pixel is excessively rendered; the first pixel is any one pixel in the 3D map;
determining an excessive rendering degree according to the color corresponding to the first pixel;
and when the areas of the areas where the pigments with the same over-rendering degree are located are larger than the preset area, processing the over-rendered areas.
In one possible implementation, when the rendering module 304 processes the over-rendered area, it is configured to:
and performing texture rendering again on the over-rendered area in a relative layout mode.
The mass data loading and optimized rendering device for the GIS water environment 3D map obtains the coordinate value of the map at the preset position in the current database through the obtaining module, and the calculating module determines the three-dimensional geometric frame of the 3D map according to the coordinate value; according to map data in a current database and a 3D map solid geometric frame, a creating module creates an LOD; according to map data in a current database, a rendering module performs texture rendering in each grid in the LOD, performs over-rendering detection on the 3D map in the texture rendering process, processes the over-rendered area, and reconstructs the processed 3D map to obtain a 3D target map. According to the invention, the autonomous optimization rendering and the excessive rendering real-time dynamic adjustment of massive map data are realized by adopting the cooperation of the CPU and the GPU, the data storage and scheduling service capability in the processing process is improved, the drawing efficiency of the 3D map of the GIS water environment is improved, and the problem of pause or delay in front-end rendering and loading in the prior art is solved. The real-time rendering calculation is realized, so that a user can display rendering results in real time while operating the terminal, the rendering operation can be performed in real time on the cloud server, the consistent experience of browsing and operation of real-time cross-platform and cross-browser is achieved, the problems that massive three-dimensional model data cannot run at a Web end and the requirement on the performance of the terminal is high are effectively solved, and the whole process data access service capability is improved. The method also carries out excessive rendering detection on the 3D map in the texture rendering process, processes the excessively rendered area, reconstructs the processed 3D map, prevents too slow rendering operation, avoids wasting CPU and GPU resources, enables the CPU and GPU resources to be used for constructing and improving the 3D map of the GIS water environment to the maximum extent, and further improves the drawing efficiency. .
Fig. 4 is a schematic diagram of a terminal according to an embodiment of the present invention. As shown in fig. 4, the terminal 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. The processor 40 executes the computer program 42 to implement the steps of the above-mentioned embodiments of the method for loading and optimally rendering the mass data of the 3D map under the GIS water environment, for example, steps 101 to 104 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules/units 301 to 304 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units, which are stored in the memory 41 and executed by the processor 40 to implement the present invention. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the terminal 4. For example, the computer program 42 may be divided into the functions of the modules/units 301 to 304 shown in fig. 3.
The terminal 4 may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is only an example of a terminal 4 and does not constitute a limitation of the terminal 4 and may include more or less components than those shown, or combine certain components, or different components, e.g., the terminal may also include input output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or a memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk provided on the terminal 4, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 41 may also include both an internal storage unit of the terminal 4 and an external storage device. The memory 41 is used for storing computer programs and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the method of the embodiments of the present invention may also be implemented by instructing related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the embodiments of the method for loading mass data of the 3D map under the GIS water environment and optimizing the rendering may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media excludes electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A mass data loading and optimized rendering method for a 3D map of a GIS water environment is characterized by comprising the following steps:
obtaining coordinate values of a map of preset positions in a current database, and determining a 3D map solid geometric frame according to the coordinate values, wherein the preset positions are a plurality of boundary positions comprising map data of all water environments;
creating an LOD according to the map data in the current database and the 3D map solid geometric frame;
performing texture rendering in each mesh in the LOD according to map data in the current database; during rendering, the CPU loads the map data corresponding to each grid according to the current resource data, and the GPU renders the loaded map data;
and performing excessive rendering detection on the 3D map in the texture rendering process, processing an excessively rendered area, and reconstructing the processed 3D map to obtain a 3D target map.
2. The method for loading and optimally rendering the mass data of the 3D map under the GIS water environment according to claim 1, wherein the step of obtaining the coordinate values of the map at the preset position in the current database comprises the following steps:
detecting whether a new map record is added in the database;
and when a new map record is added to the database, obtaining the coordinate value of the map at the preset position in the current database of the newly added map record.
3. The method for loading and optimizing the rendering of the mass data of the 3D map under the GIS water environment according to claim 1, wherein the creating of the LOD according to the map data in the current database and the 3D map solid geometric frame comprises:
carrying out gridding segmentation on the 3D map solid geometric frame according to the map data in the current database to obtain an LOD model comprising a plurality of grids;
and performing rasterization processing on each grid in the LOD model to obtain the LOD.
4. The method for loading and optimally rendering the mass data of the 3D map under the GIS water environment according to claim 3, wherein the step of performing gridding segmentation on the 3D map solid geometric frame according to the map data in the current database to obtain an LOD model comprising a plurality of grids comprises the following steps:
and according to the map data in the current database, taking the power of 2 as a calculation unit, and carrying out meshing segmentation on the 3D map solid geometric frame in a pyramid mode to obtain an LOD model comprising a plurality of meshes.
5. The method for loading and optimally rendering the mass data of the 3D map under the GIS water environment according to any one of claims 1 to 4, wherein the step of performing texture rendering in each grid in the LOD according to the map data in the current database comprises the following steps:
acquiring current resource data in a terminal, wherein the current resource data comprises electric quantity of the terminal, CPU operation resources, CPU storage space and rendering operation resources of a GPU;
the CPU takes the map data in the current database as a UI object to be processed according to the current resource data, and loads the map data on a corresponding grid in the LOD in a linear layout mode to obtain a plurality of polygons;
the CPU sends the polygons and the map data corresponding to each polygon to the GPU;
and the GPU carries out texture rendering on the corresponding polygon according to the map data.
6. The method for loading and optimally rendering the mass data of the 3D map under the GIS water environment according to claim 5, wherein the steps of performing excessive rendering detection on the 3D map and processing an excessively rendered area in the texture rendering process comprise:
in the process of texture rendering, acquiring the color corresponding to the currently rendered pixel in the 3D map;
detecting whether the color corresponding to each pixel is consistent with a preset color or not; the preset color is a color corresponding to excessive rendering;
when the color corresponding to the first pixel is consistent with the color in the preset colors, determining that the first pixel is excessively rendered; wherein the first pixel is any one pixel in the 3D map;
determining an excessive rendering degree according to the color corresponding to the first pixel;
and when the areas of the areas where the pigments with the same excessive rendering degree are located are larger than a preset area, processing the excessive rendering areas.
7. The method for loading and optimally rendering the mass data of the 3D map under the GIS water environment according to claim 6, wherein the step of processing the over-rendered area comprises the following steps:
and re-performing texture rendering on the over-rendered area in a relative layout mode.
8. The utility model provides a massive data loading and optimization of GIS water environment 3D map render device which characterized in that includes:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring coordinate values of a map of a preset position in a current database, and the preset position comprises a plurality of boundary positions of map data of all water environments;
the calculation module is used for determining a 3D map solid geometric frame according to the coordinate values;
the creation module is used for creating LOD according to the map data in the current database and the 3D map solid geometric frame;
a rendering module, configured to perform texture rendering within each mesh in the LOD according to the map data in the current database; during rendering, the CPU loads the map data corresponding to each grid according to the current resource data, and the GPU renders the loaded map data;
and the rendering module is also used for carrying out excessive rendering detection on the 3D map in the texture rendering process, processing an excessively rendered area, and reconstructing the processed 3D map to obtain a 3D target map.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the method for loading and optimizing rendering of mass data of the 3D map of the GIS water environment according to any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for loading mass data and optimizing rendering of the 3D map of the GIS water environment according to any one of claims 1 to 7.
CN202210689240.1A 2022-06-16 Mass data loading and optimal rendering method for GIS water environment 3D map Active CN115239895B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210689240.1A CN115239895B (en) 2022-06-16 Mass data loading and optimal rendering method for GIS water environment 3D map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210689240.1A CN115239895B (en) 2022-06-16 Mass data loading and optimal rendering method for GIS water environment 3D map

Publications (2)

Publication Number Publication Date
CN115239895A true CN115239895A (en) 2022-10-25
CN115239895B CN115239895B (en) 2024-07-05

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016472A1 (en) * 2006-06-12 2008-01-17 Google Inc. Markup Language for Interactive Geographic Information System
CN102214368A (en) * 2010-04-07 2011-10-12 北京国遥新天地信息技术有限公司 Implementation method of three dimensional full-dimension digital globe
CN103871103A (en) * 2014-04-02 2014-06-18 成都信息工程学院 Three-dimensional real-time rendering method for GIS data
CN110544291A (en) * 2019-09-11 2019-12-06 珠海金山网络游戏科技有限公司 Image rendering method and device
CN114063018A (en) * 2021-11-15 2022-02-18 北京无线电测量研究所 Radar three-dimensional ball display method and system, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016472A1 (en) * 2006-06-12 2008-01-17 Google Inc. Markup Language for Interactive Geographic Information System
CN102214368A (en) * 2010-04-07 2011-10-12 北京国遥新天地信息技术有限公司 Implementation method of three dimensional full-dimension digital globe
CN103871103A (en) * 2014-04-02 2014-06-18 成都信息工程学院 Three-dimensional real-time rendering method for GIS data
CN110544291A (en) * 2019-09-11 2019-12-06 珠海金山网络游戏科技有限公司 Image rendering method and device
CN114063018A (en) * 2021-11-15 2022-02-18 北京无线电测量研究所 Radar three-dimensional ball display method and system, storage medium and electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
. LIANG, D. LIU AND M. ZHOU: "Research on Large Scale 3D Terrain Generation", 014 IEEE 17TH INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE AND ENGINEERING, 29 January 2015 (2015-01-29) *
张桀宁;李帅;: "一种基于顶点纹理的LOD地形渲染算法", 系统仿真学报, no. 07, 5 April 2008 (2008-04-05) *
李尚林;胡夏;刘晓平;: "三维GIS中矢量数据的高效精确渲染方法", 系统仿真学报, no. 05, 8 May 2017 (2017-05-08) *
林鑫: "三维地形的简化与实时渲染技术研究", 中国优秀硕士学位论文全文数据库, 15 May 2021 (2021-05-15) *

Similar Documents

Publication Publication Date Title
US11344806B2 (en) Method for rendering game, and method, apparatus and device for generating game resource file
Cignoni et al. BDAM—Batched Dynamic Adaptive Meshes for high performance terrain visualization
CN107154063B (en) Method and device for setting shape of image display area
CN110211218B (en) Picture rendering method and device, storage medium and electronic device
MX2008015162A (en) Fast reconfiguration of graphics pipeline state.
WO2014105268A1 (en) REORDERING OF COMMAND STREAMS FOR GRAPHICAL PROCESSING UNITS (GPUs)
CN109785417B (en) Method and device for realizing OpenGL cumulative operation
CN106934058B (en) Vector data reading method and system and vector data visualization method and system
JP2015515059A (en) Method for estimating opacity level in a scene and corresponding apparatus
CN113012269A (en) Three-dimensional image data rendering method and equipment based on GPU
CN109697748B (en) Model compression processing method, model mapping processing method, model compression processing device, and storage medium
CN103605506A (en) Graphical user interface resource display method and terminal
KR20110069728A (en) Method, apparatus, and program for displaying an object on a computer screen
CN114494024B (en) Image rendering method, device and equipment and storage medium
US11087511B1 (en) Automated vectorization of a raster image using a gradient mesh with arbitrary topology
RU2680355C1 (en) Method and system of removing invisible surfaces of a three-dimensional scene
CN115315727A (en) Graphics processing unit rendering mode selection system
CN109448123B (en) Model control method and device, storage medium and electronic equipment
CN111950057A (en) Loading method and device of Building Information Model (BIM)
CN110334027B (en) Game picture testing method and device
CN110502305B (en) Method and device for realizing dynamic interface and related equipment
KR20160068204A (en) Data processing method for mesh geometry and computer readable storage medium of recording the same
CN115239895B (en) Mass data loading and optimal rendering method for GIS water environment 3D map
CN115239895A (en) Mass data loading and optimized rendering method for GIS water environment 3D map
CN115861510A (en) Object rendering method, device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20240605

Address after: 518101, 11th Floor, Block A, Haina Baichuan Headquarters Building, No. 6 Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong Province

Applicant after: China Power Construction Ecological Environment Group Co.,Ltd.

Country or region after: China

Address before: M501, 5th Floor, Teaching Building, No. 2, Haoyang Road, Yunlu Community, Daliang Street, Shunde District, Foshan City, Guangdong Province, 528300

Applicant before: China Power Construction (Foshan) Construction Co.,Ltd.

Country or region before: China

GR01 Patent grant