Oblique photography terrain file loading method, device, equipment and storage medium
By processing and converting tilt photography data, the problem that the Revit design platform cannot load tilt photography terrain files is solved, and the loading and architectural design support of high-precision terrain models on the Revit platform is realized.
Patent Information
- Application Number
- CN202210528639.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-05-16
AI Technical Summary
The existing tilt photography models cannot be directly imported into the Revit design platform to serve as terrain models for architectural design, resulting in loss of accuracy.
By processing the original tilt photography file, the tilt photography index file and data file are generated and converted into coordinate point data and feature surface index data that can be recognized by the Revit design platform, the analysis and loading of terrain feature points can be achieved.
It realizes the loading of high-precision tilt photography terrain models in the Revit design platform, supporting the creation of high-precision terrain models for subsequent architectural designs.
Smart Images

Figure CN114926596B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of graphics rendering technology, and specifically to a method, device, equipment and storage medium for loading an oblique photography terrain file. Background Art
[0002] technology
[0003] Building Information Modeling (BIM) is a digital representation of the physical and functional characteristics of a facility. A new auxiliary tool for architecture and engineering, specifically civil engineering, BIM primarily uses relevant data from construction projects as a foundation for modeling. This allows for the creation of building models, simulating the real-world information of buildings through digital data. Furthermore, BIM offers five key characteristics: visualization, coordination, simulation, optimization, and plotting capabilities.
[0004] Revit is the name of a suite of software from Autodesk. Designed for Building Information Modeling (BIM), the Revit software suite helps architects design, construct, and maintain higher-quality, more energy-efficient buildings. Revit is one of the most widely used software within the BIM framework in my country's construction industry. However, terrain models in existing Revit design platforms are mostly 1:200 and 1:500 contour models, which can lose precision in topography and building outlines.
[0005] Oblique photography is a high-tech technology that has recently developed in the international surveying and mapping field. It overturns the previous limitation that orthophotos could only be captured from vertical angles. By equipping multiple sensors on a single flight platform, it simultaneously captures images from five different angles—one vertical, four oblique angles, and so on—introducing users into a realistic and intuitive world that matches human vision. This technology enables the creation of highly accurate oblique photography models.
[0006] However, existing oblique photography models cannot be directly imported into the Revit design platform to serve as terrain models for architectural design. Summary of the Invention
[0007] Based on the above technical problems, this application provides a method, device, equipment and storage medium for loading oblique photography terrain files, which solves the problem that the Revit design platform cannot load oblique photography terrain files.
[0008] In order to solve the above technical problems, the technical solutions adopted in this application are as follows:
[0009] A method for loading an oblique photography terrain file, comprising:
[0010] Processing the oblique photography original file to obtain the oblique photography index file and the oblique photography data file;
[0011] Reading the oblique photography data file to be loaded based on the oblique photography index file;
[0012] Parsing the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file;
[0013] Converting the terrain feature point data into coordinate point data for identification by the Revit design platform, and converting the terrain feature point logical reference data into feature surface index data for identification by the Revit design platform;
[0014] The coordinate point data and the characteristic surface index data are transferred into the Revit design platform, and the terrain is created through the Revit design platform.
[0015] Furthermore, parsing the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file includes:
[0016] Reading text data in the oblique photography data file line by line;
[0017] Analyze whether there are keywords in the text data;
[0018] If the first keyword exists in the text data, the text data is terrain feature point data and is saved;
[0019] If the second keyword exists in the text data, the text data is saved as logical reference data of the terrain feature point.
[0020] Furthermore, before the terrain feature point data is saved, the terrain feature point data is deduplicated.
[0021] Furthermore, the deduplication includes:
[0022] Comparing the terrain feature point data with the saved terrain feature point data;
[0023] If the XY coordinates of the terrain feature point data are the same as the XY coordinates of the stored terrain feature point data, the XY coordinates of the terrain feature point data are offset.
[0024] Furthermore, if the first keyword and the second keyword do not exist in the text data, the text data of the next line in the oblique photography data file is read.
[0025] Furthermore, after the Revit design platform creates the terrain, the generated terrain files are saved in ascending order of numbers.
[0026] Furthermore, the oblique photography data file is an OBJ format file.
[0027] A device for loading a terrain file for oblique photography, comprising:
[0028] A file conversion module, the file conversion module is used to process the oblique photography original file to obtain the oblique photography index file and the oblique photography data file;
[0029] A file reading module, the file reading module is used to read the oblique photography data file to be loaded based on the oblique photography index file;
[0030] A file parsing module, the file parsing module is used to parse the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file;
[0031] A data conversion module, the data conversion module is used to convert the terrain feature point data into coordinate point data for recognition by the Revit design platform; and
[0032] Converting the terrain feature point logical reference data into feature surface index data for identification by the Revit design platform;
[0033] A terrain creation module is used to transfer the coordinate point data and the feature surface index data into the Revit design platform and create terrain through the Revit design platform.
[0034] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method for loading an oblique photography terrain file.
[0035] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned method for loading a terrain file for oblique photography.
[0036] Compared with the prior art, the present invention has the following advantages:
[0037] The above-mentioned oblique photography terrain file loading method, device, computer equipment and storage medium can load the oblique photography terrain file into the Revit design platform to form a high-precision terrain model for subsequent architectural design use. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. Among them:
[0039] Figure 1 This is a flowchart of the method for loading oblique photography terrain files.
[0040] Figure 2 The figure is a flowchart of the oblique photography index file parsing method. DETAILED DESCRIPTION
[0041] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0042] It should be understood that the terms "system," "device," "unit," and / or "module" used in this specification are a method for distinguishing different components, elements, parts, portions, or assemblies at different levels. However, if other terms can achieve the same purpose, the terms may be replaced by other expressions.
[0043] As used in this specification and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not refer to the singular but also include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.
[0044] Flowcharts are used throughout this specification to illustrate the operations performed by systems according to embodiments of this specification. It should be understood that preceding or following operations do not necessarily need to be performed in exact order. Instead, the steps may be processed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0045] See Figure 1 In some embodiments, a method for loading an oblique photography terrain file includes:
[0046] S101, processing the oblique photography original file to obtain an oblique photography index file and an oblique photography data file;
[0047] Specifically, the oblique photography original file is the oblique photography file obtained by unmanned aerial survey.
[0048] Specifically, the oblique photography index file is an index file that displays the locations of all oblique photography data files, and can be used to classify and manage oblique photography data.
[0049] Specifically, oblique photography data files are processed by professional surveying and mapping production tools (corresponding professional software, such as DJI Map) to produce 3D model files of terrain and buildings.
[0050] Preferably, the oblique photography data file is in OBJ format. OBJ file is a standard file format for 3D modeling and animation software, suitable for mutual import between 3D software models.
[0051] S102, reading the oblique photography data file to be loaded based on the oblique photography index file;
[0052] Preferably, a related interactive page can be designed on the client operation page. The interactive part of the program needs to realize the function of generating terrain on the Revit 3D view after the user clicks the "Create Oblique Photography Terrain" button, selects the oblique photography data file to be imported, processes it, and then generates terrain on the Revit 3D view.
[0053] Among them, the open file form is called to implement the interactive interface for the user to select the terrain file. After the user selects the oblique photography index file (usually metadata.xml), all the oblique photography data files that need to be converted and generated are loaded, and the files to be generated are checked in the interface for parsing and generation.
[0054] S103, parsing the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file;
[0055] S104, converting the terrain feature point data into coordinate point data for identification by the Revit design platform, and converting the terrain feature point logical reference data into feature surface index data for identification by the Revit design platform;
[0056] S105 , transferring the coordinate point data and the characteristic surface index data into the Revit design platform, and creating a terrain through the Revit design platform.
[0057] Specifically, the Revit design platform receives data and creates terrain using an API called TopographySurface.Create. This method accepts coordinate point data (XYZ point sets) and feature surface index data (PolymeshFacet). The resulting terrain file is a Revit terrain file that incorporates the terrain features from the oblique photography data file. Revit design platform-generated terrain files are in RVT format, a proprietary file format used by the Revit design platform to store design data.
[0058] In this embodiment, the oblique photography data file is parsed, the terrain feature elements in the oblique photography data file are parsed and extracted, and then the three-dimensional point and surface data recorded in the oblique photography data file are converted into valid terrain elevation points in the Revit design platform. Then, the corresponding terrain is generated in the Revit design platform through the API interface for creating terrain in the Revit design platform.
[0059] The high-precision terrain generated by Revit design can be used for subsequent design, such as the design of photovoltaic power stations.
[0060] Among them, since the three-dimensional terrain is composed of surfaces, the points that constitute the surfaces are feature points. The characteristic of feature points is that they record the spatial XYZ coordinate point data. The conversion process of the above-mentioned terrain feature point data is to convert the coordinate points in the oblique photography data file into coordinate points in the Revit design platform. The coordinate points in the Revit design platform are also XYZ coordinates, but there may be a situation where the coordinate system of the coordinate points in the oblique photography data file is inconsistent with the coordinate system of the coordinate points in the Revit design platform, so corresponding adjustments need to be made. For example, if the coordinate point in the Revit design platform is XYZ, the corresponding oblique photography data may have a YXZ situation, that is, the XY in the oblique photography coordinate system and the XY in the Revit design platform coordinate system are swapped.
[0061] Therefore, in order for the Revit design platform to correctly identify the terrain data in the oblique photography data file, it is necessary to convert the terrain feature point data and terrain feature point logical reference data parsed from the oblique photography data file into coordinate point data and feature surface index data that can be recognized by the Revit design platform.
[0062] In addition, through the linking and unloading interface of RVT files in the relevant API of the Revit design platform, combined with the terrain file management list of the interface, dynamic loading and unloading of RVT files can also be achieved.
[0063] Preferably, after the Revit design platform creates the terrain, the generated terrain files are saved in ascending order of numbers.
[0064] Specifically, the terrain file is saved in a specified directory on the computer.
[0065] Preferably, the imported oblique photography data file and the generated terrain RVT file are stored on the user's local disk, and the three-dimensional objects, key-value pairs, point sets, etc. parsed in the process are stored in the memory.
[0066] Due to limitations inherent in Revit, when creating RVT terrains, the size of a single imported oblique photogrammetry file should be limited to 300MB. The recommended file size for a single oblique photogrammetry file is 30MB to 100MB. Exceeding this recommended size will result in slow data generation and a negative user experience. Exceeding this maximum limit may result in conversion failure.
[0067] See Figure 2 In some embodiments, parsing the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file includes:
[0068] S201, reading text data in the oblique photography data file line by line;
[0069] S202, analyzing whether there are keywords in the text data;
[0070] S203, if the first keyword exists in the text data, the text data is considered as terrain feature point data and saved;
[0071] S204: If the second keyword exists in the text data, the text data is saved as logical reference data of the terrain feature point.
[0072] In this embodiment, the oblique photography data file (specifically, an OBJ file) to be converted is read into memory, and then each line of OBJ data is parsed one by one in a loop. Since OBJ data is text data, each line of data read into memory can be parsed without additional encoding or decoding. A check is performed to determine whether a keyword exists in each line of OBJ data.
[0073] Specifically, set the first keyword to "v". If the keyword "v" exists in this line of text data, it means that the line of data is the terrain feature point data in the oblique photography data file, which records the X, Y, and Z coordinate data of the terrain feature points, and saves the read terrain feature point data into the memory collection.
[0074] Specifically, the second keyword is set to "f". If the keyword "f" exists in this line of text data, it means that the data in this line is the logical reference data of the terrain feature points in the oblique photography data file. The logical reference data of the terrain feature points records which terrain feature points constitute a surface of the terrain feature, and the read logical reference data of the terrain feature points is saved in the memory collection.
[0075] Preferably, before the terrain feature point data is saved, the terrain feature point data is deduplicated.
[0076] Since the terrain in the Revit design platform does not allow two points with different Z values to exist on the same XY coordinate at the same time, it is necessary to deduplicate the terrain feature point data before saving it.
[0077] Specifically, the deduplication includes:
[0078] Comparing the terrain feature point data with the saved terrain feature point data;
[0079] If the XY coordinates of the terrain feature point data are the same as the XY coordinates of the stored terrain feature point data, the XY coordinates of the terrain feature point data are offset.
[0080] At the same time, it is checked whether the terrain feature point data that has been saved has the same XY coordinates as the terrain feature point that is currently to be saved. If so, an offset operation is performed on the X and Y coordinates of the terrain feature point to be saved.
[0081] Specifically, the X and Y offset distances are 0.1 mm.
[0082] Preferably, if the first keyword and the second keyword do not exist in the text data, the text data of the next line in the oblique photography data file is read.
[0083] If the line of data does not contain the first keyword "v" and the second keyword "f", the line of data is meaningless for terrain creation, and the subsequent text data is parsed until every line of text data in the oblique photography data file is parsed.
[0084] In some embodiments, a device for loading an oblique photography terrain file is also disclosed, comprising:
[0085] A file conversion module, the file conversion module is used to process the oblique photography original file to obtain the oblique photography index file and the oblique photography data file;
[0086] A file reading module, the file reading module is used to read the oblique photography data file to be loaded based on the oblique photography index file;
[0087] A file parsing module, the file parsing module is used to parse the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file;
[0088] A data conversion module, the data conversion module is used to convert the terrain feature point data into coordinate point data for recognition by the Revit design platform; and
[0089] Converting the terrain feature point logical reference data into feature surface index data for identification by the Revit design platform;
[0090] A terrain creation module is used to transfer the coordinate point data and the feature surface index data into the Revit design platform and create terrain through the Revit design platform.
[0091] In order to solve the above technical problems, the present application also discloses a computer device, which is characterized in that it includes a memory and a processor, and a computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the above-mentioned oblique photography terrain file loading method.
[0092] The computer device may be a desktop computer, a notebook computer, a PDA, a cloud server, etc. The computer device may interact with the user via a keyboard, a mouse, a remote control, a touchpad, or a voice control device.
[0093] The memory includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D-interface display memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, magnetic disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the memory can also be an external storage device of the computer device, such as a plug-in hard disk equipped with the computer device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Of course, the memory can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is often used to store the operating system and various application software installed on the computer device, such as the program code of the oblique photography terrain file loading method. In addition, the memory can also be used to temporarily store various types of data that have been output or are about to be output.
[0094] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is typically used to control the overall operation of the computer device. In this embodiment, the processor is used to execute program code stored in the memory or process data, such as executing the program code for the method for loading a topographic file for oblique photography.
[0095] To solve the above technical problems, the present application also discloses a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned oblique photography terrain file loading method.
[0096] The computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned method for loading a terrain file for oblique photography.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server or network device, etc.) to execute the methods described in each embodiment of the present application.
[0098] The above are examples of the present application. The above examples and the specific parameters therein are only for the purpose of clearly describing the verification process of the application and are not intended to limit the scope of patent protection of the present application. The scope of patent protection of the present application shall still be subject to the claims. Any equivalent structural changes made by using the description and drawings of the present application shall also be included in the scope of protection of the present application.
Claims
1. A method for loading a terrain file for oblique photography, characterized in that: include: Processing the oblique photography original file to obtain the oblique photography index file and the oblique photography data file; Reading the oblique photography data file to be loaded based on the oblique photography index file; Parsing the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file; Converting the terrain feature point data into coordinate point data for identification by the Revit design platform, and converting the terrain feature point logical reference data into feature surface index data for identification by the Revit design platform; The coordinate point data and the characteristic surface index data are transferred into the Revit design platform, and the terrain is created through the Revit design platform; Parsing the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file includes: Reading text data in the oblique photography data file line by line; Analyze whether there are keywords in the text data; If the first keyword exists in the text data, the text data is terrain feature point data and is saved; If the second keyword exists in the text data, the text data is saved as logical reference data of the terrain feature point; Before saving the terrain feature point data, deduplicating the terrain feature point data; The deduplication includes: Comparing the terrain feature point data with the saved terrain feature point data; If the XY coordinates of the terrain feature point data are the same as the XY coordinates of the saved terrain feature point data, offsetting the XY coordinates of the terrain feature point data; The oblique photography data file is an OBJ format file.
2. The method for loading an oblique photography terrain file according to claim 1, characterized in that: If the first keyword and the second keyword do not exist in the text data, the text data of the next line in the oblique photography data file is read.
3. The method for loading an oblique photography terrain file according to claim 1, wherein: After the Revit design platform creates the terrain, the generated terrain files are saved in ascending order of numbers.
4. An oblique photography terrain file loading device, used to implement the oblique photography terrain file loading method according to any one of claims 1 to 3, characterized in that: include: A file conversion module, the file conversion module is used to process the oblique photography original file to obtain the oblique photography index file and the oblique photography data file; A file reading module, the file reading module is used to read the oblique photography data file to be loaded based on the oblique photography index file; A file parsing module, the file parsing module is used to parse the oblique photography data file to obtain terrain feature point data and terrain feature point logical reference data in the oblique photography data file; A data conversion module, the data conversion module is used to convert the terrain feature point data into coordinate point data for recognition by the Revit design platform; as well as Converting the terrain feature point logical reference data into feature surface index data for identification by the Revit design platform; A terrain creation module is used to transfer the coordinate point data and the feature surface index data into the Revit design platform and create terrain through the Revit design platform.
5. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for loading an oblique photography terrain file according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method for loading an oblique photography terrain file according to any one of claims 1 to 3.
Citation Information
Patent Citations
Aerial photography and BIM (Building Information Modeling) combination-based earthwork project amount calculation method
CN110083903A