Visualization method and system of large-scale vector data based on Cesium

By preprocessing and slicing the spatial vector data into MVT format, combined with Cesium's rendering engine, dynamically loading and rendering vector tiles, the problem of low loading and rendering of traditional vector data in large-scale geographic information processing is solved. It realizes efficient data transmission and real-time interactiveness.

CN119311909AInactive Publication Date: 2025-01-14CHINA SURVEY SURVEYING & MAPPING TECH

Patent Information

Application Number
CN202411845730.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional vector data loads slowly and renders inefficiently when processing large-scale geographic information, especially when displaying satellite remote sensing images, three-dimensional architectural models, and multi-level geospatial data.

Method used

Using Cesium-based method, the acquired spatial vector data is preprocessed and sliced, converted into multi-level vector tiles in MVT format, and listened to user interaction events to dynamically load and render corresponding tiles, and loaded in advance based on the prediction view browsing range. Tiles for efficiency.

Benefits of technology

It realizes efficient transmission and rendering of large-scale vector data, improves real-time interactivity, reduces the memory and computing burden of the client, and maintains a smooth operation experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311909A_ABST
    Figure CN119311909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of space big data visualization, in particular to a Cesium-based large-scale vector data visualization method and system, and the method comprises the steps: carrying out the preprocessing of obtained space vector data; slicing the preprocessed space vector data to obtain a multi-level vector tile group; wherein all the vector tiles in any hierarchy can be spliced into complete space vector data, the vector tiles in the same hierarchy are equal in size, and the vector tiles in different hierarchies are different in size; monitoring an interaction event of a user, loading the vector tiles at the corresponding positions and the corresponding levels according to the interaction event, and rendering the loaded vector tiles, so as to realize the visualization of the space vector data; interaction events include scaling and translation. By adopting the scheme provided by the invention, high-efficiency transmission of large-scale vector data and high-efficiency scheduling of vector tiles can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of spatial big data visualization, and specifically to a visualization method for large-scale vector data based on Cesium, a visualization system for large-scale vector data based on Cesium, a processor, and a machine-readable storage medium. Background Art

[0002] With the advent of the big data era, geographic information systems have been widely used in smart cities, land and resources management, traffic monitoring and other fields. However, due to the huge amount of data, traditional vector data faces problems such as slow loading and low rendering efficiency. Therefore, how to display a large amount of vector data efficiently and in real time has become a key technical problem. At present, two-dimensional map visualization is relatively mature, and common WebGIS tools such as OpenLayers and Leaflet have good performance in displaying small and medium-sized vector data. However, when processing satellite remote sensing images, three-dimensional building models and multi-level geospatial data, its performance is obviously poor. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a large-scale vector data visualization method, system, processor and machine-readable storage medium based on Cesium to improve the transmission efficiency and dynamic loading efficiency of large-scale vector data.

[0004] In order to achieve the above-mentioned objectives, the first aspect of the present application provides a visualization method for large-scale vector data based on Cesium, the method comprising: preprocessing the acquired spatial vector data; slicing the preprocessed spatial vector data to obtain a multi-level vector tile group; wherein all vector tiles in any level can be spliced ​​into complete spatial vector data, the vector tiles in the same level are of equal size, and the vector tiles in different levels are of different sizes; monitoring user interaction events, loading vector tiles of corresponding positions and corresponding levels according to the interaction events, and rendering the loaded vector tiles, thereby realizing visualization of the spatial vector data; the interaction events include zooming and panning.

[0005] Based on the first aspect, in an embodiment of the present application, the data format of the acquired spatial vector data includes Shapefile, PostGIS and GeoJSON; the preprocessing of the acquired spatial vector data includes: converting the spatial vector data in the Shapefile, PostGIS or GeoJSON format into spatial vector data in the MVT format.

[0006] Based on the first aspect, in an embodiment of the present application, the steps for realizing visualization of spatial vector data include: parsing MVT data, extracting geometric data and attribute data therein, and after the extraction is completed, rendering the geometric data as a Cesium layer, and drawing each geometric object as a Cesium Primitive object, thereby realizing visualization of spatial vector data.

[0007] Based on the first aspect, in an embodiment of the present application, the method further includes: caching vector tiles loaded within the last N times, where N is not greater than a maximum number of vector tiles.

[0008] Based on the first aspect, in an embodiment of the present application, the method also includes: for any level, setting a position number for all vector tiles in the level, the position number including the row number and column number of the vector tile; loading the vector tiles of the corresponding position and level according to the interaction event includes: determining the level of the vector tiles to be scheduled according to the zoom level of the current interaction view area; calculating the position number of the vector tiles to be scheduled according to the range of the current interaction view area; loading the vector tiles of the corresponding level and corresponding position number.

[0009] Based on the first aspect, in an embodiment of the present application, the method further includes: predicting a user's view browsing range; loading vector tiles within the predicted view browsing range in advance, and caching them.

[0010] In the second aspect, the present application provides a large-scale vector data visualization system based on Cesium, the system comprising: a preprocessing module for preprocessing the acquired spatial vector data; a slicing module for slicing the preprocessed spatial vector data to obtain a multi-level vector tile group; wherein all vector tiles in any level can be spliced ​​into complete spatial vector data, the vector tiles in the same level are of equal size, and the vector tiles in different levels are of different sizes; a Cesium module for monitoring user interaction events, and loading vector tiles of corresponding positions and corresponding levels according to the interaction events, and rendering the loaded vector tiles, thereby realizing visualization of spatial vector data; the interaction events include zooming and panning.

[0011] Based on the second aspect, in an embodiment of the present application, the system further includes: a prediction module, used to predict the user's view browsing range; a preloading module, used to load in advance the vector tiles within the predicted view browsing range, and cache them.

[0012] In a third aspect, the present application provides a processor configured to execute the above-mentioned Cesium-based large-scale vector data visualization method.

[0013] In a fourth aspect, the present application provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configure the processor to execute the above-mentioned Cesium-based large-scale vector data visualization method.

[0014] The technical solution provided by this application has at least the following beneficial effects: (1) Efficient data transmission and rendering: MVT is a slicing format with smaller data volume. It can transmit vector data in blocks, reducing the bandwidth required to load the entire dataset. Compared with traditional vector data formats, it allows on-demand loading, which is particularly suitable for large-scale datasets.

[0015] (2) Improved real-time interactivity: Using MVT for data rendering can effectively enhance the real-time interactivity of large-scale vector data in Cesium. In large-scale map or scene browsing, MVT can dynamically load and display the vector information of each tile, allowing users to obtain instant visual feedback when zooming, panning, and other operations, maintaining a smooth operating experience.

[0016] (3) Reduce client pressure: Unlike traditional vector formats, the MVT format has been preprocessed into tile data during transmission. The client only needs to process a smaller tile range, reducing the memory and computing burden. When Cesium combines MVT to load large-scale vector data, it can better optimize memory usage and improve the stability of large-scale data processing.

[0017] In summary, Cesium-based big data vector data visualization technology can efficiently acquire, parse, convert, render and interact with MVT vector tile data. Combined with Cesium's three-dimensional engine, it provides the ability to visualize large-scale vector data in three-dimensional earth scenes.

[0018] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings: Figure 1 The flowchart of the visualization method of large-scale vector data based on Cesium in an embodiment of the present application is schematically shown; Figure 2 The structure block diagram of the visualization system of large-scale vector data based on Cesium in the embodiment of the present application is schematically shown; Figure 3The internal structure diagram of the computer device according to the embodiment of the present application is schematically shown.

[0020] Description of Reference Numerals 1-preprocessing module; 2-slicing module; 3-Cesium module; 4-prediction module; 5-preloading module; A02-network interface; A03-internal memory; A04-display screen; A05-input device; A06-non-volatile storage medium; B01-operating system; B02-computer program. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0022] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), such directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0023] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application. Example

[0024] A visualization method for large-scale vector data based on Cesium, such as Figure 1 The method shown comprises: S1. Preprocessing the acquired spatial vector data; Specifically, the vector data to be published is imported into GeoServer. The supported data formats include Shapefile, PostGIS, GeoJSON, etc. Special tools or libraries (such as Mapbox's tippecanoe or Mapshaper) are used to convert the spatial vector data in Shapefile, PostGIS or GeoJSON format into spatial vector data in MVT format.

[0025] S2. Slice the preprocessed spatial vector data to obtain a multi-level vector tile group; wherein all vector tiles in any level can be spliced ​​into complete spatial vector data, the vector tiles in the same level are of equal size (to avoid affecting the smoothness of loading tiles), and the vector tiles in different levels are of different sizes; Specifically, use GeoServer to provide storage and slicing services, generate pbf data format, and publish MVT services. In Maputnik, add the MVT service published in GeoServer as a data source. Through the data source configuration, fill in the MVTURL provided by GeoServer into the data source configuration. Configure the corresponding style for the loaded MVT data source, including line color, width, fill style, etc. at different zoom levels. After completing the style configuration, export the style as a JSON file.

[0026] The above-mentioned vector tile group is a vector slice data group with a multi-level pyramid structure. Exemplarily, the 0th layer is a single tile containing all elements. Usually, the pixel size of this tile is 256 in length and width, which includes the entire vector space range; the 1st layer is divided into four tiles. Although the size of each tile is still 256*256, the image resolution at this time is twice that of the 0th layer. By analogy, dividing the entire space vector data into tiles of different levels does not mean that the more levels the better, because the number of pictures increases exponentially with the increase of levels. When the number of levels is too large, the number of tiles will also increase dramatically, which will also cause pressure on data storage.

[0027] S3. Listen to the user's interactive events, load the vector tiles of the corresponding position and the corresponding level according to the interactive events, and render the loaded vector tiles, thereby realizing the visualization of the spatial vector data; the interactive events include zooming and panning.

[0028] Exemplarily, in this embodiment, the Cesium module can be used to realize the visualization of spatial vector data, so as to achieve the purpose of efficiently loading large-scale vector data and improving resolution support. However, Cesium mainly supports 3dtile and GeoJSON, and Cesium cannot directly support the loading of mvt data services. Therefore, in this embodiment, the MVTImageryProvider is first used to request the corresponding level of vector tile data from the server, and the data format obtained is a pbf file (see step S2), and the geometric objects and attribute data therein are extracted. After the extraction is completed, the geometric data is rendered as a Cesium layer, and each geometric object (point, line, surface) is drawn as a Cesium Primitive object. When the user moves, zooms or rotates the camera, these tiles are dynamically loaded and rendered according to the different tile levels and positions requested.

[0029] Specifically, in order to accurately calculate the corresponding vector tiles when loading vector tile data, in this embodiment, for any level, a position number is set for all vector tiles in the level, and the position number includes the row number and column number of the vector tile; an index relationship is established between the storage address of the vector tile and the position number, that is, the physical address of the vector tile can be located through the position number of the vector tile.

[0030] Loading vector tiles of corresponding positions and corresponding levels according to interactive events includes: determining the level of the vector tiles that need to be scheduled according to the zoom degree of the current interactive view area (according to the user's zoom operation in the interactive view area); calculating the position number of the vector tiles that need to be scheduled according to the range of the current interactive view area; loading vector tiles of corresponding levels and corresponding position numbers.

[0031] Furthermore, the method also includes: caching the vector tiles loaded in the last N times, where N is not greater than the maximum number of vector tiles, and an exemplary N may be 5 to 10, to avoid excessive cache usage and affect the smoothness of system operation. However, appropriate caching of some data reduces the time of reloading vector tile data and improves the speed of vector tile display.

[0032] Furthermore, the method further includes: predicting the user's view browsing range; loading in advance the vector tiles within the predicted view browsing range, and caching them.

[0033] The scheduling of vector tiles should also make full use of the computer's optimization mechanism and the browser's cache mechanism. During the interactive operation process, the user's request for data is often triggered after the user's operation. In this embodiment, based on the user's usage habits and the current movement trajectory in the interactive view area, the user's next operation can be predicted, and the data of the predicted view browsing range can be requested in advance and saved in the (cache) memory to reduce the time for data acquisition and improve the display speed. The efficiency of reading and writing data in the memory is much greater than the reading and writing speed of the mechanical hard disk, so during the scheduling process, try to avoid frequent operations on the mechanical hard disk. For areas that are repeatedly operated, store them locally in the form of file cache or memory cache to reduce interactive operations with the server or hard disk and shorten the scheduling time. Example

[0034] This application provides a large-scale vector data visualization system based on Cesium, such as Figure 2 As shown, the system includes: a preprocessing module 1, which is used to preprocess the acquired spatial vector data; a slicing module 2, which is used to slice the preprocessed spatial vector data to obtain a multi-level vector tile group; wherein all vector tiles in any level can be spliced ​​into complete spatial vector data, the vector tiles in the same level are equal in size, and the vector tiles in different levels are different in size; a Cesium module 3, which is used to monitor the user's interaction events, and load the vector tiles of the corresponding position and the corresponding level according to the interaction events, and render the loaded vector tiles, thereby realizing the visualization of the spatial vector data; the interaction events include zooming and panning.

[0035] Specifically, the system further includes: a prediction module 4, which is used to predict the user's view browsing range; and a preloading module 5, which is used to load in advance the vector tiles within the predicted view browsing range and cache them.

[0036] The method described in the above embodiment 1 can be implemented by using the visualization system provided in this embodiment.

[0037] The Cesium-based large-scale vector data visualization system also includes a processor and a memory. The above-mentioned preprocessing module 1, slicing module 2, Cesium module 3, prediction module 4 and preloading module 5 are all stored in the memory as program units, and the processor executes the above-mentioned program modules stored in the memory to implement corresponding functions.

[0038] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the visualization method of large-scale vector data based on Cesium can be realized by adjusting the kernel parameters.

[0039] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0040] An embodiment of the present application provides a storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned Cesium-based large-scale vector data visualization method is implemented.

[0041] In this embodiment, a computer device is also provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 3 As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, a visualization method of large-scale vector data based on Cesium is implemented. The display screen A04 of the computer device can be a liquid crystal display or an electronic ink display, and the input device A05 of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0042] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0043] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0044] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0045] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0046] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0047] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0048] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0049] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0050] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0051] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A visualization method for large-scale vector data based on Cesium, characterized in that: The method comprises: Preprocessing the acquired spatial vector data; Slice the preprocessed spatial vector data to obtain a multi-level vector tile group; wherein all vector tiles in any level can be spliced ​​into complete spatial vector data, the vector tiles in the same level are equal in size, and the vector tiles in different levels are different in size; Monitor user interaction events, load vector tiles of corresponding positions and corresponding levels according to the interaction events, and render the loaded vector tiles to achieve visualization of spatial vector data; the interaction events include zooming and panning.

2. The visualization method of large-scale vector data based on Cesium according to claim 1, characterized in that: The data formats of the acquired spatial vector data include Shapefile, PostGIS and GeoJSON; the preprocessing of the acquired spatial vector data includes: The spatial vector data in the Shapefile, PostGIS or GeoJSON format is converted into spatial vector data in the MVT format.

3. The visualization method of large-scale vector data based on Cesium according to claim 2 is characterized in that: The step of realizing visualization of spatial vector data comprises: Parse the MVT data and extract the geometric data and attribute data. After the extraction is completed, the geometric data is rendered as a Cesium layer, and each geometric object is drawn as a Cesium Primitive object, thereby realizing the visualization of spatial vector data.

4. The visualization method of large-scale vector data based on Cesium according to claim 1, characterized in that: The method further comprises: Cache the vector tiles that have been loaded in the last N times, where N is not greater than the maximum number of vector tiles.

5. The visualization method of large-scale vector data based on Cesium according to claim 1, characterized in that: The method further comprises: For any level, set position numbers for all vector tiles in the level, the position numbers including the row number and column number of the vector tile; Loading vector tiles at corresponding positions and levels according to interaction events includes: Determine the level of the vector tiles that need to be scheduled according to the zoom level of the current interactive view area; According to the range of the current interactive view area, calculate the position number of the vector tile that needs to be scheduled; Load the vector tile of the corresponding level and the corresponding position number.

6. The visualization method of large-scale vector data based on Cesium according to claim 1, characterized in that: The method further comprises: Predict the user's view range; Preload and cache the vector tiles within the predicted view browsing range.

7. A large-scale vector data visualization system based on Cesium, characterized in that: The system comprises: A preprocessing module, used for preprocessing the acquired spatial vector data; The slicing module is used to slice the preprocessed spatial vector data to obtain a multi-level vector tile group; wherein all vector tiles in any level can be spliced ​​into complete spatial vector data, the vector tiles in the same level are equal in size, and the vector tiles in different levels are of different sizes; The Cesium module is used to monitor user interaction events, load vector tiles of corresponding positions and corresponding levels according to the interaction events, and render the loaded vector tiles to achieve visualization of spatial vector data; the interaction events include zooming and panning.

8. The Cesium-based large-scale vector data visualization system according to claim 7, characterized in that: The system further comprises: Prediction module, used to predict the user's view browsing range; The preloading module is used to load the vector tiles within the browsing range of the predicted view in advance and cache them.

9. A processor, characterized in that: The method is configured to execute the Cesium-based large-scale vector data visualization method as described in any one of claims 1 to 6.

10. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the Cesium-based large-scale vector data visualization method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Vector data online calculation method and device

    CN112395445A

  • Vector drawing method and device based on vector tile data and electronic equipment

    CN116737852A

  • Multi-level tile joint large-scale digital twinning scene construction method

    CN116842121A

  • A system for processing geodata for efficient presentation and visualization

    DE202022100309U1

Cited By

  • Dynamic efficient construction method for large-scale data contour line and color filling map

    CN120689462A