A Geojson data visualization method and system suitable for high-simulation engine

By using JsonLibrary and Cesium3DTileset materials, and combining them with the Cesium for Unreal plugin to generate CartographicPolygons, the shortcomings of Geojson data visualization in Unreal Engine were resolved, and 3D visualization of geographic data in a high-fidelity engine was achieved.

CN118466910BActive Publication Date: 2024-11-01NANJING NARI WATER RESOURCES & HYDROPOWER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410911035.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-01
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

Existing technologies lack methods for loading and visualizing Geojson data suitable for Unreal Engine, making it difficult to achieve three-dimensional visualization of geographic data and failing to meet the needs of digital twin water conservancy construction.

Method used

The Geojson data is visualized by using the JsonLibrary plugin to read Geojson data, writing and adding Cesium3DTileset materials, and generating CartographicPolygons using the Cesium for Unreal plugin.

Benefits of technology

It enables 3D visualization of Geojson data in Unreal Engine, with the data perfectly matching the Cesium terrain, meeting the geographic data display requirements of a high-fidelity simulation engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118466910B_ABST
    Figure CN118466910B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for visualizing Geojson data suitable for a high-simulation engine, the method comprising: reading Geojson data in an Unreal Engine; writing Cesium3DTileset materials and adding required components; visually drawing Geojson data; the system comprising: a data parsing module, a shader module, and an image drawing module. The present invention uses the Polygons parameter added to the Raster Overlay component to realize drawing polygons, and the Geojson data drawn by the method can perfectly fit the Cesium terrain, realizing the three-dimensional visualization of geographic data in a high-simulation engine, and making up for the defects of the Unreal Engine in the visualization of geographic data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data visualization, and in particular to a Geojson data visualization method and system suitable for a high-simulation engine. Background Art

[0002] Digital twin water conservancy construction cannot be separated from the loading and visualization of geographic spatial data. Unreal Engine, with its powerful rendering and simulation capabilities, has quickly become the mainstream visualization engine for digital twin water conservancy construction. Geojson is a lightweight data format based on JavaScript objects to represent geographic information. It is easy to understand and operate, and the data parsing and generation are very fast and highly readable. It can describe complex geographic shapes and is one of the current mainstream geographic data formats. However, the existing technology lacks a Geojson loading and visualization method that is compatible with the Unreal Engine and based on the GIS data base, making it difficult to achieve three-dimensional visualization of geographic data and difficult to meet the needs of digital twin water conservancy construction in the field of high simulation. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide a Geojson data visualization method suitable for a high-simulation engine; another purpose of the present invention is to provide a Geojson data visualization system suitable for a high-simulation engine.

[0004] Technical solution: The Geojson data visualization method applicable to a high-simulation engine of the present invention comprises the following steps:

[0005] (1) Read Geojson data in Unreal Engine;

[0006] (2) Writing Cesium3DTileset materials and adding required components;

[0007] (3) Visualization of Geojson data.

[0008] Furthermore, it is characterized in that the step (1) comprises:

[0009] (1.1) In the Unreal Engine blueprint, use the LoadJsonFile node of the JsonLibrary plugin to read and store local Geojson data into the form of Unreal Engine strings;

[0010] (1.2) Use the ParObject node to convert the string to the JsonLibraryObject type, and then use the GetValue and CopyToArray nodes to strip the boundary points of the face;

[0011] (1.3) Performing a thinning operation on the boundary points of the peeled surface, that is, selecting and discarding boundary points according to given thinning parameters;

[0012] (1.4) Convert the longitude and latitude coordinates of the boundary points after thinning into Unreal Engine world coordinates and store them in Unreal Engine variables to complete the reading of Geojson data in Unreal Engine.

[0013] Furthermore, the thinning parameter given in step (1.3) is 10, that is, one valid point is selected from 10 adjacent boundary points.

[0014] Furthermore, the step (2) comprises:

[0015] (2.1) Write Cesium3DTileset material instance based on Cesium native material;

[0016] (2.2) In the Unreal Engine Blueprint, use the Add Cesium PolygonRaster Overlay node to dynamically add a Raster Overlay, which is a Tileset component that provides information to the material.

[0017] (2.3) Set the Material Layer Key parameters of the Raster Overlay.

[0018] Furthermore, the Cesium3DTileset material instance in the step (2.1) includes layer assets and mixed assets.

[0019] Furthermore, the layer asset uses the default ML_CesiumRasterOverlay, including 20 values, and the layer name is 0-19, indicating that the rendered Geojson data has a total of 20 colors.

[0020] Furthermore, the hybrid asset includes the writing of material color and rendering boundary.

[0021] Furthermore, in the step (2.3), the value of the Material Layer Key is 0-19, a total of 20.

[0022] Furthermore, the step (3) includes:

[0023] (3.1) Generate a CartographicPolygon using the Blueprint API provided by the Cesium for Unreal plugin;

[0024] (3.2) Set the spline points of CartographicPolygon to the Geojson polygon boundary points read by the JsonLibrary plugin;

[0025] (3.4) Add CartographicPolygon to the Polygons parameter of the Raster Overlay component to complete the visualization of Geojson data.

[0026] The Geojson data visualization system suitable for a high-simulation engine of the present invention comprises:

[0027] Data parsing module: used to parse Geojson data and optimize the algorithm to combine the data with Unreal Engine;

[0028] Shader module: used to build multi-layer material instances, use layer assets and blend assets for material blending, and use convolution algorithms for edge computing;

[0029] Image drawing module: used for Geojson ground drawing, using the Unreal Engine Cesium plug-in to perform block-by-block overlay drawing of Geojson data.

[0030] Beneficial effect: Compared with the prior art, the present invention has the following significant advantages: a GIS data base is constructed based on the Cesium for Unreal plug-in, and the JsonLibrary plug-in is used to perform feature surface analysis on isosurface data in Geojson format, and the boundary points of the polygons are extracted respectively. After thinning operation, the boundary points are converted into Unreal Engine world coordinate points, and are passed to the CartographicPolygon of the Unreal Engine, and then added to the Polygons parameter of the Raster Overlay component to realize the drawing of polygons, and the polygon colors are drawn by writing Tileset materials. The Geojson data drawn by this method can perfectly fit the Cesium terrain, realize the three-dimensional visualization of geographic data in the high-simulation engine, and make up for the defects of the Unreal Engine in the visualization of geographic data. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0032] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0033] The present invention is developed based on Unreal Engine, uses the JsonLibrary plug-in of Unreal Engine as the main tool for loading Geojson geographic data, uses the online terrain data of Cesium for Unreal plug-in as the base to build a three-dimensional geographic scene, uses Cesium3DTileset as the carrier for drawing polygons, and writes material instances based on the Cesium3DTileset material system, and finally realizes the loading of Geojson data and three-dimensional visualization. The flowchart of the Geojson data visualization method suitable for high simulation engine described in the present invention is as follows Figure 1 shown.

[0034] (1) The main steps for reading Geojson data in Unreal Engine are as follows:

[0035] (1.1) In the UE (Unreal Engine) blueprint, use the LoadJsonFile node of the JsonLibrary plugin to read and store local Geojson data in the form of UE strings;

[0036] (1.2) Use the ParObject node to convert the string to the JsonLibraryObject type, and then use the GetValue and CopyToArray nodes to strip the boundary points of the face;

[0037] (1.3) Perform a thinning operation on the boundary points of the peeled surface, that is, select boundary points according to a given thinning parameter. In this example, the thinning parameter given is 10, that is, select one valid point from 10 adjacent boundary points;

[0038] (1.4) Convert the longitude and latitude coordinates of the boundary points after thinning into UE world coordinates and store them in UE variables to complete the reading of Geojson data in UE.

[0039] (2) Cesium3DTileset material writing and required component addition, the main steps are as follows;

[0040] (2.1) Write a Cesium3DTileset material instance based on the Cesium native material MI_CesiumThreeOverlaysAndClipping. The material instance consists of multiple material layers, including layer assets and mixed assets. The layer assets use the default ML_CesiumRasterOverlay. The mixed assets mainly include the material color and the writing of the rendering boundary. The name of the material layer matches the Material Layer Key parameter of the Raster Overlay to determine which Raster Overlay the material layer renders.

[0041] (2.2) In the Unreal Engine Blueprint, use the Add Cesium PolygonRaster Overlay node to dynamically add a Raster Overlay using the Cesium3DTileset as the target.

[0042] (2.3) Set the Material Layer Key parameter of Raster Overlay. In this example, the value of Material LayerKey is 0-19, a total of 20. Similarly, the material layer of Cesium3DTileset should also have 20 values, and the layer name is 0-19, which means that the rendered Geojson data has a total of 20 colors;

[0043] (3) The above steps have matched the material layer to be rendered through the Material LayerKey parameter of Raster Overlay. It is also necessary to set the Polygons property of the Raster Overlay component to complete the visualization of Geojson data. The main steps are as follows:

[0044] (3.1) Generate a CartographicPolygon using the Blueprint API provided by the Cesium for Unreal plugin;

[0045] (3.2) Set the spline points of CartographicPolygon to the Geojson polygon boundary points read by the JsonLibrary plugin;

[0046] (3.3) Add CartographicPolygon to the Polygons parameter of the Raster Overlay component to complete the visualization of Geojson data;

[0047] The Geojson data visualization system suitable for a high-simulation engine of the present invention comprises:

[0048] Data parsing module: used to parse Geojson data and optimize the algorithm, so that the data can be combined with Unreal Engine to improve loading efficiency;

[0049] Shader module: used to build multi-layer material instances, use layer assets and blend assets for material blending, and use convolution algorithms for edge computing;

[0050] Image drawing module: used for Geojson ground drawing, using the Unreal Engine Cesium plug-in to perform block-by-block overlay drawing of Geojson data.

[0051] In an Unreal Engine project based on the Cesium for Unreal plugin, write a Cesium3DTileset material instance, match the material layer in the Tileset material instance with the Material Layer Key parameter of the Raster Overlay (a Tileset component that provides information to the material), then dynamically generate a CartographicPolygon, set the spline points of the CartographicPolygon to the Geojson polygon boundary points read by the JsonLibrary plugin, and finally add the CartographicPolygon to the Polygons parameter of the Raster Overlay component to complete the loading of the Geojson data and visual drawing.

[0052] The Geojson data visualization method and system suitable for Unreal Engine consists of three modules: Geojson data reading, runtime generation of Raster Overlay and CartographicPolygon in blueprint, and visualization of Geojson data. These three modules are all implemented in Unreal Engine, relying on Unreal Engine's JsonLibrary and Cesiumfor Unreal plug-in to load Geojson geographic data in Unreal Engine and perform visualization.

Claims

1. A Geojson data visualization method suitable for a high-simulation engine, characterized in that: The steps include: (1) Read Geojson data in Unreal Engine; (2) Writing Cesium3DTileset materials and adding required components; (3) Visualization of Geojson data; The step (1) comprises: (1.1) In the Unreal Engine blueprint, use the LoadJsonFile node of the JsonLibrary plugin to read and store local Geojson data into the form of Unreal Engine strings; (1.2) Use the ParObject node to convert the string to the JsonLibraryObject type, and then use the GetValue and CopyToArray nodes to strip the boundary points of the face; (1.3) Performing a thinning operation on the boundary points of the peeled surface, that is, selecting and discarding boundary points according to given thinning parameters; (1.4) Convert the longitude and latitude coordinates of the boundary points after thinning into Unreal Engine world coordinates and store them in Unreal Engine variables to complete the reading of Geojson data in Unreal Engine; The thinning parameter given in step (1.3) is 10, that is, one valid point is selected from 10 adjacent boundary points; The step (3) comprises: (3.1) Generate a CartographicPolygon using the Blueprint API provided by the Cesium for Unreal plugin; (3.2) Set the spline points of CartographicPolygon to the Geojson polygon boundary points read by the JsonLibrary plugin; (3.3) Add CartographicPolygon to the Polygons parameter of the Raster Overlay component to complete the visualization of Geojson data.

2. The Geojson data visualization method suitable for a high-simulation engine according to claim 1, characterized in that: The step (2) comprises: (2.1) Write Cesium3DTileset material instance based on Cesium native material; (2.2) In the Unreal Engine Blueprint, use the Add Cesium PolygonRaster Overlay node to dynamically add a Raster Overlay, which is a Tileset component that provides information to the material. (2.3) Set the Material Layer Key parameters of the Raster Overlay.

3. The Geojson data visualization method suitable for a high-simulation engine according to claim 2, characterized in that: The Cesium3DTileset material instance in the step (2.1) includes a layer asset and a blend asset.

4. The Geojson data visualization method suitable for a high-simulation engine according to claim 3, characterized in that: The layer asset uses the default ML_CesiumRasterOverlay, which includes 20 values, and the layer name is 0-19, indicating that the rendered Geojson data has a total of 20 colors.

5. The Geojson data visualization method suitable for a high-simulation engine according to claim 3, characterized in that: The blending asset includes the material color and the rendering bounds.

6. The Geojson data visualization method suitable for a high-simulation engine according to claim 2, characterized in that: In the step (2.3), the value of the Material Layer Key is 0-19, a total of 20.

7. A Geojson data visualization system suitable for a high-simulation engine, characterized in that: include: Data parsing module: used to parse Geojson data and optimize the algorithm to combine the data with Unreal Engine; Shader module: used to build multi-layer material instances, use layer assets and blend assets for material blending, and use convolution algorithms for edge computing; Image drawing module: used for Geojson ground drawing, using the Unreal Engine Cesium plug-in to perform block-by-block overlay drawing of Geojson data; Reading Geojson data in Unreal Engine includes: (1.1) In the Unreal Engine blueprint, use the LoadJsonFile node of the JsonLibrary plugin to read and store local Geojson data into the form of Unreal Engine strings; (1.2) Use the ParObject node to convert the string to the JsonLibraryObject type, and then use the GetValue and CopyToArray nodes to strip the boundary points of the face; (1.3) Perform a thinning operation on the boundary points of the peeled surface, that is, select boundary points according to a given thinning parameter; the given thinning parameter is 10, that is, select one valid point from 10 adjacent boundary points; (1.4) Convert the longitude and latitude coordinates of the boundary points after thinning into Unreal Engine world coordinates and store them in Unreal Engine variables to complete the reading of Geojson data in Unreal Engine; Visualization of Geojson data includes: (3.1) Generate a CartographicPolygon using the Blueprint API provided by the Cesium for Unreal plugin; (3.2) Set the spline points of CartographicPolygon to the Geojson polygon boundary points read by the JsonLibrary plugin; (3.3) Add CartographicPolygon to the Polygons parameter of the Raster Overlay component to complete the visualization of Geojson data.