Drawing-based model display method, device, equipment and medium

By automatically parsing the boundary coordinates of drawings to derive coordinate system codes and structured processing of style information, the problems of coordinate recognition errors and style loss when converting CAD drawings to GIS systems are solved, realizing the automatic and accurate overlay of engineering drawings and 3D reality models and the lossless persistence of style information.

CN122863710BActive Publication Date: 2026-11-27JIANGSU YUNSHENG INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611282224.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-11-27
Estimated Expiration
2046-08-24

AI Technical Summary

Technical Problem

Existing technologies for converting CAD drawings into GIS systems suffer from problems such as reliance on manual coordinate system identification which is prone to errors, severe loss of native CAD styles, fragmented processes, and low levels of automation. These issues make it difficult to achieve accurate overlay and lossless persistence of style information without human intervention.

Method used

By automatically parsing the boundary coordinates of the drawings to derive the coordinate system code, a spatial database file is generated. After removing the constraints of the database file, a style storage field is added to realize the structured processing of style information, which is finally overlaid and displayed with the 3D real scene model.

Benefits of technology

It enables the automatic and accurate overlay of engineering drawings and 3D reality models without human intervention, avoiding the loss of original style information, improving processing efficiency and ensuring the complete preservation of style information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122863710B_ABST
    Figure CN122863710B_ABST
Patent Text Reader

Abstract

The application provides a kind of based on drawing model display method, device, equipment and medium, it is related to model display technical field, comprising: obtaining the three-dimensional real scene model of engineering area and corresponding engineering drawing drawing;Based on the boundary coordinates of engineering drawing drawing, derive coordinate system encoding, to generate the spatial database file corresponding to engineering drawing drawing;After releasing the field constraint mechanism of spatial database file, new style storage field is added, to utilize style storage field to the style information contained in spatial database file is structured, obtains structured spatial database file;The structured spatial database file is superimposed with three-dimensional real scene model and is displayed.The application realizes the automatic accurate superposition of engineering drawing drawing and three-dimensional real scene model under the condition of no manual intervention, and avoids the loss of original style information in engineering drawing drawing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model display technology, and in particular to a method, apparatus, device and medium for displaying models based on drawings. Background Technology

[0002] In the fields of civil engineering and infrastructure construction, the fusion and analysis of two-dimensional computer-aided design (CAD) drawings and three-dimensional reality models (such as earthwork volume calculation) is crucial. However, existing technologies have three major shortcomings when converting CAD drawings to Geographic Information System (GIS) systems: First, coordinate system identification relies on manual labor and is prone to errors: CAD drawings usually lack EPSG (European Petroleum Survey Group) metadata, and in domestic surveying practice, there is a common engineering habit of reversing the X-axis (North distance) and Y-axis (East distance); existing processes mostly rely on manual conversion tools such as QGIS (Quantum GIS), which can easily lead to translational deviations of tens of meters. Second, the original CAD style is severely lost: the traditional conversion to GIS formats such as Shapefile (SHP, a commonly used vector geographic data exchange format) can only extract geometric vectors. The core expressive elements such as color, line width, and text size in the original CAD drawing are all lost, resulting in a messy and disorganized drawing after overlay. Third, the process is fragmented and the degree of automation is low: file parsing, coordinate transformation and service publishing require switching between multiple systems and rely on manual intervention, which makes it impossible to form an efficient and coherent data pipeline.

[0003] In summary, existing technologies have limitations in achieving automatic and accurate identification of CAD drawing coordinate systems, lossless and persistent restoration of original styles, and a fully automated closed-loop process from drawing parsing to GIS service publishing without human intervention. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a model display method, device, equipment and medium based on drawings, which realizes the automatic and accurate overlay of engineering drawings and three-dimensional real scene models without human intervention, and avoids the loss of original style information in engineering drawings.

[0005] In a first aspect, the present invention provides a model display method based on drawings, comprising: Obtain a 3D reality model of the engineering area and the corresponding engineering drawings; The coordinate system encoding is derived from the boundary coordinates of the engineering drawings to generate the spatial database file corresponding to the engineering drawings. After removing the field constraint mechanism of the spatial database file, a new style storage field is added to perform structured processing on the style information contained in the spatial database file, so as to obtain a structured spatial database file. The structured spatial database file is overlaid with a 3D reality model for display.

[0006] In one implementation, deriving coordinate system encoding based on the boundary coordinates of engineering drawings includes: Based on the first boundary coordinates of the engineering drawing, outlier points are identified in the coordinate points contained in the engineering drawing to obtain the set of valid coordinate points after removing outliers. Based on the second boundary coordinates in the set of valid coordinate points, the zone code corresponding to the engineering drawing is extracted. The zone code is the zone number of the coordinate system used in the engineering drawing. Based on the segmentation code, a coordinate system code matching the generated process drawing is used.

[0007] In one implementation, the zone code corresponding to the engineering drawing is extracted based on the second boundary coordinates in the set of valid coordinate points, including: Regular matching is performed on the second boundary coordinates in the set of valid coordinate points to identify the coordinate numerical characteristics of the east and north distance coordinates in the second boundary coordinates. Based on the coordinate numerical characteristics, determine whether the east distance coordinate value and the north distance coordinate value in the second boundary coordinate system are reversed; If so, then the coordinate axes of the second boundary are corrected. Extract the zone code corresponding to the engineering drawing from the second boundary coordinates after coordinate axis correction.

[0008] In one implementation, generating a spatial database file corresponding to the engineering drawing includes: Using coordinate system encoding as the source coordinate system parameter, the set of valid coordinate points corresponding to the engineering drawing is transformed from the source coordinate system to the target coordinate system, resulting in a spatial database file corresponding to the engineering drawing.

[0009] In one implementation, the style information contained in the spatial database file is structured using a style storage field to obtain a structured spatial database file, including: Iterate through the style description field of each graphic element in the spatial database file and extract the color value and physical line width value from the style description field; The color value and physical line width value are written to the style storage field, and the physical line width value in the style storage field is processed by non-linear mapping to obtain the relative line width value, so as to generate a structured spatial database file.

[0010] In one implementation, the structured spatial database file is overlaid with a 3D reality model for display, including: A style description file is generated based on the style storage field in the structured spatial database file, and the style description file is bound to the geographic information layer and published as a geographic information service. Geographic information services are overlaid with 3D reality models for display.

[0011] In one implementation, after overlaying the geographic information service with the 3D reality model, the method further includes: Based on the overlaid geographic information service and 3D reality model, obtain the earthwork volume calculation polygon; The two-dimensional projection range of the polygon is calculated based on the earthwork volume. Elevation points are sampled for the existing terrain corresponding to the three-dimensional real scene model and the design terrain corresponding to the vector elevation of the engineering drawing, respectively, to obtain the set of elevation sampling points for the existing terrain and the set of elevation sampling points for the design terrain. The irregular triangular network corresponding to the current terrain elevation sampling point set and the design terrain elevation sampling point set is generated respectively, so as to determine the total excavation volume and / or the total fill volume based on the irregular triangular network.

[0012] Secondly, the present invention also provides a model display device based on drawings, comprising: The acquisition module is used to acquire a 3D real-world model of the engineering area and the corresponding engineering drawings. The database file generation module is used to derive coordinate system codes based on the boundary coordinates of engineering drawings, and to generate spatial database files corresponding to the engineering drawings. The database file structuring module is used to add a style storage field after the field constraint mechanism of the spatial database file is removed, so as to use the style storage field to perform structuring processing on the style information contained in the spatial database file to obtain a structured spatial database file. The model display module is used to overlay and display structured spatial database files with 3D reality models.

[0013] Thirdly, the present invention also provides an electronic device including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement any of the methods provided in the first aspect.

[0014] Fourthly, the present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement any of the methods provided in the first aspect.

[0015] This invention provides a method, apparatus, device, and medium for displaying models based on drawings. First, a 3D real-world model of the engineering area and the corresponding engineering drawings are acquired. Then, a coordinate system code is derived based on the boundary coordinates of the engineering drawings to generate a spatial database file corresponding to the engineering drawings. Next, after removing the field constraints of the spatial database file, a style storage field is added to structure the style information contained in the spatial database file, resulting in a structured spatial database file. Finally, the structured spatial database file is overlaid on the 3D real-world model for display. This method achieves accurate positioning of engineering drawings in a unified geographic coordinate system by automatically parsing the boundary coordinates of the drawings to derive the coordinate system code. By removing the constraints of the spatial database file and adding a style storage field, the original style information such as color and line width is structured and written into the spatial database file, and then overlaid on the 3D real-world model. This achieves automatic and accurate overlay of engineering drawings and the 3D real-world model without manual intervention, and avoids the loss of original style information.

[0016] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.

[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating a drawing-based model display method provided in an embodiment of the present invention; Figure 2 A schematic diagram of the overall process of a drawing-based model display method provided in an embodiment of the present invention; Figure 3A schematic diagram of a drawing-based model display device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Currently, existing technologies have the following technical problems: coordinate system identification relies on manual labor and is prone to errors, CAD native styles are severely lost, processes are fragmented and have low automation. Based on this, the present invention provides a model display method, device, equipment and medium based on drawings, which realizes automatic and accurate overlay of engineering drawings and three-dimensional real scene models without manual intervention, and avoids the loss of native style information in engineering drawings.

[0022] To facilitate understanding of this embodiment, a detailed description of a drawing-based model display method disclosed in this embodiment of the invention will be provided first. (See [link to relevant documentation]). Figure 1 The diagram shows a flowchart of a drawing-based model display method, which mainly includes the following steps S102 to S108: Step S102: Obtain the 3D real-scene model of the engineering area and the corresponding engineering drawings.

[0023] Among them, the three-dimensional reality model can reflect the current surface morphology of the engineering area at the time of data acquisition; engineering drawings are two-dimensional or three-dimensional vector graphics files generated during the engineering design stage, such as engineering DXF design drawings.

[0024] In one implementation, a 3D reality model file with a specified project number and its accompanying engineering drawing files can be received via user upload or API interface.

[0025] Step S104: Derive coordinate system encoding based on the boundary coordinates of the engineering drawing to generate a spatial database file corresponding to the engineering drawing.

[0026] Boundary coordinates refer to the coordinates (minX, minY, maxX, maxY) of the smallest bounding rectangle vertices in the CAD User Coordinate System (UCS) of a 2D graphic directly read from the underlying code of the engineering drawing, representing the spatial distribution range of the geometric content of the drawing. Coordinate system encoding, i.e., EPSG code (European Petroleum Survey Group code), is generated by registering a combination of elements such as datum planes (e.g., CGCS2000) and zone codes. The spatial database file refers to a single-file spatial database stored in GeoPackage (GPKG) format, used to store vector elements converted from engineering drawings, including point, line, and polygon geometric objects and their attribute information; all geometric coordinates have been uniformly mapped to the target coordinate system.

[0027] In one implementation, after extracting boundary coordinates from the engineering drawing and correcting them, the zone code is extracted based on the corrected boundary coordinates, and then the coordinate system code is derived. Using the coordinate system code as the source coordinate system parameter, the set of valid coordinate points corresponding to the engineering drawing is transformed from the source coordinate system to the target coordinate system, thereby obtaining the spatial database file corresponding to the engineering drawing.

[0028] Step S106: After removing the field constraint mechanism of the spatial database file, a new style storage field is added to perform structured processing on the style information contained in the spatial database file, thereby obtaining a structured spatial database file.

[0029] Field constraint mechanisms refer to the SQLite database constraints enabled by default in the GPKG specification to ensure data consistency. These include foreign key constraints and triggers, and their function is to prevent operations on core tables that may compromise structural integrity. Style storage fields refer to independent columns added to the vector feature tables within GPKG for persistently storing native CAD style information. These include fields such as "cad_color" (hexadecimal color value, e.g., `#FF0000`), "cad_width" (physical line width in millimeters), and "cad_text_size" (text height in millimeters). Style information refers to the inherent visual attributes in engineering drawings, specifically including the color and line width of elements. The structured spatial database file refers to the GPKG file after style fields have been added and data written.

[0030] In one implementation, the system opens the spatial database file using a database connection tool. First, it executes instructions to disable foreign key constraints and triggers, removing restrictions on table structure modifications. Then, for the table storing drawing vectors, it sequentially adds fields, creating new columns named "cad_color", "cad_width", and "cad_text_size". Next, it reads the style description field content of each record in the table, using regular expressions to identify and extract the color code, line width value, and text height value. The extracted values ​​are then filled into the corresponding newly created fields. After all the writing is complete, the file is saved, thus obtaining the structured spatial database file.

[0031] Step S108: Overlay the structured spatial database file with the 3D reality model for display.

[0032] In one implementation, the system automatically creates a data source through the program interface of the geographic information service platform, registering the structured spatial database file as a dataset recognizable by the platform. Then, layers are automatically created based on this data source, and a standard-compliant style configuration file is dynamically generated on the backend according to the values ​​of fields such as "cad_color", "cad_width", and "cad_text_size". This style configuration file is bound to the layer and published as a web geographic information service with one click. The front-end 3D visualization platform loads the tile data generated by the web geographic information service and simultaneously loads the 3D reality model. Through preset front-end code logic, the system automatically sets the display level and transparency of the drawing layers, ultimately achieving precise spatial alignment and top-level display of the drawing layers and the 3D reality model under unified geographic coordinates.

[0033] The drawing-based model display method provided in this invention achieves accurate positioning of engineering drawings in a unified geographic coordinate system by automatically parsing the boundary coordinates of the drawings to derive the coordinate system code. By removing the constraints of the spatial database file and adding a style storage field, the original style information such as color and line width is structured and written into the spatial database file, and then overlaid with the 3D real scene model. Thus, without manual intervention, the automatic and accurate overlay of engineering drawings and 3D real scene models is achieved, and the loss of original style information is avoided.

[0034] For ease of understanding, this embodiment of the invention provides a specific implementation of a drawing-based model display method: (i) Obtain engineering DXF drawings of the target area (i.e., the aforementioned engineering drawings) and obtain a three-dimensional real-world model of the target area. The engineering DXF drawings contain geometric data and non-geometric style attributes of the graphic elements. The three-dimensional real-world model is obtained by UAV aerial surveying and three-dimensional modeling of the target area.

[0035] (ii) Read the underlying system variables of the project DXF drawing file, such as the $EXTMIN and $EXTMAX group codes, and extract the drawing boundary extreme values ​​of the project DXF drawing. The drawing boundary extreme values ​​include the minimum X coordinate minX, the minimum Y coordinate minY, the maximum X coordinate maxX, and the maximum Y coordinate maxY. These drawing boundary extreme values ​​are recorded as the first boundary coordinates.

[0036] (iii) Deriving coordinate system encoding based on the first boundary coordinates, including: (3.1) Based on the first boundary coordinates of the engineering DXF drawing file, outlier points are determined for the coordinate points contained in the engineering DXF drawing file to obtain the set of valid coordinate points after removing outliers.

[0037] In one implementation, the geometric center of the engineering DXF drawing is calculated based on the boundary extreme values ​​of the drawing. The coordinates of all elements in the engineering DXF drawing are traversed. The distance between each coordinate point and the geometric center is calculated by spatial clustering algorithm (DBSCAN) or standard deviation filtering. Outliers whose distance exceeds a set threshold (such as 3 times the standard deviation) are identified as flying points or waste lines and are removed to obtain a cleaned set of valid coordinate points.

[0038] (3.2) Extract the zone code corresponding to the DXF drawing file of the project based on the second boundary coordinates in the set of valid coordinate points.

[0039] In one implementation, regular matching is performed on the second boundary coordinates in the set of valid coordinate points to identify the coordinate numerical characteristics of the east and north distance coordinates in the second boundary coordinates; based on the coordinate numerical characteristics, it is determined whether the east and north distance coordinates in the second boundary coordinates are reversed; if so, coordinate axis correction processing is performed on the second boundary coordinates; from the second boundary coordinates after coordinate axis correction processing, the zone code corresponding to the engineering DXF drawing file is extracted, where the zone code is the zone number of the coordinate system used in the engineering drawing.

[0040] The specific process is as follows: First, recalculate the boundary extreme values ​​for the set of valid coordinate points to obtain the cleaned boundary extreme values, which are recorded as the second boundary coordinates. Then, perform regular matching on the second boundary coordinates to identify the numerical bit characteristics of the east and north distance coordinate values. For example, if the numerical characteristics are such that one of the X or Y axes is a 6- or 8-digit integer (east distance characteristic) and the other axis is a 7-digit integer (north distance characteristic), it is determined that the coordinate axes of the second boundary coordinates are reversed, and coordinate axis correction processing is performed on the second boundary coordinates. Next, extract the projection zone number from the east distance coordinate values. For example, if the east distance is 8 digits, directly extract the first two digits as the zone number; if it is a 6-digit coordinate without a zone number, read the approximate longitude from the project configuration, divide it by 3 or 6, and round it down to deduce the 3-degree or 6-degree zone number, where the zone number is also the zone code.

[0041] (3.3) Based on the segmentation code, generate the coordinate system code that matches the engineering DXF drawing file.

[0042] In one implementation, a unique geodetic coordinate system code, or simply coordinate system code, corresponding to the engineering DXF drawing is generated by stitching together the projection zone number and the relevant standard geodetic coordinate system. For example, based on the calculated zone number and relevant standards (such as CGCS2000), an accurate geodetic coordinate system EPSG code (e.g., EPSG:4538) corresponding to the drawing is generated. This code will be used as a source coordinate system parameter and directly input into the subsequent projection conversion engine.

[0043] In this embodiment of the invention, a coordinate system blind measurement algorithm is proposed. Compared with the existing technology of manually checking the coordinate system, this embodiment of the invention can automatically avoid the X / Y axis reversal and translation deviation in domestic surveying and mapping, and achieve high-precision spatial positioning of drawings with zero human intervention.

[0044] (iv) Using the coordinate system code as the source coordinate system parameter, transform the set of valid coordinate points corresponding to the engineering DXF drawing file from the source coordinate system to the target coordinate system to obtain the spatial database file corresponding to the engineering DXF drawing file.

[0045] In one implementation, the underlying projection transformation engine (such as GDAL) is invoked, using the coordinate system encoding as the source coordinate system, to accurately reproject the engineering DXF drawing file to the WGS-84 geographic coordinate system, and generate a spatial database file in GeoPackage (GPKG) format that conforms to the OGC standard.

[0046] (v) Use the style storage field to perform structured processing on the style information contained in the spatial database file to obtain a structured spatial database file.

[0047] First, the field constraint mechanism of the spatial database file is removed. In one implementation, considering that the standard GPKG specification restricts modifications to the core table structure, this embodiment of the invention directly connects to the underlying SQLite database of the GeoPackage spatial database file, executes SQL commands to disable foreign key constraints, thereby removing the aforementioned restrictions. On this basis, an independent field for storing styles is dynamically added via ALTERTABLE, and this field is denoted as the style storage field.

[0048] Then, the style description fields of each element in the spatial database file are traversed, and the color value and physical line width value are extracted from the style description fields; the color value and physical line width value are written to the style storage field. In one implementation, a regular expression parsing engine is used to traverse the OGR_STYLE verbose string field in the GeoPackage spatial database file, and the hexadecimal color value and physical line width value are accurately extracted by using regular expressions (such as matching PEN(c:#([0-9a-fA-F]{6}),w:([0-9.]+)(g|px|pt))), and written to the newly added cad_color, cad_width, and cad_text_size style storage fields respectively, to obtain the GeoPackage spatial database file containing structured style fields.

[0049] Finally, the physical linewidth values ​​in the style storage field are non-linearly mapped to obtain relative linewidth values ​​to generate a structured spatial database file. In one implementation, the physical linewidth value (cad_width) in the structured style field is read and non-linearly mapped: when the physical linewidth value is less than a preset visual recognition threshold, a minimum pixel minimum value is forcibly assigned; when the physical linewidth value is greater than or equal to the visual recognition threshold, it is proportionally mapped to a relative width value suitable for WebGIS rendering. This relative width value will be directly injected into the SLD configuration parameters in step (vi) to ensure high-fidelity visual display after data delivery.

[0050] This invention overcomes the storage limitations of traditional spatial databases on vector styles. By modifying the underlying SQL and using nonlinear mapping, it solves the industry pain point that all CAD styles (colors, line widths) are lost after vector conversion in existing technologies, and achieves lossless database-level persistence of styles.

[0051] (vi) Publish structured spatial database files as geographic information services.

[0052] In one implementation, a data storage is created; a structured spatial database file is mounted to the data storage; a style description file is generated based on the style storage field in the structured spatial database file, and the style description file is bound to a geographic information layer and published as a geographic information service.

[0053] The specific implementation process is as follows: A DataStore is automatically created via the GeoServer REST API, and the GeoPackage spatial database file is mounted to the data store. Based on the hexadecimal color values ​​and relative linewidth values ​​in the style storage field of the structured spatial database file, a style description file, also known as an SLD (Styled Layer Descriptor) XML style sheet file, is dynamically generated on the backend. The style description file is then bound to the published geographic information layer, and published with one click as a WMS / WFS service with the geographic unit-level rendering parameter uom="metre". Note: The SLD style sheet is a configuration file that drives layer rendering, not the final GIS service tile.

[0054] (vii) Overlay geographic information services with three-dimensional reality models for display.

[0055] In one implementation, a geographic information service (GIS) and a 3D reality model are loaded into the front-end Cesium 3D visualization platform. Based on a unified geographic coordinate system, the GIS and the 3D reality model are spatially overlaid. The core operation is spatial sampling (ray intersection), which involves simultaneously reading the Z-axis elevation of the GIS and the 3D reality model at the spatially aligned position. The GIS vector layer is then dynamically overlaid onto the surface of the 3D reality model based on this Z-axis elevation. Because the GIS uses a tiled mechanism, the front-end only requests and renders data tiles within the currently visible area, avoiding memory overflow and rendering blockage caused by loading the entire structured spatial database file to the browser at once. This ensures display accuracy while achieving lightweight and highly responsive 3D overlay visualization.

[0056] The above (vi) to (vii) construct a fully automated layer arrangement pipeline. Compared with the tedious layer configuration of manually logging into the GIS backend, this solution realizes the second-level automated execution of service publishing and style binding.

[0057] (viii) Automated earthwork measurement and 3D visualization.

[0058] First, based on the overlaid geographic information service and the 3D reality model, the earthwork volume calculation polygon is obtained. According to the two-dimensional projection range of the earthwork volume calculation polygon, the elevation points corresponding to the existing terrain of the 3D reality model and the design terrain corresponding to the drawing vector elevation of the engineering drawing are sampled to obtain the existing terrain elevation sampling point set and the design terrain elevation sampling point set.

[0059] In one implementation, on a unified 3D display interface, an interactive drawing tool is used to delineate a polygon for calculating earthwork volume. Based on the 2D projection range of the earthwork volume calculation polygon, Cesium's ray intersection algorithm or terrain sampling API is called. According to a set sampling precision (such as 1 meter), elevation points are sampled from top to bottom for the existing terrain corresponding to the 3D reality model and the design terrain corresponding to the drawing vector elevation of the engineering DXF drawing, respectively, to obtain the set of elevation sampling points for the existing terrain and the set of elevation sampling points for the design terrain.

[0060] Then, irregular triangular networks corresponding to the existing terrain elevation sampling point set and the design terrain elevation sampling point set are generated respectively, so as to determine the total excavation volume and / or the total fill volume based on the irregular triangular network.

[0061] In one implementation, based on the Delaunay triangulation algorithm, corresponding irregular triangular networks for the existing terrain elevation sampling point set and the design terrain elevation sampling point set are generated respectively; the earthwork volume is calculated for each triangular network element using the triangular prism partitioning method. The calculation formula is: ,in Let be the projected area of ​​the triangular mesh element on the horizontal plane. The elevation difference between the current elevation and the design elevation; Finally, each triangulation unit is assigned a corresponding color based on its elevation difference, and a color band map is generated on the surface of the 3D reality model using Cesium dynamic rendering. Warm colors represent excavation areas, cool colors represent fill areas, and the color depth reflects the excavation and fill depth. All triangulation units are traversed, and the excavation volume corresponding to a positive elevation difference and the fill volume corresponding to a negative elevation difference are accumulated to obtain the total excavation volume and the total fill volume. The net volume is then calculated, which is equal to the total excavation volume minus the total fill volume.

[0062] In summary, the overall process of this invention embodiment is as follows: Figure 2 As shown, where Figure 2This is a schematic diagram of the overall process of a drawing-based model display method, including the following steps 1 to 8: Step 1: Extract the boundary extreme value group codes SEXTMIN and SEXTMAX. Step 2: Apply a coordinate system intelligent blind testing algorithm to identify coordinate numerical characteristics, compare extreme value ranges to automatically determine 3-degree or 6-degree zones, and automatically identify and correct X / Y axis inversion problems. Step 3: Call GDAL for projection transformation to unify the coordinate system to WGS84. Step 4: Generate a standardized spatial database GeoPackage. Step 5: Perform post-processing data cleaning. The core innovation of this step is "style restoration," which mainly includes using regular expression matching to extract color, line width, and font size as independent fields from the OGR_STYLE style string, and performing a line width normalization mapping algorithm. Step 6: Perform automated service orchestration based on RESTAPI. Step 7: Dynamically generate SLD style files. Step 8: Publish WMS / WFS services and overlay them with the 3D model, finally outputting the fusion analysis and comparison results. This invention embodiment can achieve at least the following technical effects: It can automate the entire process without manual intervention, significantly improving processing efficiency: it replaces manual operations such as using QGIS tools for coordinate transformation and verification. After the drawings are uploaded, it automatically completes coordinate recognition, projection transformation and service publishing, reducing processing time from hours to seconds.

[0063] The newly proposed coordinate system identification and correction method has high identification accuracy: based on the boundary extreme values ​​extracted from the DXF file EXTMIN / EXTMAX, it automatically determines whether the X / Y axes are inverted and corrects the translation deviation; combined with the east distance and the project longitude to calculate the zone number, it determines the EPSG code and realizes the accurate projection of the drawing coordinates onto WGS-84.

[0064] It can fully preserve CAD style information: by parsing the regular expression of the OGR_STYLE field in GPKG, parameters such as color, line width, and text size are extracted and stored in extended fields; after non-linear mapping, it is injected into the SLD style file, so that the published GIS layer presents the same line type, color and annotation effect as the original CAD drawing on the Web.

[0065] The earthwork volume calculation results are reproducible: Based on the spatial alignment of two-dimensional drawings and three-dimensional real-scene models, the design elevation and the current elevation are extracted according to the set sampling interval (such as 1 meter), a TIN triangular network is constructed, and the cut and fill volume is calculated unit by unit using the triangular prism method. A color band map is generated according to the Δh value. Finally, the total cut volume, total fill volume and net volume are output. The results are more reliable, and the intuitive cut and fill heat map provides a scientific digital basis for project quantity settlement and construction guidance.

[0066] Based on the foregoing embodiments, this invention provides a drawing-based model display device, see [link to previous embodiment]. Figure 3 The schematic diagram shown illustrates the structure of a drawing-based model display device, which includes: The acquisition module 302 is used to acquire a 3D real-scene model of the engineering area and the corresponding engineering drawings. The database file generation module 304 is used to derive coordinate system encoding based on the boundary coordinates of engineering drawings, and to generate a spatial database file corresponding to the engineering drawings. The database file structuring module 306 is used to add a style storage field after removing the field constraint mechanism of the spatial database file, so as to use the style storage field to perform structuring processing on the style information contained in the spatial database file to obtain a structured spatial database file. The model display module 308 is used to overlay and display the structured spatial database file with the 3D reality model.

[0067] The drawing-based model display device provided in this invention achieves accurate positioning of engineering drawings in a unified geographic coordinate system by automatically parsing the boundary coordinates of the drawings to derive the coordinate system code. By removing the constraints of the spatial database file and adding a style storage field, the original style information such as color and line width is structured and written into the spatial database file. Then, it is automatically published by geographic information services and overlaid with a 3D real-scene model, thereby achieving automatic and accurate overlay of engineering drawings and 3D real-scene models without human intervention, and avoiding the loss of original style information.

[0068] In one implementation, the database file generation module 304 is specifically used for: Based on the first boundary coordinates of the engineering drawing, outlier points are identified in the coordinate points contained in the engineering drawing to obtain the set of valid coordinate points after removing outliers. Based on the second boundary coordinates in the set of valid coordinate points, the zone code corresponding to the engineering drawing is extracted. The zone code is the zone number of the coordinate system used in the engineering drawing. Based on the segmentation code, a coordinate system code matching the generated process drawing is used.

[0069] In one implementation, the database file generation module 304 is specifically used for: Regular matching is performed on the second boundary coordinates in the set of valid coordinate points to identify the coordinate numerical characteristics of the east and north distance coordinates in the second boundary coordinates. Based on the coordinate numerical characteristics, determine whether the east distance coordinate value and the north distance coordinate value in the second boundary coordinate system are reversed; If so, then the coordinate axes of the second boundary are corrected. Extract the zone code corresponding to the engineering drawing from the second boundary coordinates after coordinate axis correction.

[0070] In one implementation, the database file generation module 304 is specifically used for: Using coordinate system encoding as the source coordinate system parameter, the set of valid coordinate points corresponding to the engineering drawing is transformed from the source coordinate system to the target coordinate system, resulting in a spatial database file corresponding to the engineering drawing.

[0071] In one implementation, the database file structuring module 306 is specifically used for: Iterate through the style description field of each graphic element in the spatial database file and extract the color value and physical line width value from the style description field; The color value and physical line width value are written to the style storage field, and the physical line width value in the style storage field is processed by non-linear mapping to obtain the relative line width value, so as to generate a structured spatial database file.

[0072] In one implementation, the model display module 308 is specifically used for: A style description file is generated based on the style storage field in the structured spatial database file, and the style description file is bound to the geographic information layer and published as a geographic information service. Geographic information services are overlaid with 3D reality models for display.

[0073] In one embodiment, a volume determination module is further included, for: Based on the overlaid geographic information service and 3D reality model, obtain the earthwork volume calculation polygon; The two-dimensional projection range of the polygon is calculated based on the earthwork volume. Elevation points are sampled for the existing terrain corresponding to the three-dimensional real scene model and the design terrain corresponding to the vector elevation of the engineering drawing, respectively, to obtain the set of elevation sampling points for the existing terrain and the set of elevation sampling points for the design terrain. The irregular triangular network corresponding to the current terrain elevation sampling point set and the design terrain elevation sampling point set is generated respectively, so as to determine the total excavation volume and / or the total fill volume based on the irregular triangular network.

[0074] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0075] This invention provides an electronic device, specifically, the electronic device includes a processor and a memory; the memory stores a computer program, which, when run by the processor, executes the method described in any of the above embodiments.

[0076] Figure 4 The present invention provides a schematic diagram of the structure of an electronic device 100, which includes a processor 40, a memory 41, a bus 42 and a communication interface 43. The processor 40, the communication interface 43 and the memory 41 are connected through the bus 42. The processor 40 is used to execute executable modules, such as computer programs, stored in the memory 41.

[0077] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0078] Bus 42 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0079] The memory 41 is used to store programs. After receiving an execution instruction, the processor 40 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 40 or implemented by the processor 40.

[0080] Processor 40 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 40 or by instructions in software form. Processor 40 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 41. The processor 40 reads the information in memory 41 and, in conjunction with its hardware, completes the steps of the above method.

[0081] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, please refer to the foregoing method embodiments, which will not be repeated here.

[0082] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0083] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for displaying a model based on drawings, characterized in that, include: Obtain a 3D reality model of the engineering area and the corresponding engineering drawings; Based on the boundary coordinates of the engineering drawings, the coordinate system code is derived, and a spatial database file corresponding to the engineering drawings is generated. After removing the field constraint mechanism of the spatial database file, a new style storage field is added to perform structured processing on the style information contained in the spatial database file, thereby obtaining a structured spatial database file. The structured spatial database file is overlaid with the three-dimensional reality model for display. The coordinate system encoding is derived based on the boundary coordinates of the engineering drawings, including: Based on the first boundary coordinates of the engineering drawing, outlier points are identified in the coordinate points contained in the engineering drawing to obtain a set of valid coordinate points after removing outliers. Based on the second boundary coordinates in the set of valid coordinate points, the zone code corresponding to the engineering drawing is extracted, including: performing regular matching on the second boundary coordinates in the set of valid coordinate points to identify the coordinate numerical characteristics of the east and north distance coordinates in the second boundary coordinates; based on the coordinate numerical characteristics, determining whether the east and north distance coordinates in the second boundary coordinates are reversed; if so, performing coordinate axis correction processing on the second boundary coordinates; extracting the zone code corresponding to the engineering drawing from the second boundary coordinates after coordinate axis correction processing, wherein the zone code is the zone number of the coordinate system used by the engineering drawing; Based on the segmented code, a coordinate system code matching the engineering drawing is generated.

2. The drawing-based model display method according to claim 1, characterized in that, Generate the spatial database file corresponding to the engineering drawing, including: Using the coordinate system code as the source coordinate system parameter, the set of valid coordinate points corresponding to the engineering drawing is transformed from the source coordinate system to the target coordinate system to obtain the spatial database file corresponding to the engineering drawing.

3. The model display method based on drawings according to claim 1, characterized in that, The style information contained in the spatial database file is structured using the style storage field to obtain a structured spatial database file, including: Traverse the style description field of each graphic element in the spatial database file, and extract the color value and physical line width value from the style description field; The color value and the physical line width value are written to the style storage field, and the physical line width value in the style storage field is subjected to non-linear mapping processing to obtain the relative line width value, so as to generate a structured spatial database file.

4. The drawing-based model display method according to claim 1, characterized in that, Overlaying the structured spatial database file with the 3D reality model includes: A style description file is generated based on the style storage field in the structured spatial database file, and the style description file is bound to the geographic information layer and published as a geographic information service. The geographic information service is overlaid on the three-dimensional reality model for display.

5. The drawing-based model display method according to claim 4, characterized in that, After overlaying the geographic information service with the 3D reality model, the method further includes: Based on the overlaid geographic information service and the three-dimensional real scene model, obtain the earthwork volume calculation polygon; The two-dimensional projection range of the polygon is calculated based on the earthwork volume. Elevation points are sampled for the existing terrain corresponding to the three-dimensional real scene model and the design terrain corresponding to the drawing vector elevation of the engineering drawing paper, respectively, to obtain the existing terrain elevation sampling point set and the design terrain elevation sampling point set. The existing terrain elevation sampling point set and the design terrain elevation sampling point set are respectively generated as irregular triangular networks, so as to determine the total excavation volume and / or the total fill volume based on the irregular triangular networks.

6. A model display device based on drawings, characterized in that, include: The acquisition module is used to acquire a 3D real-world model of the engineering area and the corresponding engineering drawings. The database file generation module is used to derive coordinate system codes based on the boundary coordinates of the engineering drawing drawings, in order to generate a spatial database file corresponding to the engineering drawing drawings; The database file structuring module is used to add a style storage field after removing the field constraint mechanism of the spatial database file, so as to use the style storage field to perform structuring processing on the style information contained in the spatial database file to obtain a structured spatial database file. The model display module is used to overlay and display the structured spatial database file and the three-dimensional real-scene model; The database file generation module is specifically used for: Based on the first boundary coordinates of the engineering drawing, outlier points are identified in the coordinate points contained in the engineering drawing to obtain a set of valid coordinate points after removing outliers. Based on the second boundary coordinates in the set of valid coordinate points, the zone code corresponding to the engineering drawing is extracted, including: performing regular matching on the second boundary coordinates in the set of valid coordinate points to identify the coordinate numerical characteristics of the east and north distance coordinates in the second boundary coordinates; based on the coordinate numerical characteristics, determining whether the east and north distance coordinates in the second boundary coordinates are reversed; if so, performing coordinate axis correction processing on the second boundary coordinates; extracting the zone code corresponding to the engineering drawing from the second boundary coordinates after coordinate axis correction processing, wherein the zone code is the zone number of the coordinate system used by the engineering drawing; Based on the segmented code, a coordinate system code matching the engineering drawing is generated.

7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the drawing-based model display method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the drawing-based model display method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for converting map data to dat forobject_related geographic information system

    KR1020010037981A