A general storage method for DWG format topographic maps

By extending and customizing the expressions of terrain feature entity objects and dynamically compiling, a general library entry method for DWG format terrain map data is realized, solving the problem of poor compatibility of standard data on different platforms, and improving library entry efficiency and accuracy.

CN119225736BActive Publication Date: 2025-03-07NANJING JIANGDI SURVEY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411746119.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-07
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing topographic map data processing platform has poor compatibility with topographic map data not standard on this platform, resulting in a cumbersome process of placing external standard data and requiring dedicated conversion tools.

Method used

The general library entry method of DWG format terrain map is adopted. By obtaining the library entry requirements of terrain feature entity objects, expanding the terrain feature entity objects, customizing selection and value expressions, hashing operations and dynamic compilation, and generating executable code to realize batch library entry processing.

Benefits of technology

It realizes compatibility of topographic map data of different platforms, simplifies the inlet process, and improves the inlet efficiency and the accuracy of data inlet.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225736B_ABST
    Figure CN119225736B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of geographic information technology, and specifically relates to a universal storage method for DWG format topographic maps. The invention realizes the storage of DWG format topographic maps by extending terrain element entity objects, customizing terrain element entity selection expressions, customizing terrain element entity value expressions and field comparison tables, expression hash operations, expression dynamic compilation, compilation result caching and expression batch execution. In addition, the present invention also includes a universal storage system for DWG format topographic maps, which includes modules such as terrain element entity object extension, expression customization, expression dynamic compilation and expression batch execution, and can meet the storage requirements for any standard DWG format topographic maps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of geographic information technology, and in particular relates to a universal storage method for DWG format topographic maps. Background Art

[0002] AutoCAD is widely used in the field of surveying and mapping geographic information due to its high scalability. Common topographic map data processing platforms on the market (such as Southern CASS, Diop SV360, Changzhou CZMap, etc.) are all based on the secondary development of AutoCAD. The DWG format has become the de facto standard for saving topographic map data. With the in-depth application of GIS technology, converting topographic map data in DWG format into GeoDatabase (i.e. "storing") has become a regular demand.

[0003] As a commonly used data format for CAD software, DWG format contains a large amount of topographic map information. Although common topographic map data processing platforms all provide a topographic map data storage function, each platform has its own data standard, is not compatible with topographic map data that is not standard for this platform, and has poor adaptability to external standards. If the storage function of the platform is to be used, the data of the external standard needs to be converted into the data of the platform standard. The conversion work is very cumbersome and requires a special conversion tool. Therefore, the present invention proposes a universal storage method for DWG format topographic maps, aiming to solve the above problems. Summary of the invention

[0004] The purpose of the present invention is to provide a universal storage method for DWG format topographic maps, which can adapt to topographic map data of different platform standards, simplify the storage process, and improve the storage efficiency.

[0005] The technical solution adopted by the present invention is as follows:

[0006] A general storage method for DWG format topographic maps, comprising:

[0007] Obtaining the storage requirements of the terrain element entity object, and expanding the terrain element entity object according to the storage requirements;

[0008] Customize a terrain feature entity selection expression, and select the terrain feature entity objects to be stored in the database through the terrain feature entity selection expression;

[0009] Customizing a terrain element entity value expression, and determining the value of a geographic element entity object according to the terrain element value expression;

[0010] Performing hash operations on the terrain feature entity selection expression and the terrain feature entity value expression to generate a hash value, which is used to uniquely identify each terrain feature entity object, and the hash value is associated with the value of the terrain feature entity object and stored;

[0011] Dynamically compile the terrain element entity selection expression and the terrain element entity value expression to generate executable code to implement the storage operation of the terrain element entity object;

[0012] The terrain feature entity selection expression and the terrain feature entity value expression are executed in batches to complete the batch storage processing of the terrain feature entity objects.

[0013] In a preferred solution, when extending the terrain feature entity object, an extended attribute class under the .Net programming framework is used to attach to the method of the terrain feature entity object, so as to achieve functional expansion of the entity object when the entity object cannot be modified, and all extended methods have return values, and the type of the return value is string, integer, floating point, Boolean or byte array.

[0014] In a preferred solution, when the terrain feature entity object is extended, an extended method attribute is added, and the extended method attribute includes a unique identifier of the method, a name of the method, a function description, a parameter description, a method type, and return value type information.

[0015] In a preferred solution, the hash operation converts the terrain feature entity selection expression and the terrain feature entity value expression into a character string of fixed length through MD5 and SHA hash algorithms, so as to distinguish different terrain feature entity objects.

[0016] In a preferred solution, the dynamic compilation is to convert the terrain element entity selection expression and the terrain element entity value expression into executable code before the terrain element entity object is stored in the library, substitute into the code template or form a complete code block by piecing together the code, and use the compiler to compile it into an assembly and directly load it into the memory for use by the storage tool;

[0017] The compiled results of the code blocks are not only directly loaded into the memory, but also generate a DLL file matching the assembly.

[0018] In a preferred solution, during the code block compilation phase, if the cache area has stored a DLL cache file that matches the expression, the DLL is directly loaded as an assembly; otherwise, dynamic compilation is performed to generate a cache file and store it.

[0019] In a preferred solution, the expression batch execution traverses the storage configuration items in the execution configuration file through the storage tool, and the assembly implements a unified interface. During batch execution, the methods in the interface are uniformly executed.

[0020] In a preferred solution, the storage configuration items include a terrain feature entity selection expression, a target data table, a terrain feature entity value expression and a field comparison table.

[0021] In a preferred embodiment, the steps of the method in the unified execution interface include:

[0022] Read the configuration file, check each storage configuration item in the configuration file, and determine whether the storage configuration item passes the check;

[0023] If the storage configuration item passes the check, an expression hash operation is performed, and it is determined whether the terrain feature entity selection expression and the terrain feature entity value expression have been cached.

[0024] If it has been cached, the DLL file is loaded from the cache area, otherwise dynamic compilation is performed to generate a cache file and store it as a cache assembly;

[0025] Read the DWG file, open the database, execute the terrain feature entity selection expression, and determine whether it passes the selection;

[0026] If the selection is passed, the terrain feature entity value expression is executed and written into the database. Otherwise, the current terrain feature entity object is skipped and the next object is processed.

[0027] After the traversal of the configuration items in the configuration file is completed, the database is closed;

[0028] If the input configuration item fails the check, an error log is output and the operation is stopped.

[0029] The present invention also provides a DWG format topographic map universal storage system, using the above-mentioned DWG format topographic map universal storage method, including:

[0030] A terrain element entity object expansion module, wherein the terrain element entity object expansion module is used to expand the terrain element entity object according to the storage requirement;

[0031] An expression customization module, wherein the expression customization module is used to customize a terrain feature entity selection expression and a terrain feature entity value expression;

[0032] An expression dynamic compilation module, the expression dynamic compilation module is used to compile using a compiler that matches the terrain feature entity selection expression and the terrain feature entity value expression, and to load the code block formed by substituting the template or piecing together the code into the memory, or to directly load an existing assembly from the cache based on the hash value of the code block;

[0033] An expression batch execution module traverses the configuration file based on the storage configuration file and writes it into the target database.

[0034] The technical effects achieved by the present invention are:

[0035] 1. The present invention adopts a method of extending terrain feature entity objects. When the basic functions of the AutoCAD platform cannot be modified, an effective method for implementing functional extension of terrain feature entities using the ExtensionAttribute class under the .Net programming framework is proposed, thereby enhancing the adaptability of industry applications.

[0036] 2. By adopting the method of the present invention, corresponding configuration files can be customized for different data standards without modifying the storage tool, which reduces the workload of storage tool development and improves the versatility of the storage tool.

[0037] 3. By optimizing the terrain feature entity selection expression and value expression, an accurate mapping relationship between the terrain feature entity and the target database can be established, thereby improving the accuracy of data entry. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic flow chart of the method of the present invention;

[0039] Figure 2 It is a schematic diagram of the system module of the present invention;

[0040] Figure 3 It is a schematic diagram of the execution flow of the expression batch execution module of the present invention. DETAILED DESCRIPTION

[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0042] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0043] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" that appears in different places in this specification does not refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0044] AutoCAD is widely used in the field of surveying and mapping geographic information due to its high scalability. Common topographic map data processing platforms on the market (such as Southern CASS, Diop SV360, Changzhou CZMap, etc.) are all based on the secondary development of AutoCAD. The DWG format has become the de facto standard for preserving topographic map data. With the in-depth application of GIS technology, converting topographic map data in DWG format into GeoDatabase (i.e. "storing") has become a routine requirement.

[0045] See also Figure 1 As shown, the present invention provides a general storage method for DWG format topographic maps, comprising:

[0046] S1. Obtaining the storage requirements of terrain element entity objects, and expanding the terrain element entity objects according to the storage requirements;

[0047] In step S1, when the terrain feature entity object needs to perform a warehousing operation, the warehousing requirements of the terrain feature entity object are first obtained. This step is the basis of the entire warehousing process. The acquisition of the warehousing requirements can be achieved through user input, system configuration or other methods. After obtaining the warehousing requirements, the terrain feature entity object can be necessary extended according to the requirements to ensure the smooth progress of the warehousing process. Specifically, by using the ExtensionAttribute class under the .Net programming framework and the custom ExtendMethodAttribute class to attach to the method of operating the entity object, the ExtensionAttribute class is used to implement the functional extension of the entity object, and the ExtendMethodAttribute class is used to uniformly manage the extension method, that is, when extending the terrain feature entity object, the extension attribute class under the .Net programming framework is used to attach to the method of the terrain feature entity object, so as to achieve the functional extension of the entity object when the entity object cannot be modified. In the process of using the .Net programming framework, it is often encountered that the existing classes or objects need to be functionally extended. However, not all cases have the authority or ability to modify the source code of these classes or objects. In order to solve this problem, The extended attribute class is used to implement the functional extension of the entity object. The extended attribute class is a special class that allows adding new attributes or methods to the class without modifying the original class definition. Specifically, this function can be implemented by creating an extended attribute class and defining static methods in the class. The static method can be attached to any terrain feature entity object, thereby adding new functions to it without changing the original entity object. All extended methods have return values, and the return value type is string, integer, floating point, Boolean or byte array. In addition, in order to facilitate the management of the extended methods, a custom ExtendMethodAttribute class is attached to the extended method to uniformly manage the extended methods. When extending the terrain feature entity object, the extended method attributes are attached. The extended method attributes include the unique identifier of the method, the name of the method, the function description, the parameter description, the type of the method, and the return value type information. Among them, the extended method attributes also include the permission level of the method and the module information to which it belongs, so as to ensure the use security and modular management of the extended method. In this way, new functions can be flexibly added to the terrain feature entity object without modifying its original code, thereby improving the maintainability and extensibility of the system.

[0048] Among them, an extension method example is as follows (only the code framework is given):

[0049] Private Const _GUID As String = "6A9D022C-76F2-47AD-9494-CC309DE875C0"

[0050] Private Const _Name As String = "Get the text value of the entity object"

[0051] Private Const _Value As String = "Ent.GetTextValue([NullValue]) = ?"

[0052] Private Const _Describe As String = "Get the text value of the entity object. The text object returns its text content, and other objects return NullValue"

[0053] Private Const _Return As String = "The return value is character type"

[0054] <ExtensionAttribute(), ExtendMethodAttribute(_GUID, _Name, _Value, _Describe, True, "GetTextValue", ExtendMethodType.GetValue, _Return)> _

[0055] Public Function GetTextValue(ByVal Ent As Entity, OptionalByVal NullValue As Object = "") As String

[0056] 'Code implementation part is omitted

[0057] End Function.

[0058] S2. Customize the terrain feature entity selection expression, and select the terrain feature entity objects to be stored in the database through the terrain feature entity selection expression;

[0059] In step S2, the terrain feature entity selection expression is customized based on the VisualBaisc.Net syntax specification using the native method of the terrain feature entity object or the newly extended method and other statements under the .Net programming framework, including but not limited to the type, name, attribute, etc. of the terrain feature, so as to achieve accurate selection of a specific terrain feature entity object. The customized terrain feature entity selection expression can be a simple conditional statement or a complex query statement to meet different warehousing requirements. In this way, the user can flexibly define the scope and conditions of the warehousing data to ensure the accuracy and efficiency of the warehousing process. In addition, it should be clear that the return value type of the terrain feature entity selection expression must be Boolean.

[0060] S3, customizing the terrain element entity value expression, and determining the value of the geographic element entity object according to the terrain element value expression;

[0061] In step S3, the terrain feature entity value expression is customized based on the VisualBaisc.Net syntax specification using the terrain feature entity object native method or the newly extended method and other statements under the .Net programming framework, including but not limited to the attribute value, coordinate value, relationship, etc. of the terrain feature, so as to achieve precise control over the value of the geographic feature entity object. The customized terrain feature entity value expression can be a simple value statement or a complex calculation expression to meet different warehousing requirements. In this way, the user can flexibly define the specific content and format of the warehousing data to ensure the accuracy and efficiency of the warehousing process. The return value type of the terrain feature entity value expression can be a string, integer, floating point, Boolean or byte array.

[0062] S4, performing hash operation on the terrain feature entity selection expression and the terrain feature entity value expression to generate a hash value, which is used to uniquely identify each terrain feature entity object, and the hash value is associated with the value of the terrain feature entity object and stored;

[0063] In step S4, in order to further ensure the uniqueness and traceability of the data, the terrain feature entity selection expression and the terrain feature entity value expression are hashed to generate unique hash values. These hash values ​​will be used to uniquely identify each type of terrain feature entity object, and these hash values ​​will be associated with the values ​​of the terrain feature entity objects and stored. In this way, even in the case of a large amount of data, each type of terrain feature entity object can be quickly and accurately retrieved and managed. The hash operation converts the terrain feature entity selection expression and the terrain feature entity value expression into a fixed-length string through the MD5 and SHA hash algorithms to distinguish different terrain feature entity objects, thereby ensuring the integrity and consistency of the data. The generation and storage process of the hash value is automated, reducing manual intervention and improving the efficiency and accuracy of the warehousing operation.

[0064] The hash operation is not limited to MD5 and SHA, as long as different expressions are converted into non-repetitive strings that comply with the file naming rules of the operating system.

[0065] S5, dynamically compile the terrain feature entity selection expression and the terrain feature entity value expression to generate executable code to implement the storage operation of the terrain feature entity object;

[0066] In step S5, in order to implement the storage operation of the terrain feature entity object, it is necessary to dynamically compile the terrain feature entity selection expression and the terrain feature entity value expression. Through dynamic compilation, executable codes are generated. These codes can efficiently execute the storage operation of the terrain feature entity object, thereby improving the storage efficiency. Dynamic compilation is to convert the terrain feature entity selection expression and the terrain feature entity value expression into executable codes before the terrain feature entity object is stored in the library, substitute them into code templates or form a complete code block by piecing together codes, and use the compiler to compile them into an assembly and directly load them into the memory for use by the storage tool. In addition to loading the results of code block compilation directly into memory, a DLL file matching the assembly is also generated for subsequent calling and execution, ensuring the flexibility and reusability of the code. The dynamic compilation process is transparent, and users do not need to care about the underlying compilation details, but only need to focus on the logical correctness of the expression. In this way, errors caused by manual code writing can be effectively reduced, while speeding up the development cycle and improving the automation of warehousing operations. In addition, dynamic compilation also supports instant error detection and feedback, so that potential problems can be discovered and corrected during the compilation stage, further improving the stability and reliability of warehousing operations.

[0067] In the code block compilation phase, if the cache area has stored a DLL cache file that matches the expression, the DLL is directly loaded as an assembly, otherwise dynamic compilation is performed to generate a cache file and store it.

[0068] S6, batch execute terrain feature entity selection expression and terrain feature entity value expression to complete batch storage processing of terrain feature entity objects;

[0069] In step S6, terrain feature entity selection expressions and terrain feature entity value expressions are executed in batches to complete batch storage processing of terrain feature entity objects. Through batch processing, the efficiency of storage operations can be significantly improved, and the time required for a single storage operation can be reduced, thereby improving the efficiency and reliability of the entire storage process. Expression batch execution traverses the storage configuration items in the execution configuration file through the storage tool, and the unified interface is implemented by the assembly. During batch execution, the methods in the interface are uniformly executed, and the storage configuration items include terrain feature entity selection expressions, target data tables, terrain feature entity value expressions, and field comparison tables;

[0070] The steps of uniformly executing the methods in the interface include:

[0071] Read the configuration file, check each storage configuration item in the configuration file, and determine whether the storage configuration item passes the check;

[0072] If the configuration item passed the check, the expression hash operation is performed, and it is determined whether the terrain feature entity selection expression and the terrain feature entity value expression have been cached.

[0073] If it has been cached, the DLL file is loaded from the cache area, otherwise dynamic compilation is performed to generate a cache file and store it as a cache assembly;

[0074] Read the DWG file, open the database, execute the terrain feature entity selection expression, and determine whether it passes the selection;

[0075] If the selection is passed, the terrain feature entity value expression is executed and written into the database. Otherwise, the current terrain feature entity object is skipped and the next object is processed.

[0076] After the traversal of the configuration items in the configuration file is completed, the database is closed;

[0077] If the incoming configuration item fails the check, an error log is output and the operation stops.

[0078] In the above steps, in order to ensure the uniformity of the execution steps of the methods in the interface, the configuration file needs to be read first. After reading the configuration file, the next step is to carefully check the various storage configuration items in the configuration file. The inspection process is to ensure that all configuration items meet the predetermined requirements and standards. Only when the storage configuration items pass this series of inspections can the subsequent operations be continued. If the storage configuration items pass the inspection smoothly, the expression hash operation needs to be performed next. In this process, it is necessary to determine whether the terrain feature entity selection expression and the terrain feature entity value expression have been cached. If the terrain feature entity selection expression and the terrain feature entity value expression have been cached, then the corresponding DLL file can be directly loaded from the cache area. The purpose is to improve the execution efficiency and avoid repeated compilation processes. However, if the terrain feature entity selection expression and the terrain feature entity value expression have not been cached, then it is necessary to perform a dynamic compilation process to generate the corresponding cache file and store the cache file as a cache assembly. The dynamic compilation process is to ensure that the expression can be executed correctly and can be quickly called in future uses. After completing the hash operation and cache check of the expression, it is necessary to read the DWG file and read the DW G file, the database is opened synchronously. Once the database is opened, the terrain feature entity selection expression will be executed and the result will be judged to determine whether it has passed the selection process. If the result of the terrain feature entity selection expression is passed, the terrain feature entity value expression will be executed and the result will be written to the database. The purpose is to store the relevant data of the terrain feature entity in the database for subsequent query and use. However, if the result of the terrain feature entity selection expression is not passed, the current terrain feature entity object will be skipped and no further processing will be performed on it. Instead, the next terrain feature entity object will be processed. This processing method is to ensure the continuity and efficiency of data processing. After the traversal of the storage configuration items in the configuration file is completed, the database needs to be closed to release system resources and ensure the consistency and integrity of the data. Finally, if any configuration item is found to have failed the inspection during the inspection of the storage configuration items, the error log needs to be output to record the specific error information and stop the program from running to ensure that the problem can be handled in a timely manner when it is found, and to prevent the spread of errors and data damage, so as to ensure that the execution steps of the method in the interface are unified, and various situations can be effectively handled during the execution process to ensure the accuracy and efficiency of data processing.

[0079] See also Figure 2 A DWG format topographic map universal storage system, using the above-mentioned DWG format topographic map universal storage method, includes:

[0080] A terrain element entity object extension module is used to extend the terrain element entity object according to storage requirements;

[0081] An expression customization module is used to customize the terrain feature entity selection expression and the terrain feature entity value expression;

[0082] The expression dynamic compilation module is used to compile the code block formed by substituting the template or piecing together the code and load it into the memory, or directly load the existing assembly from the cache based on the hash value of the code block;

[0083] The expression batch execution module traverses the configuration files based on the storage configuration files and writes them to the target database.

[0084] In the above, the system includes a terrain element entity object extension module, an expression customization module, an expression dynamic compilation module and an expression batch execution module. The main function of the terrain element entity object extension module is to make necessary extensions to the terrain element entity objects according to the storage requirements, so that users can customize the extensions to the terrain element entity objects according to actual needs to meet the specific needs in the storage process. The main responsibility of the expression customization module is to customize the terrain element entity selection expression and the terrain element entity value expression, so that users can flexibly define and modify the selection and value rules of the terrain element entity, thereby realizing the precise control and management of the terrain element entity. The expression dynamic compilation module can be used to customize the terrain element entity selection expression and the terrain element entity value expression, so that users can flexibly define and modify the selection and value rules of the terrain element entity, thereby realizing the precise control and management of the terrain element entity. The main function of the translation module is to use a compiler that matches the terrain feature entity selection expression and the terrain feature entity value expression for compilation, so that the code block formed by substituting into the template or piecing together the code can be compiled into an executable assembly and loaded into the memory, or the existing assembly can be directly loaded from the cache area based on the hash value of the code block, thereby improving the system's operating efficiency and response speed. The main function of the expression batch execution module is to traverse the configuration file based on the storage configuration file and write it to the target database, so that a large number of storage tasks can be automatically processed, thereby improving the efficiency and accuracy of the storage work, and providing strong support for the management and application of topographic map data.

[0085] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0086] The above is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention shall be implemented according to the conventional means in the art unless otherwise specified and limited.

Claims

1. A general storage method for DWG format topographic maps, characterized by: include: Obtaining the storage requirements of the terrain element entity object, and expanding the terrain element entity object according to the storage requirements; Customize a terrain feature entity selection expression, and select the terrain feature entity objects to be stored in the database through the terrain feature entity selection expression; Customizing a terrain element entity value expression, and determining the value of a geographic element entity object according to the terrain element value expression; Performing hash operations on the terrain feature entity selection expression and the terrain feature entity value expression to generate a hash value, which is used to uniquely identify each terrain feature entity object, and the hash value is associated with the value of the terrain feature entity object and stored; Dynamically compile the terrain element entity selection expression and the terrain element entity value expression to generate executable code to implement the storage operation of the terrain element entity object; Batch execute the terrain element entity selection expression and terrain element entity value expression to complete batch storage processing of terrain element entity objects; Wherein, when the terrain feature entity object is extended, the extended attribute class under the .Net programming framework is used to attach to the method of the terrain feature entity object, so as to achieve the function extension of the entity object when the entity object cannot be modified, and all the extended methods have return values, and the type of the return value is string, integer, floating point, Boolean or byte array; When the terrain feature entity object is extended, an extended method attribute is added, and the extended method attribute includes a unique identifier of the method, a name of the method, a function description, a parameter description, a method type, and return value type information.

2. A universal storage method for DWG format topographic maps according to claim 1, characterized in that: The hash operation converts the terrain feature entity selection expression and the terrain feature entity value expression into a character string of fixed length through MD5 and SHA hash algorithms, so as to distinguish different terrain feature entity objects.

3. A universal storage method for DWG format topographic maps according to claim 1, characterized in that: The dynamic compilation is to convert the terrain element entity selection expression and the terrain element entity value expression into executable code before the terrain element entity object is stored in the library, substitute into the code template or form a complete code block by piecing together the code, and use the compiler to compile it into an assembly and directly load it into the memory for use by the storage tool; The compiled results of the code blocks are not only directly loaded into the memory, but also generate a DLL file matching the assembly.

4. A universal storage method for DWG format topographic maps according to claim 3, characterized in that: During the code block compilation phase, if the cache area has stored a DLL cache file that matches the expression, the DLL is directly loaded as an assembly, otherwise dynamic compilation is performed to generate a cache file and store it.

5. A universal storage method for DWG format topographic maps according to claim 4, characterized in that: The expression batch execution traverses the storage configuration items in the execution configuration file through the storage tool, and the assembly implements a unified interface. During batch execution, the methods in the interface are uniformly executed.

6. A universal storage method for DWG format topographic maps according to claim 5, characterized in that: The storage configuration items include terrain feature entity selection expressions, target data tables, terrain feature entity value expressions and field comparison tables.

7. A universal storage method for DWG format topographic maps according to claim 5, characterized in that: The steps of the method in the unified execution interface include: Read the configuration file, check each storage configuration item in the configuration file, and determine whether the storage configuration item passes the check; If the storage configuration item passes the check, an expression hash operation is performed, and it is determined whether the terrain feature entity selection expression and the terrain feature entity value expression have been cached. If it has been cached, the DLL file is loaded from the cache area, otherwise dynamic compilation is performed to generate a cache file and store it as a cache assembly; Read the DWG file, open the database, execute the terrain feature entity selection expression, and determine whether it passes the selection; If the selection is passed, the terrain feature entity value expression is executed and written into the database. Otherwise, the current terrain feature entity object is skipped and the next object is processed. After the traversal of the configuration items in the configuration file is completed, the database is closed; If the input configuration item fails the check, an error log is output and the operation is stopped.

8. A universal storage system for DWG format topographic maps, characterized by: The method for storing DWG format topographic maps in a universal manner according to any one of claims 1 to 7 comprises: A terrain element entity object expansion module, wherein the terrain element entity object expansion module is used to expand the terrain element entity object according to the storage requirement; An expression customization module, wherein the expression customization module is used to customize a terrain feature entity selection expression and a terrain feature entity value expression; An expression dynamic compilation module, the expression dynamic compilation module is used to compile using a compiler that matches the terrain feature entity selection expression and the terrain feature entity value expression, and to load the code block formed by substituting the template or piecing together the code into the memory, or to directly load an existing assembly from the cache based on the hash value of the code block; An expression batch execution module, which traverses the configuration files based on the storage configuration files and writes them into the target database; Wherein, when the terrain feature entity object is extended, the extended attribute class under the .Net programming framework is used to attach to the method of the terrain feature entity object, so as to achieve the function extension of the entity object when the entity object cannot be modified, and all the extended methods have return values, and the type of the return value is string, integer, floating point, Boolean or byte array; When the terrain feature entity object is extended, an extended method attribute is added, and the extended method attribute includes a unique identifier of the method, a name of the method, a function description, a parameter description, a method type, and return value type information.

Citation Information

Patent Citations

  • Method for realizing DWG graphic attribute and database synchronization

    CN103455548A

  • A code compilation generation tool based on dynamic compilation and a dynamic compilation method

    CN109947430A