Method and device for lightening highway guardrail model based on Cesium

By extracting the three-dimensional baseline polylines and feature points of highway guardrails and combining them with Cesium to establish a dynamic modeling module for the guardrails, the performance problem caused by the large amount of guardrail BIM model data was solved, lightweight processing of the guardrail model was achieved, and the system performance and efficiency were improved.

CN120805281AActive Publication Date: 2025-10-17中铁长江交通设计集团有限公司
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202511315799.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-10-17
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

When processing highway guardrail BIM models, existing technologies involve huge amounts of data, resulting in increased network requests and memory consumption, which seriously affects the performance of the BIM+GIS platform.

Method used

By extracting the three-dimensional baseline polylines and feature points of the highway guardrail, a BIM model of the guardrail and posts is established. The Cesium module is used to build a dynamic modeling module for the guardrail posts and posts, thereby constructing a lightweight model of the guardrail posts and posts, reducing the amount of data and improving system performance.

Benefits of technology

This reduces the amount of data processed for the guardrail model, saves network requests and memory consumption, and improves the operating efficiency and performance of the modeling system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805281A_ABST
    Figure CN120805281A_ABST
Patent Text Reader

Abstract

The invention discloses an expressway guardrail model lightweight method and device based on Cesium, and belongs to the technical field of expressway modeling. Building a guardrail BIM model based on the three-dimensional reference polyline, and building a stand column BIM model based on the three-dimensional reference polyline feature points; establishing a guardrail upright column primitive model for the guardrail BIM model and the upright column BIM model, and establishing a guardrail upright column lightweight model package based on the guardrail upright column primitive model; establishing a handrail dynamic modeling module based on Cesium; and calling the guardrail stand column lightweight model package and the handrail dynamic modeling module, constructing a road guardrail lightweight BIM + GIS application scene, and carrying out lightweight processing on the guardrail stand column and the handrail. The processing data volume of the guardrail model can be reduced, the network request and memory consumption are saved, the modeling system performance is improved, the processing time is reduced, the operation efficiency is improved, and the model lightweight is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of highway modeling, and particularly relates to a highway guardrail model lightweight method and device based on Cesium. BACKGROUND

[0002] GIS technology lays the foundation for the digital development of traffic construction, and BIM technology brings rich construction information and accurate geometric information in the design, construction and operation stages of traffic infrastructure, so a virtual traffic model attached with a large amount of traffic information can be created based on BIM+GIS technology, and the BIM+GIS platform is the basis of intelligent traffic.

[0003] The original BIM model contains rich design attribute data and geometric data, and the data volume is huge, so lightweight processing is required before entering the GIS platform to support the smooth operation of various business systems and mobile terminals. Highway guardrails are different from road and bridge main BIM models, and the guardrails have the characteristics of long mileage, fine internal structure, single geometric shape and a large number of repetitions. The mainstream GIS products process the road and bridge main body and safety guardrail BIM models in the same way, that is, the BIM model is first converted into a Mesh surface, and then a 3dtiles (3D tile) service is published to realize BIM lightweight. Due to the huge volume of the guardrail model, the processing time of this conventional method for processing the guardrail BIM model is relatively long, which seriously affects the performance of the BIM+GIS platform and reduces the usability of the BIM model.

[0004] Taking a highway with a scale of 100 kilometers as an example, if only the left and right main lines are estimated, the highway guardrail line type volume reaches 400 kilometers. The guardrail unit length is calculated as 2m, each guardrail unit contains a railing and a column, and the Mesh triangular net of each guardrail unit is 50. Therefore, the number of Mesh triangular nets of the 100-kilometer highway guardrail is 400x1000÷2x50=10,000,000, which is far more than the road and bridge BIM data volume. The number of Mesh triangular nets of the conventional 100-kilometer highway and bridge BIM model is 30~80 million. When the conventional GIS platform processes and applies the highway BIM object, the network request and memory consumption increase significantly due to the huge volume of the guardrail BIM data, which reduces the system performance. Highway guardrail BIM model lightweight has become a key technical problem that needs to be solved in BIM+GIS application. SUMMARY

[0005] In view of the above problems, the application provides a highway guardrail model lightweight method and device based on Cesium. The method can reduce the processing data volume of the guardrail model, reduce the processing time, and improve the performance of the modeling system.

[0006] The embodiment of the application provides a highway guardrail model lightweight method based on Cesium, which comprises the following steps: Extracting a three-dimensional reference polyline and feature points of a highway guardrail, establishing a guardrail BIM model based on the three-dimensional reference polyline, and establishing a stand column BIM model based on the three-dimensional reference polyline feature points; Establishing a guardrail stand column primitive model for the guardrail BIM model and the stand column BIM model, and establishing a guardrail stand column lightweight model package based on the guardrail stand column primitive model; Converting the type of the three-dimensional reference polyline to obtain a GeoJSON file, and establishing a guardrail dynamic modeling module based on Cesium; Calling the guardrail stand column lightweight model package and the guardrail dynamic modeling module, constructing a highway guardrail lightweight BIM+GIS application scene, and performing lightweight processing on the guardrail stand column and the guardrail.

[0007] Further, the extracting a three-dimensional reference polyline and feature points of a highway guardrail, establishing a guardrail BIM model based on the three-dimensional reference polyline, comprises the following steps: Extracting a three-dimensional reference polyline of a highway guardrail, and generating a guardrail BIM model by regularly arraying or stretching the three-dimensional reference polyline primitive of the guardrail along the three-dimensional reference polyline; Extracting a highway stand column positioning angle in the guardrail BIM model, and generating a stand column BIM model by arraying a stand column primitive according to the positioning angle; Extracting three-dimensional guide polyline feature points based on the three-dimensional reference polyline, and converting the three-dimensional guide polyline feature points into an shp format.

[0008] Further, the establishing a guardrail stand column primitive model for the guardrail BIM model and the stand column BIM model, and establishing a guardrail stand column lightweight model package based on the guardrail stand column primitive model, comprises the following steps: Establishing a guardrail stand column primitive model, moving the guardrail stand column primitive model to an origin point, and converting the guardrail stand column primitive model into a gltf format file; Importing an shp file basic primitive application instance model to generate a guardrail stand column lightweight model 3dtiles package by slicing.

[0009] Further, the converting the type of the three-dimensional reference polyline to obtain a GeoJSON file, and establishing a guardrail dynamic modeling module based on Cesium, comprises the following steps: Splitting KML file of the three-dimensional reference polyline into single-line type, sharing multi-line attributes of the KML file of the three-dimensional reference polyline by the split KML single line, and exporting a GeoJSON file.

[0010] Constructing a spatial relationship between a guardrail section control point coordinate and a reference line, and constraining a guardrail modeling position and direction; The guardrail guide line is established by offsetting the guardrail reference line node, and the guardrail modeling position is constrained. The offset reference line node coordinates and the guardrail profile feature point two-dimensional coordinate array are input into a PolylineVolumeGeometry interface to generate the highway guardrail geometric object.

[0011] Further, the guardrail guide line is established by offsetting the guardrail reference line node, and the guardrail modeling position is constrained, including: The reference line node is converted from the longitude-latitude-height coordinates into Cartesian3 coordinates in a Cartesian coordinate system; The Cartesian3 coordinates of each node are converted into Cartographic geographic coordinates based on a WGS84 ellipsoid, the height of each node from the ellipsoid surface is obtained, the Cartesian3 coordinates of each node are updated and projected onto the ellipsoid surface; The vector calculation is initialized, the remaining nodes are traversed, and the node forward direction is determined, and the inflection point offset processing is performed on the nodes with changed node direction.

[0012] Further, the inflection point offset processing on the nodes with changed node direction includes: When the node direction changes, an inflection point is added to increase the point density; The cornerDirection vector is unitized, the reciprocal of the area enclosed by the cornerDirection vector and the backward is taken as a scaling ratio scalar, it is determined whether the projection angle of the forward and the backward on the ellipsoid tangent plane at the current position position is greater than or equal to π, and the bias of the left vector is determined; When the projection angle of the forward and the backward on the ellipsoid tangent plane at the current position position is greater than π, the left vector is determined to be outwardly biased; When the projection angle of the forward and the backward on the ellipsoid tangent plane at the current position position is equal to π, the left vector is determined to be inwardly biased; According to the scaling ratio scalar and the left offset, the coordinates of the current position after offset start are calculated.

[0013] Further, the guardrail guide line is established by offsetting the guardrail reference line node, and the guardrail modeling position is constrained, and further includes: The reference frame change and offset are calculated; A 4x4 transformation matrix transform from the East-North-Up reference frame to the WGS84 ellipsoid is constructed with the current input node position as the center; A unit vector in the negative x direction, negativeX, is applied to the transform matrix, which is converted to a west unit vector in the world coordinate system by the multiplyByPointAsVector method; The west and left vectors are projected onto the tangent plane of the ellipsoid, Cartesian2, and the angle between the two projection vectors is calculated based on the positive or negative cross product of the west and left vectors; The scaled point is converted to the world coordinate system based on the angle, the original height of the current position point, and the horizontal and vertical offset distance coordinates calculated from the initialization vector, and the offset coordinate array of the current position point is returned.

[0014] Further, the three-dimensional reference polyline is type-converted to obtain a GeoJSON file, and a barrier dynamic modeling module is established based on Cesium, further comprising: The offset reference line node coordinates and the two-dimensional coordinate array of the guardrail profile feature points are input into the PolylineVolumeGeometry interface using Cesium to generate a highway guardrail geometry object; The highway guardrail geometry object is called, the barrier profile coordinates and the reference line are input, and a barrier model is established.

[0015] Further, the guardrail post lightweight model package and the barrier dynamic modeling module are called to construct a highway guardrail lightweight BIM+GIS application scene, and the guardrail post and the barrier are lightweighted, including: The guardrail post lightweight model of the guardrail post instantiation model package is rendered and configured through Cesium API to realize post GPU instantiation rendering modeling; The corner offset guardrail barrier dynamic modeling module is called in the BIM+GIS application platform to dynamically render the barrier model, achieving barrier lightweighting; The model visibility range is determined through the scene camera frustum, the 3D Tiles clipping plane parameters are dynamically configured, and model dynamic clipping and loading are achieved.

[0016] Based on the same inventive concept, another aspect of the embodiments of the present application also provides a highway guardrail model lightweight device based on Cesium, comprising: The modeling unit is configured to extract a three-dimensional reference polyline and feature points of a highway guardrail, establish a guardrail BIM model based on the three-dimensional reference polyline, and establish a post BIM model based on the feature points of the three-dimensional reference polyline; A model package unit is configured to establish a guardrail post primitive model for the guardrail BIM model and the post BIM model, and establish a guardrail post lightweight model package based on the guardrail post primitive model. A dynamic modeling unit is configured to convert the three-dimensional reference polyline into a GeoJSON file, and establish a guardrail dynamic modeling module based on Cesium. A lightweight unit is configured to call the guardrail post lightweight model package and the guardrail dynamic modeling module, construct a highway guardrail lightweight BIM+GIS application scenario, and perform lightweight processing on the guardrail post and the guardrail.

[0017] The application has the following beneficial effects: based on the above technical solution, the three-dimensional reference polyline and the feature points of the highway guardrail are extracted, the guardrail BIM model and the post BIM model are established based on the three-dimensional reference polyline feature points, the guardrail post primitive model is established for the guardrail BIM model and the post BIM model, and then the guardrail post lightweight model package is established, the BIM model data is processed by the guardrail post lightweight model package, the reference line in the model is identified, and the coordinate direction is filtered. The guardrail dynamic modeling module is established based on Cesium, the guardrail post lightweight model package and the guardrail dynamic modeling module are called, the highway guardrail lightweight BIM+GIS application scenario is constructed, and the guardrail post and the guardrail are processed. Therefore, the data amount of the guardrail model can be reduced, the network request and the memory consumption can be saved, the modeling system performance can be improved, the processing time can be reduced, the running efficiency can be improved, and the model lightweight is realized.

[0018] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by means of the structures set forth in the description and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without any creative effort.

[0020] Figure 1 A flow chart of a highway guardrail model lightweight method based on Cesium is shown; Figure 2 A schematic diagram showing the relationship between the highway guardrail structure and the reference line is shown; Figure 3Figure 2 shows a schematic diagram of the relationship between the highway guardrail structure and components of the present application and the reference line; Figure 4 Figure 3 shows a schematic diagram of the column model structure of the present application; Figure 5 Figure 4 shows a schematic diagram of the guardrail model structure of the present application; Figure 6 Figure 5 shows a schematic diagram of the guardrail profile and control point relationship of the present application; Figure 7 Figure 6 shows a schematic diagram of the scene of the highway guardrail model of the present application; Figure 8 Figure 7 shows a schematic diagram of a Cesium-based highway guardrail model lightweight system of the present application.

[0021] In the figure: 1 - guardrail, 2 - guardrail column, 3 - guardrail reference line, 4 - guardrail guide line. DETAILED DESCRIPTION

[0022] 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 with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein. In the present application, the terms "up", "down", "left", "right", "front", "back", "top", "bottom", "inside", "outside", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate the orientation or positional relationship shown in the drawings.

[0024] The embodiments of the present application provide a Cesium-based highway guardrail model lightweight method, as shown in Figure 1 , comprising: S101: Extracting a three-dimensional reference multi-segment line and feature points of a highway guardrail, establishing a guardrail BIM model based on the three-dimensional reference multi-segment line, and establishing a column BIM model based on the three-dimensional reference multi-segment line feature points; S102: Establishing a guardrail column primitive model for the guardrail BIM model and the column BIM model, and establishing a guardrail column lightweight model package based on the guardrail column primitive model; S103: Type conversion is performed on the three-dimensional reference polyline to obtain a GeoJSON file, and a rail dynamic modeling module is established based on Cesium; S104: A guardrail post lightweight modeling module and a rail dynamic modeling module are called to build a highway guardrail lightweight BIM+GIS application scene, and the guardrail post and the rail are subjected to lightweight processing.

[0025] It should be noted that the highway guardrail model lightweight method based on Cesium in the embodiments of the present specification is generally applied in a server, which can be a cloud server and a local server. The server can be, for example, a notebook computer, a desktop computer, a tablet computer, an all-in-one machine, and the like.

[0026] Specifically, the extraction of the three-dimensional reference polyline and the feature points of the highway guardrail, and the establishment of the guardrail BIM model based on the three-dimensional reference polyline include: The three-dimensional reference polyline of the highway guardrail is extracted, and the guardrail BIM model is generated by regularly arraying or stretching the guardrail three-dimensional reference polyline primitive along the three-dimensional reference polyline; The positioning angle of the highway post in the guardrail BIM model is extracted, and the post primitive array is generated according to the positioning angle to generate the post BIM model; The three-dimensional guide polyline feature points are extracted based on the three-dimensional reference polyline, and the three-dimensional guide polyline feature points are converted into shp format.

[0027] Specifically, referring to Figure 2 and Figure 3 , step S1: using BIM software, extracting highway guardrail reference lines and feature points to guide guardrail modeling.

[0028] It includes S1.1: extracting guardrail reference lines to guide post modeling and rail modeling.

[0029] As shown in Figure 2 and Figure 3 , the BIM software is applied to extract the three-dimensional reference polyline of the highway guardrail and convert it into KML format.

[0030] It should be noted that the Bentley BIM software establishes the guardrail BIM model by applying the three-dimensional reference polyline, that is, the guardrail BIM model is generated by regularly arraying or stretching the guardrail primitive along the three-dimensional reference polyline, the post model is generated by the post primitive array according to its positioning angle attribute, and the guardrail rail model is generated by stretching the primitive section, and the reference line data can be converted into a three-dimensional linear kml format based on the WGS84 coordinate reference according to its coordinate setting.

[0031] S1.2: Extracting reference line feature point coordinates to guide guardrail post instantiation rendering.

[0032] The GIS software is applied to extract the three-dimensional guide multi-segment line feature points according to 2 meters or other standard guardrail lengths, and export as an shp file format.

[0033] It should be noted that the three-dimensional guide multi-segment line is imported into the GIS software, the longitude and latitude coordinates and rotation angle attributes of the feature points are extracted through the specified length extraction point function, and are exported as an shp file. The optional operation is that the corresponding properties of design, construction and operation and maintenance can be added to the specified points by adding attribute fields, so as to enrich the application scenarios.

[0034] In some specific embodiments, the guardrail post primitive model is established for the guardrail BIM model and the post BIM model, and a guardrail post lightweight model package is established based on the guardrail post primitive model, including: The guardrail post primitive model is established, the guardrail post primitive model is moved to the origin and converted into a gltf format file; The shp file basic primitive application instance model is imported to generate a guardrail post lightweight model 3dtiles package through slicing.

[0035] Specifically, S2: a guardrail post lightweight model package is constructed by using GIS software, and the guardrail post is lightened.

[0036] S2.1: a post three-dimensional model is established, and a post instantiation rendering basic primitive is constructed.

[0037] As shown in Figure 4 The BIM software is applied to establish a guardrail post primitive gltf format file.

[0038] Specifically, the guardrail post primitive model is established in the BIM software, and is moved to the origin. The gltf format file is converted by the BIM software.

[0039] S2.2: a guardrail post instantiation model package is configured, and a LOD rendering rule is constructed.

[0040] As shown in Figure 5 The Cesiumlab software is applied to import the shp file basic primitive, the guardrail post lightweight model 3dtiles package is generated by applying the instance model slicing function and setting parameters, and the format is i3dm.

[0041] It should be noted that the 3dtiles data is mainly in b3dm and i3dm formats, and the lightweight is realized by the internet streaming service transmission model data. Among them, b3dm is based on the slicing rule to directly convert the model Mesh into small model slices, generate a series of spatial position index files and small model files, and render the model slice file according to the viewport position from the server, and independently render, only through limiting the memory usage to control the model loading performance, and the fine model in small scene is easy to cause stuttering; i3dm is an instantiation model based on the rendering characteristics of GPU, which only occupies a model primitive Mesh data amount in GPU card, and realizes model rendering batch copy based on other instance positions, rotation angle, scale and other parameters, instead of independent rendering of each object, compared with b3dm format, for specific large batch of same models such as guardrails and columns, it can significantly reduce the pressure on GPU, and further improve the modeling system performance.

[0042] S2.2.1: Configure the LOD model package. Modify the meta.json file in the LOD model template folder, and the model LOD is divided into 11 levels, the first level is set to 2 pixels, and the second to eleventh level is set to the gltf file in the meta.json file directory.

[0043] S2.2.2: Generate instance model package. Apply cesiumlab software to perform instance slicing, input file selects shp file in S1.2, LOD model selects LOD model package in S2.2.1, angle is set to shp file angle attribute field, scale is set to 1:1, and elevation is set to shp file Z elevation attribute field. After setting, the guardrail column 3dtiles data package is generated.

[0044] In some specific embodiments, the type conversion of the three-dimensional reference polyline obtains a GeoJSON file, and a guardrail dynamic modeling module is established based on Cesium, including: The KML file of the three-dimensional reference polyline is split into single-line type, the split KML single line shares the multi-line attribute of the KML file of the three-dimensional reference polyline, and a GeoJSON file is exported.

[0045] The method further includes: The spatial relationship between the guardrail profile control point coordinates and the reference line is constructed, and the position and direction of the guardrail modeling are constrained; The guardrail guide line is established by offsetting the guardrail reference line node, and the modeling position of the guardrail is constrained; The reference line node is converted from the longitude, latitude and height coordinates to the Cartesian3 coordinates in the Cartesian coordinate system; Convert the Cartesian3 coordinates of each node to Cartographic coordinates based on the WGS84 ellipsoid, obtain the height of each node from the ellipsoid surface, update the Cartesian3 coordinates of each node and scale the projection to the ellipsoid surface; Initialize vector calculation, iterate through the remaining nodes and determine the direction of the node, and process the inflection point offset for the nodes whose direction changes.

[0046] When the node direction changes, increase the inflection point to improve the point density; Unitize the cornerDirection vector, and use the reciprocal of the area enclosed by the cornerDirection vector and the backward as the scaling ratio scalar to determine whether the projection angle of forward and backward on the ellipsoid tangent plane at the current position position is greater than or equal to π, and determine the bias of the left vector; When the projection angle of forward and backward on the ellipsoid tangent plane at the current position position is greater than π, determine that the left vector is outwardly biased; When the projection angle of forward and backward on the ellipsoid tangent plane at the current position position is equal to π, determine that the left vector is inwardly biased; According to the scaling ratio scalar and the left offset, calculate the coordinates start after the offset of the current position.

[0047] Calculate the reference frame change and offset; Centered on the current input node position, construct a 4x4 transformation matrix transform from the East-North-Up reference frame to the WGS84 ellipsoid; Apply the unit vector negativeX in the negative x direction to the transform matrix, and convert the transform matrix to the west unit vector in the world coordinate system by the multiplyByPointAsVector method; Calculate the projection vectors Cartesian2 of west and left vectors at the current position position and the tangent plane of the ellipsoid, and calculate the angle angle between the two projection vectors according to the positive and negative of the cross product value of west and left vectors; Through the multiplyByPoint method, based on the angle, the original height height of the current position point, the horizontal and vertical offset distance coordinates calculated by the initialization vector, convert the scaled point to the world coordinate system, and return the coordinate array of the offset of the current position point.

[0048] The offset reference line node coordinates and the guardrail profile feature point two-dimensional coordinate array are input into the PolylineVolumeGeometry interface to generate the highway guardrail geometry object.

[0049] The highway guardrail geometry object is called, the rail profile coordinates and the reference line are input, and the rail model is established.

[0050] Specifically, S3: develop a Cesium-based rail dynamic modeling module to achieve lightweight guardrail modeling.

[0051] Among them, S3.1: convert the reference line to a single line, provide the guardrail modeling direction and coordinate data.

[0052] The KML three-dimensional reference polyline is converted into a line segment type using GIS software, and exported as a GeoJSON file.

[0053] It should be noted that the guardrail reconstruction requires calculation of the reference line forward direction, inflection point and offset direction, and requires continuous line segments. The reference line file may contain multi-line data composed of multiple single lines, which may cause reconstruction to be interrupted. To ensure that each data represents only one continuous reference line, the calculation of the reference line is a basic data acquisition method in this modeling and is not described in detail in this application.

[0054] The KML file obtained in S1.1 is imported into GIS software, and the multi-line data is split into single-line type. The split single line shares the original multi-line attribute, and is exported as a GeoJSON file.

[0055] S3.2: Build the spatial relationship between the rail profile control point coordinates and the reference line to constrain the rail modeling position and direction.

[0056] As shown in Figure 6 , the guardrail rail section control point coordinates are extracted, and the column origin point is determined, i.e. the offset relationship between the reference line and the feature point envelope rectangle bottom midpoint.

[0057] It should be noted that the guardrail contour profile polygon is imported into CAD software. Under the premise of maintaining the shape of the guardrail profile, the number of profile connection feature points is minimized to reduce the calculation complexity of the guardrail model reconstruction in the Cesium platform, and the two-dimensional coordinates of each feature point in the tangent plane projection are obtained and exported. Since the guardrail reference line is extracted based on the column bottom origin point, not the actual layout position of the guardrail, in order to ensure the reconstruction accuracy of the guardrail in space, the reference line path nodes need to be offset adjusted. The horizontal and vertical offset amount between the feature point envelope rectangle bottom midpoint and the column origin point is calculated to determine the final offset value [x, y] of each node.

[0058] S3.3: Establish a rail guide line by offsetting the guardrail reference line nodes to constrain the rail modeling position.

[0059] like Figure 3 As shown in the figure, the Cesium geometry object, coordinate conversion API and other APIs are applied, and the vector operation, projection conversion, coordinate conversion and matrix transformation interfaces provided by Cesium are used to achieve the overall offset of the guardrail baseline.

[0060] Taking a piece of data in the GeoJSON file generated by S3.1 as an example, the node offset processing flow is explained in detail.

[0061] S3.3.1: Coordinate transformations.

[0062] Converts baseline nodes from longitude, latitude, height coordinates to Cartesian3 coordinates (x, y, z) in the Cartesian coordinate system.

[0063] S3.3.2: Fit the ellipsoidal surface.

[0064] Convert the Cartesian3 coordinates of each node to geographic coordinates (Cartographic) based on the WGS84 ellipsoid, and obtain the height of each node from the ellipsoid surface.

[0065] Update the Cartesian3 coordinates of each node so that they are scaled and projected onto the ellipsoid surface.

[0066] S3.3.3: Initialization vector calculation.

[0067] Let the first node be the current position, and the second node be the forward position, nextPosition.

[0068] Calculate the forward unit vector forward (from position to nextPosition), the backward vector backward (the opposite direction of forward), the unit normal surfaceNormal of the tangent plane of the current position on the WGS84 ellipsoid, and the left vector (the outer product of forward and surfaceNormal).

[0069] Record the current node height h0 and the forward node height h1, copy position to the previous position, and update position to the corresponding coordinate of nextPosition.

[0070] S3.3.4: Traverse the remaining nodes.

[0071] Start traversing from the second node to the second-to-last node, and repeat steps S3.3.5 to S3.3.9.

[0072] S3.3.5: Determine the forward direction.

[0073] Update nextPosition to the next node of the current node.

[0074] If position and nextPosition coordinates are the same, skip the current node and re-execute the steps of S3.3.5 from the next node.

[0075] Recalculate the forward and surfaceNormal vectors, and calculate the corner direction unit vector cornerDirection (the sum of the forward and backward vectors).

[0076] Calculate the unit projection vectors of the forward and backward vectors on the tangent plane normal (surfaceNormal), and determine whether it is a corner.

[0077] If the absolute value of the dot product of the two vectors is not 1, it indicates that the node direction changes, and a corner needs to be added. Execute the steps of S3.3.6; otherwise, it indicates that the node advances along a straight line. Execute the steps of S3.3.8.

[0078] S3.3.6: Handle corner offset.

[0079] When the node direction changes, to ensure the natural transition of the guardrail, a corner needs to be added to increase the point density.

[0080] Unitize the cornerDirection vector, and use the reciprocal of the area enclosed by cornerDirection and backward as the scaling ratio scalar to determine whether the projection angle of forward and backward on the tangent plane of the ellipsoid at the current position position is greater than or equal to π, to determine whether the left vector is outward or inward.

[0081] When the projection angle of forward and backward on the tangent plane of the ellipsoid at the current position position is greater than π, it is determined that the left vector is outward; When the projection angle of forward and backward on the tangent plane of the ellipsoid at the current position position is equal to π, it is determined that the left vector is inward; According to the scaling ratio scalar and the left offset, calculate the coordinates start after the current position offset.

[0082] S3.3.7: Update the back vector.

[0083] previousPosition and its corresponding height h0, current offset position start and current position corresponding height h1, as input data in turn to execute S3.3.8 step, after the calculation is completed to update left, backward vector.

[0084] Using the new left and scaling scalar, update the calculation of back position offset coordinates previousPosition.

[0085] S3.3.8: Calculate the reference frame transformation and offset.

[0086] With the current input node position as the center, construct a 4x4 transformation matrix transform from the East-North-Up (East-North-Up) reference frame to the WGS84 ellipsoid.

[0087] Apply the negative x direction unit vector negativeX (-1, 0, 0) to the transform matrix, and convert it to the west unit vector west in the world coordinate system by the multiplyByPointAsVector method.

[0088] Calculate the projection vectors Cartesian2 of west and left vectors at the current position position and the tangent plane of the ellipsoid, and calculate the angle angle between the two projection vectors according to the positive and negative of the cross product value of west and left vectors.

[0089] Using the multiplyByPoint method, based on angle, the original height height of the current position point, the horizontal and vertical offset distance coordinates (x, 0, y) obtained by S3.3.3, the scaled point is converted to the world coordinate system, and the coordinate array of the current position point after offset is returned.

[0090] If called by S3.3.7, S3.3.10, do not execute the update of copying the current position coordinates to the back position previousPosition.

[0091] S3.3.9: Update node position.

[0092] Update position to nextPosition coordinates, and update height h0 and h1 to the next bit.

[0093] If the current node index is less than the second last node, return to S3.3.5 for further processing.

[0094] S3.3.10: Output node offset result.

[0095] After repeating the steps of S3.3.8 once for the last node position position and corresponding height h1, output the Cartesian3 coordinate array of all offset guardrail reference line nodes.

[0096] S3.4: Apply Cesium modeling API to build the guardrail model.

[0097] Pass the offset reference line node coordinates and guardrail profile feature point 2D coordinate array into the PolylineVolumeGeometry interface to generate the highway guardrail geometry object.

[0098] S3.4.1: Call the modeling API and input the guardrail profile coordinates and reference line to build the guardrail model.

[0099] Use the PolylineVolumeGeometry interface to create the guardrail geometry object, pass the reference line offset nodes (Cartesian3 coordinate array) obtained in S3.3 into the polylinePositions attribute to define the central path of the geometry object; adjust the 2D projection coordinates of the guardrail profile feature points extracted in S3.2, translate the envelope rectangle center point to (0, 0), and pass the adjusted coordinate array into the shapePositions attribute as the guardrail profile shape description.

[0100] S3.4.2: Configure the corner transition parameter to ensure smooth transition.

[0101] Select the default Rounded corner style through the cornerType attribute to ensure smooth transition of the guardrail at the corner.

[0102] S3.5: Optimize the guardrail modeling process to improve modeling performance. Apply the Cesium geometry instance API to define the geometry object and combine the view frustum visibility range to asynchronously and dynamically add the reconstructed guardrail.

[0103] Render within the camera's viewable range and do not render outside the range.

[0104] It should be noted that the Primitive primitive API is the key to the guardrail reconstruction, and the material and display condition attribute values are configured through the GeometryInstance instance to optimize the rendering effect. Directly loading the benchmark line data of hundreds of kilometers for guardrail reconstruction will occupy a large amount of CPU resources, causing map rendering to be stuck. In order to improve performance, the camera frustum is used to dynamically calculate the required guardrail, and the asynchronous attribute is set to realize background asynchronous reconstruction. The data is processed in batches and asynchronously, and multiple Webworker processes are enabled to realize parallel computing, which can improve the speed of guardrail reconstruction calculation and the smoothness of display. At the same time, the reconstruction process is encapsulated by modular functions, which can improve efficiency and flexibility and facilitate reuse in different scenarios.

[0105] S3.5.1: Configure the camera distance parameter of the viewport to dynamically control the rendering quality of the guardrail and reduce GPU overhead.

[0106] Specifically, the GeometryInstance API provided by Cesium is used to create, and the guardrail geometric object generated in S3.4 is passed into the geometry attribute; in the attributes, the color attribute is used to set the color and transparency of the guardrail to achieve custom material effect; the distanceDisplayCondition attribute is used to control the visible range of the guardrail to ensure that the instance is only rendered within the specified distance to reduce GPU rendering overhead.

[0107] S3.5.2: Configure the camera frustum parameters to dynamically control the rendering range of the guardrail and further reduce GPU overhead.

[0108] Specifically, the boundary sphere corresponding to each benchmark line obtained in S3.3 is calculated, the current camera frustum parameters are obtained, the near plane, left plane, and upper and lower planes are kept at their default settings, the distance between the far plane and the camera is adjusted to 5000 meters, and a custom frustum is constructed to limit the reconstruction range of the guardrail rendering.

[0109] Based on the computeVisibility parameter of the frustum cullingVolume, the position relationship between the boundary sphere and the frustum space is calculated: when the boundary sphere is located in the intersection or contains the frustum range and has not been loaded, the corresponding guardrail benchmark line is executed in S3.5.3; when the boundary sphere is completely outside the frustum and has been loaded, the scene performs an unloading operation to remove the corresponding primitive object and release resources.

[0110] S3.5.3: Enable multi-batch asynchronous execution, optimize the modeling order of the guardrail according to the viewport range and distance, and reduce memory overhead.

[0111] Specifically, the geometry instances obtained within the frustum range are transmitted into the Primitive collection of geometry instances in batches. The shader description is set through the appearance parameter to determine the material rendering mode of the geometry instance. The core is to set the asynchronous attribute to true, so that Cesium will execute the guardrail reconstruction task asynchronously according to the size of each instance array, so as to perform calculation in the background and avoid blocking the main thread. Optional operation: set the releaseGeometryInstances attribute to true to release the memory occupied by the geometry instance after the loading is completed, thereby reducing the memory occupation.

[0112] S3.6: encapsulate the guardrail modeling module parameters to improve ease of use.

[0113] The guardrail offset distance, reference line data, maximum visible distance range of the guardrail, and two-dimensional coordinates of the feature points are taken as input parameters, and the PrimitiveCollection primitive data collection is taken as output data, so as to encapsulate the guardrail reconstruction function, facilitate calling, and simplify the data processing process.

[0114] In some specific embodiments, the guardrail post lightweight modeling package and the guardrail dynamic modeling module are called to construct a highway guardrail lightweight BIM+GIS application scene, and the guardrail post and the guardrail are subjected to lightweight processing, including: The guardrail post lightweight model of the guardrail post instantiation model package is rendered and configured through the Cesium API, so as to realize the post GPU instantiation rendering modeling; The guardrail model is dynamically rendered by calling the inflection point offset guardrail dynamic modeling module in the BIM+GIS application platform, so as to realize the lightweight of the guardrail; The model visible range is determined through the scene camera frustum, and the 3D Tiles clipping plane parameters are dynamically configured, so as to realize the dynamic clipping and loading of the model.

[0115] Based on the same inventive concept, another aspect of the embodiments of the present application also provides a highway guardrail model lightweight device based on Cesium, which is shown in Figure 8 , and includes: The modeling unit 201 is configured to extract a three-dimensional reference polyline and feature points of a highway guardrail, establish a guardrail BIM model based on the three-dimensional reference polyline, and establish a post BIM model based on the feature points of the three-dimensional reference polyline; The model package unit 202 is configured to establish a guardrail post primitive model for the guardrail BIM model and the post BIM model, and establish a guardrail post lightweight model package based on the guardrail post primitive model; The dynamic modeling unit 203 converts the three-dimensional reference polyline into a GeoJSON file through type conversion, and establishes a guardrail dynamic modeling module based on Cesium; The lightweight unit 204 is configured to call a guardrail post lightweight model package and the guardrail dynamic modeling module, and construct a highway guardrail lightweight BIM+GIS application scene to perform lightweight processing on the guardrail post and the guardrail.

[0116] The following will be described in detail in the effect verification of the highway guardrail model lightweight method in the present application.

[0117] For example, referring to Figure 7 , 10 complex highway BIM+GIS scenes are rendered, including roadbed and pavement, bridge, and highway guardrail BIM models. In the scene, the conventional method of full-amount b3dm slicing and the method of the present application are used to load the guardrail through guardrail post GPU instantiation rendering and guardrail GIS dynamic modeling. The rendering indicators of the two loading methods are compared and tested comprehensively, including request number, resource occupation, request completion time, GPU existing occupation, and rendering frame rate.

[0118] The resource consumption of the conventional method and the method of the present application in different scenes is shown in Table 1. The total size of the guardrail model loaded by the method of the present application is much smaller than that of the conventional method in all scenes, and the data resource size is reduced by more than 98%. Small data volume not only effectively reduces the bandwidth pressure of the server, but also significantly improves the transmission efficiency, especially suitable for low network bandwidth or high concurrency demand application scenarios.

[0119] Table 1

[0120] In terms of data request completion time, the performance of the method of the present application is better than that of the conventional method in all scenes.

[0121] Although in some scenes (such as scenes 1, 4, 5, and 7), the request number of the method of the present application is slightly higher than that of the conventional method, the data resource amount of a single request is greatly reduced, which shows the advantage of granularity optimization. In other scenes (such as scenes 9 and 10), the request number is roughly the same, but due to its smaller resource size and shorter completion time, the increase in request number is reasonable and acceptable. If the request number, request resource size, and completion time are calculated by the weight of 0.05, 0.5, and 0.45 in the calculation of optimization rate, the average optimization rate of 10 scenes is 84%.

[0122] Based on the above 10 scene perspectives, simultaneously load three-dimensional terrain, orthographic image data, and other related BIM models of highway engineering (pavement, bridge, tunnel, slope, etc.), for evaluating the memory occupation in real use scenarios. The specific test data of each scene is shown in Table 2, the average memory occupation of the guardrail is reduced from 785 Mb to 147.2 Mb, and the average memory overhead is reduced by 72%.

[0123] Table 2

[0124] In the standard test environment, the above 10 complex highway scenes are still selected, and the view frustum culling technique is used to optimize the loading and rendering of remote 3D Tiles data, ensuring that only the necessary data within the view range is loaded, avoiding additional burden on rendering performance from irrelevant areas. Test results show that in ordinary screens with a refresh rate of 90Hz or below, the frame rate (FPS) of the optimized web rendering can reach the maximum allowed by the device.

[0125] To further verify the optimization effect, a screen supporting a high refresh rate of 190Hz is selected for performance testing. The display frame rate is tested in the same 10 scenes, unit: FPS, and the evaluation results are shown in Table 3. The average frame rate of "ordinary slicing" is 143.1 FPS, and after optimization by "the method of the present application", it is increased to 183.6 FPS, an increase of 40.5 FPS, and the frame rate smoothness is improved by about 28.3%.

[0126] Table 3

[0127] The present application generates a lightweight model of highway guardrails by combining the advantages of i3dm instantiation technology and Cesium GIS modeling API technology. Compared with the mainstream GIS product which slices the highway guardrail as a normal BIM model, the present application can significantly reduce GPU memory overhead and graphics card pressure, while reducing network requests.

[0128] In the example, a certain 100-kilometer highway is taken as an example: the guardrail model 3D Tiles data package is reduced from the original 6.5GB to 345MB under "the method of the present application", of which the column model data package is 338MB and the guardrail benchmark GeoJSON data is 7MB. The "ordinary slicing" generates a b3dm model that takes 12 hours, while the "method of the present application" generates an i3dm column that takes only 20 minutes. The number of files increases from 786 of "ordinary slicing" to 181901 of "the method of the present application", further refining the data granularity and reusing degree.

[0129] The above examples are only used to illustrate the technical solutions of the present application, but not to limit the same; although the present application has been described in detail with reference to the foregoing examples, it should be understood by those of ordinary skill in the art that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A Cesium-based lightweight method for highway guardrail models, characterized in that: include: Extracting three-dimensional reference polylines and feature points of highway guardrails, establishing a guardrail BIM model based on the three-dimensional reference polylines, and establishing a column BIM model based on the feature points of the three-dimensional reference polylines; Establishing a guardrail column primitive model for the guardrail BIM model and the column BIM model, and establishing a guardrail column lightweight model package based on the guardrail column primitive model; Performing type conversion on the three-dimensional reference polyline to obtain a GeoJSON file, and establishing a railing dynamic modeling module based on Cesium; Call the guardrail post lightweight model package and railing dynamic modeling module to build a highway guardrail lightweight BIM+GIS application scenario and perform lightweight processing on guardrail posts and railings; The guardrail column primitive model is established for the guardrail BIM model and the column BIM model, and the guardrail column lightweight model package is established based on the guardrail column primitive model, including: Establishing a guardrail column primitive model, moving the guardrail column primitive model to an origin and converting it into a gltf format file; Import the shp file basic element application example model to slice and generate the guardrail column lightweight model 3dtiles package; The three-dimensional reference polyline is converted into a GeoJSON file, and a railing dynamic modeling module is established based on Cesium, including: Split the multi-line data of the KML file of the 3D datum polyline into single line type. The split KML single line shares the multi-line attributes of the LML file of the 3D datum polyline and exports the GeoJSON file. Construct the spatial relationship between the coordinates of the railing section control points and the baseline to constrain the railing modeling position and direction; Among them, the guardrail guide line is established by offsetting the guardrail baseline node to constrain the guardrail modeling position; Pass the offset baseline node coordinates and the two-dimensional coordinate array of the guardrail profile feature points into the PolylineVolumeGeometry interface to generate a highway guardrail geometry object.

2. The method according to claim 1, characterized in that The step of extracting the three-dimensional reference polyline and feature points of the highway guardrail and establishing the guardrail BIM model based on the three-dimensional reference polyline includes: Extract the 3D datum polyline of the highway guardrail, and generate the guardrail BIM model along the 3D datum polyline in a regular array or by stretching the 3D datum polyline element of the guardrail; Extracting the highway column positioning angle in the guardrail BIM model, and generating a column BIM model by performing column element array according to the positioning angle; Extracting three-dimensional guide polyline feature points based on the three-dimensional reference polyline, and converting the three-dimensional guide polyline feature points into a shp format.

3. The method according to claim 1, characterized in that By offsetting the guardrail baseline node, you can establish the guardrail guide line and constrain the guardrail modeling position, including: Convert the baseline nodes from latitude and longitude coordinates to Cartesian3 coordinates in the Cartesian coordinate system; Convert the Cartesian3 coordinates of each node to the geographic coordinates Cartographic based on the WGS84 ellipsoid, obtain the height of each node from the ellipsoid surface, update the Cartesian3 coordinates of each node and scale the projection to the ellipsoid surface; Initialize vector calculation, traverse the remaining nodes and determine the node's forward direction, and perform inflection point offset processing for nodes whose direction changes.

4. The method according to claim 3, characterized in that The inflection point offset processing for the node whose direction has changed includes: When the node direction changes, adding inflection points increases the point density; Normalize the cornerDirection vector, use the inverse of the area enclosed by the cornerDirection vector and the backward vector as the scaling factor scalar, determine whether the angle between the projections of forward and backward on the tangent plane of the ellipsoid at the current position is greater than or equal to π, and determine the direction of the left vector. When the included angle between the projections of forward and backward on the tangent plane of the ellipsoid at the current position is greater than π, the left vector is determined to be outwardly deflected. When the included angle between the forward and backward projections on the tangent plane of the ellipsoid at the current position is equal to π, determine the inward deviation of the left vector; Calculate the offset coordinates of the current position, start, based on the scaling factor scalar and the left offset.

5. The method according to claim 3, characterized in that By offsetting the guardrail baseline node, the guardrail guide line is established to constrain the guardrail modeling position, which also includes: Calculate reference frame changes and offsets; Construct a 4x4 transformation matrix transform from the east-north-up reference frame to the WGS84 ellipsoid, centered at the current input node position. Apply the negative x-direction unit vector negativeX to the transform matrix, and convert the transform matrix to the west unit vector west in the world coordinate system through the multiplyByPointAsVector method; Calculate the Cartesian2 projection of the west and left vectors at the current position onto the tangent plane of the ellipsoid, and calculate the angle between the two projection vectors based on the sign of the cross product of the west and left vectors. The multiplyByPoint method converts the scaled point to the world coordinate system based on the angle, the original height of the current point, and the horizontal and vertical offset distance coordinates calculated by the initialization vector, and returns the offset coordinate array of the current point.

6. The method according to claim 1, characterized in that The three-dimensional reference polyline is converted into a GeoJSON file, and a railing dynamic modeling module is established based on Cesium, which also includes: Use Cesium to pass the offset baseline node coordinates and the guardrail profile feature point 2D coordinate array into the PolylineVolumeGeometry interface to generate the highway guardrail geometry object; The highway guardrail geometric object is called, the guardrail section coordinates and the baseline are input, and the guardrail model is established.

7. The method according to claim 1, characterized in that The guardrail column lightweight model package and railing dynamic modeling module are used to build a highway guardrail lightweight BIM+GIS application scenario, and the guardrail columns and railings are lightweighted, including: Use the Cesium API to render the guardrail post lightweight model in the guardrail post instance model package, and implement GPU instanced rendering modeling of the post. By calling the dynamic modeling module of the inflection point offset guardrail in the BIM+GIS application platform, the guardrail model is dynamically rendered to achieve lightweight guardrails; The model's visible range is determined by the scene camera's view cone, and the 3D Tiles clipping plane parameters are dynamically configured to achieve dynamic model clipping and loading.

8. A Cesium-based lightweight device for highway guardrail models, characterized in that: include: A modeling unit is used to extract three-dimensional reference polylines and feature points of highway guardrails, establish a guardrail BIM model based on the three-dimensional reference polylines, and establish a column BIM model based on the feature points of the three-dimensional reference polylines; A model package unit is used to establish a guardrail column primitive model based on the guardrail BIM model and the column BIM model, and to establish a guardrail column lightweight model package based on the guardrail column primitive model; A dynamic modeling unit converts the three-dimensional reference polyline into a GeoJSON file and establishes a railing dynamic modeling module based on Cesium; The lightweight unit is used to call the guardrail post lightweight model package and the railing dynamic modeling module, build a lightweight BIM+GIS application scenario for highway guardrails, and perform lightweight processing on guardrail posts and railings.

Citation Information

Patent Citations

  • Lightweight display method and system for mass data BIM model

    CN112084556A

  • Method for building design and management system of construction organization of three-dimensional railway

    CN112347215A

  • BIM model component category-level lightweight method and system

    CN113936114A

  • LOD-based BIM model lightweight construction and display method

    CN114283231A

  • Digitization and standardization platform for highway infrastructure and method thereof

    CN116089556A