A GIS data visualization method and device based on WebGL

Through Three.js's multi-map adaptation and unified data access, combined with GPU computing, it solves the versatility and data processing problems of products combining WebGL and map engines, realizes diverse expressions and effect interactions of GIS data, and improves development Efficiency and quality of results.

CN112380309BActive Publication Date: 2024-10-22SHENZHEN AEROSPACE SMART CITY SYST TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011322454.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-23
Publication Date
2024-10-22
Estimated Expiration
2040-11-23

AI Technical Summary

Technical Problem

Existing products that combine WebGL with map engines lack versatility and portability in data visualization, cannot fully utilize the freedom and scalability of three-dimensional scenes, and are complex in data processing, increasing development difficulty and time.

Method used

Adopt a multi-map adaptation method based on Three.js, split the Three visualization effect package and each map engine, unify data access and visualization effect templates, support multiple map engines such as ArcGis, MapBox, Cesium, and allow different data formats and rendering methods, using GPU operations to write shaders to achieve beautiful and efficient visualization effects.

Benefits of technology

It achieves high portability and versatility of GIS data visualization, lowers the development threshold, quickly completes visualization effect development, saves development time, and provides rich visualization effects and interactivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112380309B_ABST
    Figure CN112380309B_ABST
Patent Text Reader

Abstract

The present invention relates to a GIS data visualization method and device based on WebGL, including multi-map adaptation based on Three.js: separating the Three visualization effect package from each map engine, and then determining the current map engine type through a general dispatch to obtain the correct effect expression; unified data access: editing a unified data processing method, by judging the data input by the user, matching the corresponding processing method, the processed data will have a unified data format, and at the same time, if the user specifies the rendering method when inputting the data, the data access will have a distinguishing field for determination; visualization effect template: the visualization effect set is divided into eleven major categories, each of which has effects designed for different usage scenarios, and the visualization effect is realized by writing the effect code of the Three scene. The method and device of the present invention can greatly shorten the development cycle of GIS data visualization effects, and at the same time have wide applicability and versatility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visualization technology, and in particular to a GIS data visualization method based on WebGL and a GIS data visualization device based on WebGL. Background Art

[0002] The emergence of WebGL has enabled the rapid development of 3D visualization technology on the Web. Unlike traditional Web3D technologies such as X3D and VRML, WebGL can achieve 3D graphics acceleration and obtain a better rendering effect in most browsers without installing plug-ins. WebGL combines JavaScript with OpenGLES 2.0, so WebGL naturally supports shader programming. The support of shader programming also makes the things that can be displayed on the map richer.

[0003] Currently, products that combine WebGL with map engines often support a single engine. However, considering that the types of map engines currently used by map developers are relatively complex, in order to improve the versatility of this data visualization method, it is necessary to reconstruct the combination of each engine with WebGL to enhance the portability of this method.

[0004] Most of the existing products are two-dimensional charts placed in three-dimensional map scenes for display, but this cannot fully demonstrate the freedom and scalability of three-dimensional scenes. Three-dimensional maps can visualize originally abstract data and fully utilize different dimensions to express data. This requires the use of WebGL technology to convert data into a form that people experience in daily life.

[0005] The data on the map are relatively complex, and most manufacturers will impose restrictions on the data that can be transmitted to their own visualization products, but this will increase the time required to process the data. Summary of the invention

[0006] In view of the above problems, the present invention proposes a GIS data visualization method and device based on WebGL.

[0007] The technical solution of the present invention is to provide a GIS data visualization method based on WebGL, comprising the following steps:

[0008] Multi-map adaptation based on Three.js: Separate the Three visualization effect package from each map engine, and then determine the current map engine type through a general dispatch. You can also freely switch between a flat or spherical map, covering the development environment of most map developers to obtain the correct effect expression;

[0009] Unified data access: edit a unified data processing method, match the corresponding processing method by judging the data input by the user, and the processed data will have a unified data format, so that the subsequent development can have unified data processing, laying the foundation for the template development of visualization effects. At the same time, if the user specifies the rendering method when inputting data, the data access will distinguish the fields for judgment;

[0010] Templated visualization effects: The visualization effect set is divided into eleven categories, each of which contains effects designed for different usage scenarios. The visualization effect is realized by writing the effect code of the Three scene, which can greatly shorten the development cycle of a visualization effect.

[0011] A further technical solution of the present invention is: the multi-map adaptation includes adaptation to three map engines: ArcGis, MapBox, and Cesium.

[0012] A further technical solution of the present invention is: in the unified data access, the data allowed to be accessed include ArcGis service data, JSON data, GeoJSON data and custom data, which solves the user pain point of having to spend a lot of time and energy to process data in the past.

[0013] A further technical solution of the present invention is: in the unified data access, users are allowed to input data including single-value parameters, multi-value parameters and classification parameters, and the data is divided into rendering attributes according to the single-value parameters, multi-value parameters and classification parameters. The rendering attributes include single-value rendering, multi-value rendering and layered rendering. In this way, different rendering methods can be achieved without data processing, which greatly saves development time.

[0014] A further technical solution of the present invention is: the realization of the visualization effect includes writing a shader using GPU computing, including two parts: vertex processing and pixel processing. This method can make the obtained effect more beautiful and efficient.

[0015] The technical scheme of the present invention is: constructing a GIS data visualization device based on WebGL, a multi-map adaptation module based on Three.js, a unified data access module, and a visualization effect template module. The multi-map adaptation module based on Three.js separates the Three visualization effect package from each map engine, and then determines the current map engine type through a general scheduling to obtain the correct effect expression; the unified data access module edits a unified data processing method, and matches the corresponding processing method by judging the data input by the user. The processed data will have a unified data format. At the same time, if the user specifies the rendering method when inputting data, the data access will have a distinguishing field for judgment; the visualization effect template module divides the visualization effect set into eleven major categories, each of which has effects designed for different usage scenarios, and the visualization effect is realized by writing the effect code of the Three scene.

[0016] A further technical solution of the present invention is that the multi-map adaptation in the multi-map adaptation module based on Three.js includes adaptation to three map engines: ArcGis, MapBox, and Cesium.

[0017] A further technical solution of the present invention is that in the unified data access module, the data allowed to be accessed include ArcGis service data, JSON data, GeoJSON data and custom data.

[0018] A further technical solution of the present invention is that in the unified data access module, the user is allowed to input data including single-value parameters, multi-value parameters and classification parameters, and the data is divided into rendering attributes according to the single-value parameters, multi-value parameters and classification parameters, and the rendering attributes include single-value rendering, multi-value rendering and layered rendering.

[0019] A further technical solution of the present invention is that, in the visualization effect template module, the visualization effect implementation includes writing a shader using GPU operations, including two parts: vertex processing and pixel processing.

[0020] The WebGL-based GIS data visualization method and device provided by the present invention have the following improvements and advantages compared with the prior art:

[0021] (1) Strong portability: It can be combined with various geographic engines such as ArcGis, MapBox, and Cesium, and supports various map types such as flat 3D and spherical 3D, with high portability;

[0022] (2) Strong versatility: The present invention distinguishes data formats by points, lines, and surfaces, so that data of the same type can be fully reused, thereby improving the versatility;

[0023] (3) Low usage limit: The present invention has a variety of data access methods, and users do not need to know how to convert data before use, which greatly reduces the development threshold;

[0024] (4) High iteration efficiency: It has a templated development environment, which can quickly complete the development of a new effect through the template of visual effects;

[0025] (5) Rich visualization effects: The effect set is divided into eleven categories, and each category has effects designed for different usage scenarios, which are sufficient to meet most expressions. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the module structure of an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of multi-map adaptation in an embodiment of the present invention;

[0028] Figure 3 This is a schematic diagram of scene fusion in an embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram of access data processing in an embodiment of the present invention;

[0030] Figure 5 Schematic diagram of the classification of three-dimensional visualization effect functions in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The technical solution of the present invention is further described below in conjunction with specific embodiments.

[0032] The specific implementation of the present invention is to provide a GIS data visualization method based on WebGL, comprising the following steps:

[0033] Multi-map adaptation based on Three.js: Separate the Three visualization effect package from each map engine, and then determine the current map engine type through a general dispatch. You can also freely switch between a flat or spherical map, covering the development environment of most map developers to obtain the correct effect expression;

[0034] A preferred implementation manner of the present invention is that the multi-map adaptation includes adaptation to three map engines: ArcGis, MapBox, and Cesium.

[0035] The specific implementation process is: the Three visualization effect package can be used alone as an effect library for a small scene, or it can be combined with a map engine package to express real data on the map. The combination package of each map engine is mainly used as a connection between the map and the effect package, integrating the Three rendering scene with the map scene to achieve scene synchronization. When using this visualization method, users can install the corresponding map combination package as needed. At this time, the visualization effect package will be automatically installed for the user to express the map data; the total scheduling method can also be used to make internal judgments on the geographic engine, and then determine the installation of the package to make the correct expression, such as Figure 2 As shown, the Three visualization package is similar to the fusion method of each map. In this embodiment, the ArcGis geographic engine is mainly introduced. The ArcGis geographic engine will create LayerManager, Scene and OverLayerManager during initialization. The Scene module is the core logic of map rendering, and its key role is to create a rendering loop, such as Figure 3 As shown, the preferred method is to blend the Renderer, Camera and light source in the Three scene with the corresponding attributes in the Scene created by the geographic engine, so as to achieve the effect of scene synchronization. After connecting some attributes shared by the Three visualization package and the map, some expression elements unique to the Three visualization package are added in the basic construction process of the Three scene. Currently, various types of glow effects are added to enhance the expression of the effect on the data.

[0036] Unified data access: edit a unified data processing method, match the corresponding processing method by judging the data input by the user, and the processed data will have a unified data format, so that the subsequent development can have unified data processing, laying the foundation for the template development of visualization effects. At the same time, if the user specifies the rendering method when inputting data, data access will distinguish fields for judgment;

[0037] The preferred implementation mode of the present invention is: in the unified data access, the data allowed to be accessed include ArcGis service data, JSON data, GeoJSON data and custom data, which solves the user pain point that a lot of time and energy were needed to process data in the past.

[0038] A preferred implementation of the present invention is: in the unified data access, users are allowed to input data including single-value parameters, multi-value parameters and classification parameters, and the data is divided into rendering attributes according to the single-value parameters, multi-value parameters and classification parameters. The rendering attributes include single-value rendering, multi-value rendering and layered rendering. In this way, different rendering methods can be achieved without data processing, which greatly saves development time.

[0039] The specific implementation process is: Figure 4 As shown, in the embodiment, in order to improve the user experience, certain optimizations are made in the transmission of the attribute parameters of the effect. The user can decide the rendering mode of the effect in the process of transmitting the attribute parameters. The rendering mode can be divided into single-value rendering, multi-value rendering and layered rendering. The preferred method is to require the user to specify the rendering mode when transmitting the parameters, and to have a distinguishing field in each data for determination, so that different rendering modes can be achieved without data processing.

[0040] Templated visualization effects: The visualization effect set is divided into eleven categories, each of which contains effects designed for different usage scenarios. The visualization effect is realized by writing the effect code of the Three scene, which can greatly shorten the development cycle of a visualization effect.

[0041] The specific implementation process is: Figure 5 As shown, for a visualization method, the most important thing is to look at the number of effects that can be used to express map data. In the embodiment, all effects are divided into eleven categories according to different expression methods, and then further subdivided according to different usage scenarios. The development of effects is mainly based on what will be used in daily projects, and some slightly changed effects are derived. At present, there are many effects for users to choose from in each category, which is enough to meet some normal data expressions.

[0042] A preferred implementation of the present invention is that the realization of the visualization effect includes writing a shader using GPU computing, including two parts: vertex processing and pixel processing. This method can make the obtained effect more beautiful and efficient.

[0043] The specific implementation process is: the visualization effects in the visualization method are all written by shaders, and the shader-related shading operations are all on the GPU, which greatly improves the computing efficiency. It is mainly divided into two parts: one is vertex processing and the other is pixel processing. This programming method also makes the obtained effect more beautiful and efficient. For example, in the particle system classification, each effect will process tens of thousands of particles in real time. If the CPU is used for calculation, the effect will be very slow, but GPU calculation will not have this situation.

[0044] During the specific implementation process, only visual expression in the map may not be able to express the detailed data as clearly as some two-dimensional charts. For this reason, most of the effects support interaction, and users can use different mouse interaction methods to pop up the specific values ​​of the data expressed by the effect. The preferred implementation does not eliminate the advantage of clear data expression of the previous two-dimensional charts, but rather integrates them more harmoniously. In addition, the effects of the method of the present invention are applicable to many scenarios. Not only are different geographic engines compatible with each other, but some geographic engines support both spherical three-dimensional and flat three-dimensional maps, and the effects of this method can also be expressed correctly. Figure 5 As shown, although the current effects are sufficient to meet most of the data expression requirements, the requirements are uncertain, and there will always be some requirements that cannot be found in this effect package. At this time, a templated effect development environment becomes particularly important, and the method of the present invention just provides such an environment for developers. At present, most manufacturers need to start development from the combination of maps and WebGL scenes when developing new effects, but in this method, developers can complete the development of effects by only writing the effect code of the Three scene.

[0045] like Figure 1 As shown, the specific implementation of the present invention is: constructing a GIS data visualization device based on WebGL, a multi-map adaptation module 1 based on Three.js, a unified data access module 2, and a visualization effect template module 3. The multi-map adaptation module 1 based on Three.js separates the Three visualization effect package from each map engine, and then determines the current map engine type through a general scheduling to obtain the correct effect expression; the unified data access module 2 edits a unified data processing method, and matches the corresponding processing method by judging the data input by the user. The processed data will have a unified data format. At the same time, if the user specifies the rendering method when inputting the data, the data access will have a distinguishing field for judgment; the visualization effect template module 3 divides the visualization effect set into eleven categories, each of which has effects designed for different usage scenarios, and the visualization effect is realized by writing the effect code of the Three scene.

[0046] The preferred implementation mode of the present invention is as follows: the multi-map adaptation in the multi-map adaptation module 1 based on Three.js includes the adaptation to three map engines: ArcGis, MapBox and Cesium.

[0047] A preferred implementation manner of the present invention is: in the unified data access module 2, the data allowed to be accessed include ArcGis service data, JSON data, GeoJSON data and custom data.

[0048] A preferred implementation of the present invention is: in the unified data access module 2, the user is allowed to input data including single-value parameters, multi-value parameters and classification parameters, and the data is divided into rendering attributes according to the single-value parameters, multi-value parameters and classification parameters, and the rendering attributes include single-value rendering, multi-value rendering and layered rendering.

[0049] A preferred implementation of the present invention is: in the visualization effect template module 3, the visualization effect realization includes writing a shader using GPU computing, including two parts: vertex processing and pixel processing.

[0050] The present invention provides a WebGL-based GIS data visualization method and device, which can achieve diversified expressions and effect interaction of GIS data visualization; vertex processing and pixel processing of each visualization expression in Shader programming make the obtained effect more beautiful and efficient; synchronization of multiple geographic engines and Three scenes makes the method of the present invention more portable; conversion methods for accessing different data meet the high versatility of the method of the present invention; single-value rendering, multi-value rendering and layered rendering of effects can realize different rendering modes without data processing, greatly saving development time; template construction of template-based development can greatly shorten the development cycle of a visualization effect.

[0051] In this document, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a step, method, or apparatus that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such step, method, or apparatus.

[0052] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.

Claims

1. A GIS data visualization method based on WebGL, characterized in that: include: Multi-map adaptation based on Three.js: Separate the Three visualization effect package from each map engine, and then determine the current map engine type through a general dispatch; Unified data access: edit a unified data processing method, and match the corresponding processing method by judging the data input by the user. The processed data will have a unified data format. At the same time, if the user specifies the rendering method when inputting data, data access will distinguish fields for judgment; Visualization effect template: The visualization effect set is divided into eleven categories, each of which has effects designed for different usage scenarios. The visualization effect is achieved by writing the effect code of the Three scene; The multi-map adaptation includes adaptation to three map engines: ArcGis, MapBox, and Cesium.

2. The WebGL-based GIS data visualization method according to claim 1, characterized in that: In the unified data access, the data allowed to be accessed include ArcGis service data, JSON data, GeoJSON data and custom data.

3. The WebGL-based GIS data visualization method according to claim 1, characterized in that: In the unified data access, the user is allowed to input data including single-value parameters, multi-value parameters and classification parameters, and the data is divided into rendering attributes according to the single-value parameters, multi-value parameters and classification parameters. The rendering attributes include single-value rendering, multi-value rendering and layered rendering.

4. The WebGL-based GIS data visualization method according to claim 1, characterized in that: The realization of the visualization effect includes writing a shader using GPU computing, and the shader includes two parts: vertex processing and pixel processing.

5. A GIS data visualization device based on WebGL, characterized in that: A multi-map adaptation module, a unified data access module, and a visualization effect template module based on Three.js. The multi-map adaptation module based on Three.js separates the Three visualization effect package from each map engine, and then determines the current map engine type through a general dispatch; the unified data access module edits a unified data processing method, and matches the corresponding processing method by judging the data input by the user. The processed data will have a unified data format. At the same time, if the user specifies the rendering method when inputting data, the data access will have a distinguishing field for judgment; the visualization effect template module divides the visualization effect set into eleven categories, each of which has effects designed for different usage scenarios, and the visualization effect is realized by writing the effect code of the Three scene; The multi-map adaptation in the multi-map adaptation module based on Three.js includes adaptation to three map engines: ArcGis, MapBox, and Cesium.

6. The WebGL-based GIS data visualization device according to claim 5, characterized in that: In the unified data access module, the data allowed to be accessed include ArcGis service data, JSON data, GeoJSON data and custom data.

7. The WebGL-based GIS data visualization device according to claim 5, characterized in that: In the unified data access module, the user is allowed to input data including single-value parameters, multi-value parameters and classification parameters, and the data is divided into rendering attributes according to the single-value parameters, multi-value parameters and classification parameters. The rendering attributes include single-value rendering, multi-value rendering and layered rendering.

8. The WebGL-based GIS data visualization device according to claim 5, characterized in that: In the visualization effect template module, the visualization effect implementation includes writing a shader using GPU computing, including two parts: vertex processing and pixel processing.