A method, device, terminal and medium for drawing geographic information based on CAD
By obtaining the solid block data and basic data in the CAD file, and combining the corresponding processing methods to draw the solid block data on the GIS platform, the problem of low data restoration in the existing technology is solved, and high-quality data import and display are achieved.
Patent Information
- Application Number
- CN202110361594.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-02
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-04-02
AI Technical Summary
The existing technology has the problem of low data restoration when drawing CAD data to the GIS platform, causing the accuracy and details of the GIS data to be lost.
By obtaining the entity block data and basic data in the CAD file, and drawing the entity block data one by one according to the type information and entity data parameters of the entity block data, combined with the corresponding processing methods, high-quality data import can be achieved on the GIS platform. Specific steps include obtaining layer data and line data, determining how to process the entity block data, and drawing the corresponding entity block data in the model space.
It improves the data restoration degree of CAD data on the GIS platform, ensures the accuracy and completeness of details of geographical information, and solves the problems of data loss and inaccurate display.
Smart Images

Figure CN112906091B
Abstract
Description
Technical Field
[0001] The present application relates to the field of geographic information technology, and in particular to a CAD-based geographic information drawing method, device, terminal and medium. Background Art
[0002] Many of the topographic and cadastral data files in the GIS platform are saved by CAD software. Therefore, in the modern GIS production process, it is necessary to import data edited by CAD software as the base map of GIS data in many environments.
[0003] At present, the methods on the market for drawing CAD data to GIS platforms generally have the technical problem of low data restoration. Summary of the invention
[0004] The present application provides a CAD-based geographic information drawing method, device, terminal and medium, which are used to solve the technical problem of low data restoration degree commonly existing in the prior art method of drawing CAD data to a GIS platform.
[0005] The first aspect of the present application provides a method for drawing geographic information based on CAD, comprising:
[0006] Acquire an input geographic information CAD file, and acquire entity block data and basic data from the geographic information CAD file, wherein the basic data includes: layer data and line type data acquired from the geographic information CAD file;
[0007] Determine the entity block data processing mode corresponding to the entity block data according to the type information in the entity block data and the corresponding relationship between the type information and the block processing mode;
[0008] According to the entity data parameters in the entity block data, in combination with the basic data, the entity block data are drawn one by one through the entity block data processing method.
[0009] Preferably, the type information includes: model space entity block data, symbol entity block data and common entity block data.
[0010] Preferably, drawing the entity block data in the layer space according to the entity data parameters in the entity block data by the entity block data processing method specifically includes:
[0011] Drawing the model space according to the entity data parameters in the model space entity block data, combined with the basic data, by using the entity block data processing method of the model space entity block data;
[0012] According to the entity data parameters in the symbol entity block data, combined with the basic data, the symbol entity block is drawn in the model space through the entity block data processing method of the symbol entity block data;
[0013] According to the entity data parameters in the common entity block data, in combination with the basic data, the common entity block is drawn in the model space through the entity block data processing method of the common entity block data.
[0014] Preferably, when the type information of the entity block data is model space entity block data, the entity block data processing method is specifically as follows:
[0015] The model space is drawn according to the entity data parameters in the model space entity block data, combined with the layer data and the line type data corresponding to the entity data parameters.
[0016] Preferably, when the type information of the entity block data is symbol entity block data, the entity block data processing method is specifically as follows:
[0017] According to the entity data parameters in the symbol entity block data, combined with the line type data corresponding to the entity data parameters, and according to the block reference points in the entity data parameters, the symbol entity block is drawn into the model space.
[0018] Preferably, when the type information of the entity block data is common entity block data, the entity block data processing method is specifically as follows:
[0019] According to the entity data parameters in the ordinary entity block data, in combination with the line type data corresponding to the entity data parameters, an ordinary entity is drawn, and the ordinary entity block is loaded into the model space by offsetting according to the block reference point in the entity data parameters.
[0020] Preferably, obtaining entity block data and basic data from the geographic information CAD file specifically includes:
[0021] The input geographic information CAD file is obtained through the OdDbDatabase data pointer of the ODA library, and the entity block data and basic data are obtained from the geographic information CAD file.
[0022] The second aspect of the present application provides a CAD-based geographic information drawing device, comprising:
[0023] A data acquisition unit, used to acquire an input geographic information CAD file, and acquire entity block data and basic data from the geographic information CAD file, wherein the basic data includes: layer data and line type data acquired from the geographic information CAD file;
[0024] A physical block data classification unit, configured to determine the physical block data processing mode corresponding to the physical block data according to the type information in the physical block data and the correspondence between the type information and the block processing mode;
[0025] The entity block data classification drawing unit is used to draw the entity block data one by one according to the entity data parameters in the entity block data and in combination with the basic data through the entity block data processing method.
[0026] A third aspect of the present application provides a CAD-based geographic information drawing terminal, comprising: a memory and a processor;
[0027] The memory is used to store program codes corresponding to the CAD-based geographic information drawing method mentioned in the first aspect of the present application;
[0028] The processor is configured to execute the program code.
[0029] The fourth aspect of the present application provides a storage medium, in which program codes corresponding to the CAD-based geographic information drawing method mentioned in the first aspect of the present application are stored.
[0030] It can be seen from the above technical solutions that this application has the following advantages:
[0031] The CAD-based geographic information drawing method provided in the present application draws the entity block data of the geographic information CAD file by combining the entity block data with the type information in different entity block data, the entity data parameters in the entity block data, and the basic data through an entity block data processing method that matches the entity data type, thereby realizing the import of the geographic information CAD file on the GIS platform and improving the data restoration degree. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0033] Figure 1 A flowchart of an embodiment of a CAD-based geographic information drawing method provided in this application;
[0034] Figure 2 This is a schematic diagram of the geographic information CAD file data architecture for this application;
[0035] Figure 3A schematic structural diagram of an embodiment of a CAD-based geographic information drawing device provided in this application. DETAILED DESCRIPTION
[0036] At present, most of the methods used in the market to draw CAD data to GIS platforms are line objects based on CAD data. For example, when an entire data is imported using the existing method, the overall presentation is either split into points and lines, or only one point is displayed. In addition, different types of objects are drawn differently, resulting in technical problems such as low data restoration.
[0037] The embodiments of the present application provide a CAD-based geographic information drawing method, device, terminal and medium, which are used to solve the technical problem of low data restoration degree commonly existing in the prior art method of drawing CAD data to a GIS platform.
[0038] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] See also Figure 1 The first embodiment of the present application provides a CAD-based geographic information drawing method, comprising:
[0040] Step 101: obtain an input geographic information CAD file, and obtain entity block data and basic data from the geographic information CAD file. The basic data includes: layer data and line type data obtained from the geographic information CAD file.
[0041] It should be noted that first, based on the input geographic information CAD file, the entity block data and basic data are obtained from the geographic information CAD file, wherein the entity block data is used to construct the entity object, and the extracted basic data such as the name and color information in the layer data, and the name and type in the line type data are saved. This information is needed when processing the entity data information later, so that it can be used together with the entity block data to construct GIS entity objects in the subsequent process.
[0042] Step 102: Determine the entity block data processing mode corresponding to the entity block data according to the type information in the entity block data and the corresponding relationship between the type information and the block processing mode.
[0043] It should be noted that, based on the entity block data obtained in step 101, the information of the entity block data is read, and the classification processing of the entity block data determines the corresponding processing method of the entity data. Specifically, the entity block data processing method corresponding to the entity block data can be determined according to the type of the entity block data and the correspondence between the type information and the block processing method, so that the entity data can be processed separately according to different processing methods.
[0044] Step 103 : According to the entity data parameters in the entity block data and in combination with the basic data, the entity block data are drawn one by one through the entity block data processing method.
[0045] It should be noted that, according to the entity block data processing method corresponding to each entity block data determined in step 102, based on the entity data parameters in the entity block data and in combination with the basic data, each entity block data is drawn one by one through the entity block data processing method, thereby completing the import and drawing of the geographic information CAD file on the GIS platform.
[0046] The CAD-based geographic information drawing method provided in the embodiment of the present application realizes the import of geographic information CAD files on the GIS platform and improves the data restoration degree by combining the entity block data of the geographic information CAD file with the type information in different entity block data, entity data parameters in the entity block data, and basic data through an entity block data processing method that matches the entity data type.
[0047] The above is a detailed description of the first embodiment of a CAD-based geographic information drawing method provided by the present application. The following is a detailed description of the second embodiment of a CAD-based geographic information drawing method provided by the present application.
[0048] See also Figure 1 and Figure 2 Based on the above-mentioned first embodiment, the second embodiment of the present application provides a CAD-based geographic information drawing method.
[0049] Furthermore, the type information mentioned in the first embodiment specifically includes: model space entity block data, symbol entity block data and common entity block data.
[0050] Further, according to the entity data parameters in the entity block data, drawing the entity block data in the layer space by the entity block data processing method specifically includes:
[0051] According to the entity data parameters in the model space entity block data, combined with the basic data, the model space is drawn through the entity block data processing method of the model space entity block data;
[0052] According to entity data parameters in the symbol entity block data, combined with basic data, and through the entity block data processing method of the symbol entity block data, the symbol entity block is drawn in the model space;
[0053] According to the entity data parameters in the ordinary entity block data, combined with the basic data, the ordinary entity block is drawn in the model space through the entity block data processing method of the ordinary entity block data.
[0054] More specifically, when the type information of the entity block data is model space entity block data, the entity block data processing method is specifically as follows:
[0055] The model space is drawn according to the entity data parameters in the model space entity block data, combined with the layer data and the line type data corresponding to the entity data parameters.
[0056] It should be noted that the model space entity block data mentioned in this embodiment specifically refers to the model space in the CAD file. There is no need to perform any offset or symbolization process on the entity data in the model space. The model space can be drawn based on the entity data parameters in the model space entity block data, combined with the layer data and the line type data corresponding to the entity data parameters. At the same time, the model space can be drawn as the basis for drawing symbolic entity block data and ordinary entity block data.
[0057] More specifically, when the type information of the entity block data is symbol entity block data, the entity block data processing method is specifically as follows:
[0058] The symbol entity block is drawn into the model space according to entity data parameters in the symbol entity block data, combined with line type data corresponding to the entity data parameters, and according to the block reference points in the entity data parameters.
[0059] It should be noted that the symbol entity block data mentioned in this embodiment refers to entity data that needs to be converted into symbolic form for display. When processing these blocks, the corresponding symbols are constructed in the software based on the block entity data information. After the symbols are constructed, they can be applied to the AcDbBlockReference in the model space block data to display the symbols in the above-mentioned model space.
[0060] More specifically, when the type information of the entity block data is common entity block data, the entity block data processing method is specifically as follows:
[0061] According to the entity data parameters in the ordinary entity block data, combined with the line data corresponding to the entity data parameters, the ordinary entity is drawn, and the ordinary entity block is loaded into the model space by offsetting according to the block reference point in the entity data parameters.
[0062] It should be noted that the common entity block data mentioned in this embodiment refers to entity block data that is randomly defined by some users but is not popular and rarely used in CAD files. When processing these blocks, the data can be directly drawn and displayed. It should be noted here that the data entity coordinates need to be offset according to the AcDbBlockReference point in the model space block data so that the entity can be displayed in the above-mentioned model space.
[0063] Furthermore, obtaining entity block data and basic data from geographic information CAD files specifically includes:
[0064] The input geographic information CAD file is obtained through the OdDbDatabase data pointer of the ODA library, and the entity block data and basic data are obtained from the geographic information CAD file.
[0065] The above is a detailed description of the second embodiment of a CAD-based geographic information drawing method provided by the present application. The following is a detailed description of the first embodiment of a CAD-based geographic information drawing device provided by the present application.
[0066] See also Figure 3 The third embodiment of the present application provides a CAD-based geographic information drawing device, comprising:
[0067] The data acquisition unit 201 is used to acquire an input geographic information CAD file, and acquire entity block data and basic data from the geographic information CAD file, wherein the basic data includes: layer data and line type data acquired from the geographic information CAD file;
[0068] The entity block data classification unit 202 is used to determine the entity block data processing mode corresponding to the entity block data according to the type information in the entity block data and the corresponding relationship between the type information and the block processing mode;
[0069] The entity block data classification drawing unit 203 is used to draw the entity block data one by one according to the entity data parameters in the entity block data in combination with the basic data through the entity block data processing method.
[0070] The above is a detailed description of the first embodiment of a CAD-based geographic information drawing device provided by the present application. The following is a detailed description of an embodiment of a CAD-based geographic information drawing terminal and an embodiment of a storage medium provided by the present application.
[0071] A fourth embodiment of the present application provides a CAD-based geographic information drawing terminal, comprising: a memory and a processor;
[0072] The memory is used to store program codes corresponding to the CAD-based geographic information drawing method mentioned in the first aspect of the present application;
[0073] The processor is used to execute program code to implement the CAD-based geographic information drawing method mentioned in the first embodiment or the second embodiment of the present application.
[0074] The fifth embodiment of the present application provides a storage medium, in which program codes corresponding to the CAD-based geographic information drawing method mentioned in the first embodiment or the second embodiment of the present application are stored.
[0075] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0076] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0077] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0078] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0079] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0081] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for drawing geographic information based on CAD, characterized in that: include: Acquire an input geographic information CAD file, and acquire entity block data and basic data from the geographic information CAD file, wherein the basic data includes: layer data and line type data acquired from the geographic information CAD file; Determining the entity block data processing mode corresponding to the entity block data according to the type information in the entity block data and the corresponding relationship between the type information and the block processing mode, wherein the type information includes: model space entity block data, symbol entity block data and common entity block data; According to the entity data parameters in the entity block data, combined with the basic data, and through the entity block data processing method, the entity block data are drawn one by one; Wherein, when the type information of the entity block data is model space entity block data, the entity block data processing method is specifically as follows: drawing the model space according to the entity data parameters in the model space entity block data, in combination with the layer data and the line type data corresponding to the entity data parameters; When the type information of the entity block data is symbol entity block data, the entity block data processing method is specifically as follows: according to entity data parameters in the symbol entity block data, combined with line type data corresponding to the entity data parameters, and according to block reference points in the entity data parameters, the symbol entity block is drawn into the model space; When the type information of the entity block data is ordinary entity block data, the entity block data processing method is specifically: according to the entity data parameters in the ordinary entity block data, combined with the line type data corresponding to the entity data parameters, a common entity is drawn, and the block reference point in the entity data parameters is offset to load the common entity block into the model space.
2. A CAD-based geographic information drawing method according to claim 1, characterized in that: Acquiring entity block data and basic data from the geographic information CAD file specifically includes: The input geographic information CAD file is obtained through the OdDbDatabase data pointer of the ODA library, and the entity block data and basic data are obtained from the geographic information CAD file.
3. A CAD-based geographic information drawing device, characterized in that: include: A data acquisition unit, used to acquire an input geographic information CAD file, and acquire entity block data and basic data from the geographic information CAD file, wherein the basic data includes: layer data and line type data acquired from the geographic information CAD file; A physical block data classification unit, used to determine the physical block data processing mode corresponding to the physical block data according to type information in the physical block data and the corresponding relationship between the type information and the block processing mode, wherein the type information includes: model space physical block data, symbol physical block data and common physical block data; A physical block data classification drawing unit, used for drawing the physical block data one by one according to the physical data parameters in the physical block data, combined with the basic data, through the physical block data processing method; Wherein, when the type information of the entity block data is model space entity block data, the entity block data processing method is specifically as follows: drawing the model space according to the entity data parameters in the model space entity block data, in combination with the layer data and the line type data corresponding to the entity data parameters; When the type information of the entity block data is symbol entity block data, the entity block data processing method is specifically as follows: according to entity data parameters in the symbol entity block data, combined with line type data corresponding to the entity data parameters, and according to block reference points in the entity data parameters, the symbol entity block is drawn into the model space; When the type information of the entity block data is ordinary entity block data, the entity block data processing method is specifically: according to the entity data parameters in the ordinary entity block data, combined with the line type data corresponding to the entity data parameters, a common entity is drawn, and the block reference point in the entity data parameters is offset to load the common entity block into the model space.
4. A CAD-based geographic information drawing terminal, characterized in that: include: Memory and processor; The memory is used to store a program code corresponding to the CAD-based geographic information drawing method according to any one of claims 1 to 2; The processor is configured to execute the program code.
5. A storage medium, characterized in that: The storage medium stores program codes corresponding to the CAD-based geographic information drawing method as described in any one of claims 1 to 2.
