A method and device for converting DGN data into GIS data format

The conversion of DGN data to GIS data through layer correspondence and attribute preservation addresses the complexity and information loss issues of traditional methods, achieving efficient and accurate data transfer for the coal industry.

CN114428817BActive Publication Date: 2025-03-14AERIAL PHOTOGRAMMETRY & REMOTE SENSING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210093640.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-03-14
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

Traditional methods for converting DGN data to GIS data are complex, labor-intensive, and result in significant loss of attribute information such as line styles, symbol names, annotation styles, and fill block properties, failing to meet the needs of the coal industry's large-scale production requirements.

Method used

A method and apparatus for converting DGN data to GIS data by layer correspondence, identifying non-text data for roughness conversion and coordinate marking, transforming point and line data into GIS format with preserved attributes, and storing the converted data in GIS format, ensuring accurate and efficient data transfer.

Benefits of technology

The method enhances the efficiency of DGN data conversion to GIS data while preserving attribute information, ensuring accurate and efficient data conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428817B_ABST
    Figure CN114428817B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for format conversion from DGN data to GIS data. The method comprises: converting each layer in a DGN file into a GIS format data layer according to a data layer correspondence; if the DGN data is non-text data, performing a coarseness conversion on the DGN data according to a coarseness correspondence and marking the corresponding coordinate information; converting the point data in the DGN format into a physical symbol in the GIS format according to the corresponding data attributes; and / or, performing a line type conversion on the line data in the DGN format according to a line type correspondence, and setting a line type ratio and a line type coarseness to obtain line data in the GIS format; based on the marked coordinate information, storing the physical symbol in the GIS format and the line data in the GIS format in the data layer in the GIS format to obtain a converted GIS file. The present application can improve the efficiency of converting DGN data into GIS data and ensure the accuracy of data conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for format conversion from DGN data to GIS data. Background Art

[0002] The DGN file format is a data format supported by Bentley Engineering Software Systems, Inc. and is widely used in aerial topographic maps. Some Geographic Information System (GIS) drawing software has standard lithology codes and professional symbol libraries specified in the coal industry, and can also achieve network remote management, which is suitable for the needs of mine surveying. Therefore, for large-scale production in the coal industry, converting DGN data into GIS data is an urgent problem to be solved.

[0003] The traditional data conversion method has complicated steps, consumes a lot of manpower and causes serious loss of attribute information of the data output, such as line type, line width, scale, symbol name, angle, annotation style and size, area fill block, etc., which makes it difficult to meet actual usage needs. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a method and device for format conversion from DGN data to GIS data. The specific scheme is as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for format conversion from DGN data to GIS data, the method comprising:

[0006] Convert each layer in the DGN file into a GIS format data layer according to the corresponding relationship of the data layers, wherein the DGN file is composed of different layers;

[0007] Determine whether the DGN data in each layer is non-text data;

[0008] If the DGN data is non-text data, the DGN data is roughened according to the roughness correspondence and the corresponding coordinate information is marked, wherein the types of the non-text data after the roughness conversion include point data in DGN format and line data in DGN format;

[0009] Converting the point data in the DGN format into entity symbols in the GIS format according to corresponding data attributes; and / or,

[0010] The line data in the DGN format is converted into a line type according to the line type correspondence, and the line type ratio and line type thickness are set to obtain the line data in the GIS format;

[0011] Based on the marked coordinate information, the entity symbols in the GIS format and the line data in the GIS format are stored in the data layer in the GIS format to obtain a converted GIS file.

[0012] According to a specific implementation method disclosed in the present application, the data attributes include the name, angle and scale of the point data, and the step of converting the point data in the DGN format into a physical symbol in the GIS format according to the corresponding data attributes includes:

[0013] Create initial entity symbols in GIS format;

[0014] Transferring the name, the angle and the scale of the point data in the DGN format to the initial entity symbol in the GIS format;

[0015] The initial entity symbol in GIS format is adjusted in name, angle and proportion according to the name, angle and proportion of the point data in DGN format to obtain a target entity symbol in GIS format corresponding to the point data in DGN format.

[0016] According to a specific implementation method disclosed in the present application, the line data in the DGN format is single-line data, and the single-line data includes continuous line data and discontinuous line data;

[0017] The step of converting the line data in the DGN format into a line type according to the line type correspondence relationship comprises:

[0018] Determine whether the line data in the DGN format is non-continuous line data;

[0019] If the line data in the DGN format is discontinuous line data, resetting the discontinuous line data to continuous line data by using a reset function;

[0020] If the line data in the DGN format is continuous line type data, the continuous line type data is converted into a line type according to a line type correspondence relationship.

[0021] According to a specific implementation method disclosed in the present application, the line data in the DGN format is composite line data, and the composite line data includes at least one closed primitive composed of multiple single line data;

[0022] The step of converting the line data in the DGN format into a line type according to the line type correspondence relationship comprises:

[0023] Performing line type conversion on each single line type data in the composite line type data according to the line type corresponding relationship;

[0024] Determine whether the area of ​​the closed primitive in the composite line type data is greater than a threshold;

[0025] If the area of ​​the closed primitive in the composite line type data is greater than a threshold, the closed primitive is filled.

[0026] According to a specific implementation method disclosed in the present application, after the step of determining whether the DGN data in each layer is non-text data, the method further includes:

[0027] If the DGN data is text data, the text data in DGN format is converted into text according to the font family correspondence and the font size correspondence to obtain the text data in GIS format and mark the corresponding coordinate information;

[0028] Based on the marked coordinate information, the text data in the GIS format is stored in the data layer in the GIS format to obtain a converted GIS file.

[0029] According to a specific implementation method disclosed in the present application, the step of converting text data in DGN format according to the font family correspondence and the font size correspondence includes:

[0030] Performing font family conversion on the text data in the DGN format according to the font family correspondence, wherein the types of the text data after the font family conversion include digital text and non-digital text;

[0031] The digital text is converted into a font size according to a first font size correspondence, and the non-digital text is converted into a font size according to a second font size correspondence.

[0032] In a second aspect, an embodiment of the present application provides a device for format conversion from DGN data to GIS data, the device comprising:

[0033] A layer conversion module, used to convert each layer in the DGN file into a GIS format data layer according to the corresponding relationship of the data layers, wherein the DGN file is composed of different layers;

[0034] A judging module, used for judging whether the DGN data in each layer is non-text data;

[0035] A coarseness conversion module, for, if the DGN data is non-text data, performing coarseness conversion on the DGN data according to the coarseness correspondence and marking corresponding coordinate information, wherein the types of the non-text data after coarseness conversion include point data in DGN format and line data in DGN format;

[0036] A point data conversion module, used to convert the point data in the DGN format into entity symbols in the GIS format according to corresponding data attributes; and / or,

[0037] A line data conversion module is used to convert the line data in the DGN format into a line type according to the line type correspondence, and to set the line type ratio and line type thickness to obtain the line data in the GIS format;

[0038] The comprehensive conversion module is used to store the entity symbols in the GIS format and the line data in the GIS format in the data layer in the GIS format based on the marked coordinate information to obtain a converted GIS file.

[0039] According to a specific implementation method disclosed in the present application, the data attributes include the name, angle and scale of the point data, and the point data conversion module is specifically used to:

[0040] Create initial entity symbols in GIS format;

[0041] Transferring the name, the angle and the scale of the point data in the DGN format to the initial entity symbol in the GIS format;

[0042] The initial entity symbol in GIS format is adjusted in name, angle and proportion according to the name, angle and proportion of the point data in DGN format to obtain a target entity symbol in GIS format corresponding to the point data in DGN format.

[0043] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed on the processor, the method for format conversion from DGN data to GIS data as described in any one of the embodiments of the first aspect is implemented.

[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed on a processor, the method for format conversion from DGN data to GIS data described in any one of the embodiments in the first aspect is implemented.

[0045] Compared with the prior art, this application has the following beneficial effects:

[0046] The format conversion method from DGN data to GIS data provided by the present application converts each layer in the DGN file into a GIS format data layer according to the data layer correspondence; determines whether the DGN data in each layer is non-text data; if the DGN data is non-text data, performs coarseness conversion on the DGN data according to the coarseness correspondence and marks the corresponding coordinate information; converts the point data in the DGN format into the entity symbol in the GIS format according to the corresponding data attributes; and / or, performs line type conversion on the line data in the DGN format according to the line type correspondence, and sets the line type ratio and line type coarseness to obtain the line data in the GIS format; based on the marked coordinate information, stores the entity symbol in the GIS format and the line data in the GIS format in the data layer in the GIS format to obtain the converted GIS file. The present application can improve the efficiency of converting DGN data into GIS data, while retaining the attribute information of the DGN data, and ensuring the accuracy of data conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0048] Figure 1 One of the flow charts of a method for format conversion from DGN data to GIS data provided in an embodiment of the present application;

[0049] Figure 2 A composite line type schematic diagram involved in a method for converting a DGN data format to a GIS data format provided in an embodiment of the present application;

[0050] Figure 3 A module block diagram of a device for format conversion from DGN data to GIS data provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0052] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0053] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0054] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0055] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.

[0056] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0057] See also Figure 1 , which is one of the flow charts of a method for converting the format of DGN data to GIS data provided in an embodiment of the present application. Figure 1 As shown, the method mainly includes:

[0058] Step S101 : converting each layer in a DGN file into a GIS format data layer according to a corresponding relationship between data layers, wherein the DGN file is composed of different layers.

[0059] For DGN files, a layer is a collection of different geographic data or DGN data, and a DGN file is composed of different layers. Therefore, when converting DGN data to GIS data, it is necessary to convert each layer in the DGN file into a GIS format data layer according to the data layer correspondence, and then convert the DGN data in each layer into GIS data and store it in the corresponding GIS format data layer. In specific implementation, the data layer correspondence can be shown in Table 1:

[0060] Table 1

[0061]

[0062] Among them, A refers to the layer in DGN format, and B refers to the data layer in GIS format.

[0063] It should be noted that the GIS system mentioned in the embodiments of the present application refers to GIS software with standard lithology codes and professional symbol libraries in accordance with coal industry specifications, such as "Longruan GIS". Based on the embodiments of the present invention, data conversion methods applied to other GIS software or systems with unique characteristics of the coal industry obtained by those skilled in the art without creative work also fall within the scope of protection of the present invention and are not further limited here.

[0064] Step S102, determining whether the DGN data in each layer is non-text data.

[0065] After converting each layer in the DGN file into a GIS format data layer, the DGN data in each layer can be converted into GIS data. According to the geometric type of DGN data, it can be divided into text data and non-text data. Different data conversion methods can be used to convert different types of DGN data into GIS data. The embodiment of this application first introduces the process of converting text data into GIS data.

[0066] Step S103: if the DGN data is non-text data, the DGN data is coarsely converted according to the coarseness correspondence and the corresponding coordinate information is marked, wherein the types of the non-text data after coarseness conversion include point data in DGN format and line data in DGN format.

[0067] If the DGN data is non-text data, the DGN data can be first converted to coarseness according to the coarseness correspondence, and then the type of the non-text data after coarseness conversion can be secondary classified to obtain point data in DGN format and line data in DGN format. Alternatively, the non-text data can be first classified into point data in DGN format and line data in DGN format, and then the two different types of non-text data can be converted to coarseness. The above two implementation methods can be selected or switched according to the actual use needs and application scenarios of the user, and no specific limitations are made here. The specific coarseness correspondence can be referred to Table 2:

[0068] Table 2

[0069]

[0070] Among them, weight refers to the coarseness in DGN format, and WT is the coarseness corresponding to the preset scale in GIS format. Depending on the scale, other corresponding relationships of coarseness can be created. For example, at a scale of 2000, the coarseness in WT2 can be converted.

[0071] Since DGN data is generally closely related to geographic information, when converting the data format, the coordinate information of each DGN data should be marked at the same time, and the coordinate information should be transferred to the converted GIS data. Considering that the layers in the DGN file can also be divided into three-dimensional information layers and non-three-dimensional information layers according to their types. Among them, for the three-dimensional information layer, the three-dimensional coordinate information of the DGN data therein is very important for subsequent research and editing. The coordinate information marked in the previous article can be the three-dimensional coordinate information of each DGN data in all layers; it can also contain only x and y values; it can also mark the three-dimensional coordinate values ​​of each DGN data in the three-dimensional information layer, and mark the x and y values ​​of each DGN data in the non-three-dimensional information layer.

[0072] In specific implementation, the x and y values ​​of the coordinates corresponding to each DGN data in all layers can be marked first. Then, according to the name of the layer, conditional judgment can be made to select the three-dimensional information layer. The name of the general three-dimensional information layer includes preset nouns, such as: elevation point, contour line, etc. After determining the three-dimensional information layer, the z value of each DGN data in the three-dimensional information layer is added to the previously marked coordinate information. This processing can greatly reduce the amount of calculation in the coordinate marking process and improve the operation efficiency.

[0073] Step S104: converting the point data in the DGN format into entity symbols in the GIS format according to corresponding data attributes.

[0074] Step S104 is an explanation of the specific implementation process of the point data in the non-text data, and the specific implementation process of the line data can refer to step S105. There is no limitation on the order of step S104 and step S105, and step S104 can be executed first, and then step S105; step S105 can be executed first, and then step S104; step S104 and step S105 can also be executed simultaneously.

[0075] Point data in DGN format is represented as "blocks" in GIS files, i.e. entity symbols. Point data in DGN format includes different data attributes. Although such data attributes are not displayed intuitively in DGN files, they need to be transferred to the converted "blocks" during data conversion and reflected as symbol information of the "blocks".

[0076] The data attributes include the name, angle and scale of the point data. The step of converting the point data in the DGN format into entity symbols in the GIS format according to the corresponding data attributes includes:

[0077] Create initial entity symbols in GIS format;

[0078] Transferring the name, the angle and the scale of the point data in the DGN format to the initial entity symbol in the GIS format;

[0079] The initial entity symbol in GIS format is adjusted in name, angle and proportion according to the name, angle and proportion of the point data in DGN format to obtain a target entity symbol in GIS format corresponding to the point data in DGN format.

[0080] First, according to the number of point data that need to be converted in the DGN data, the same number of initial entity symbols can be created in the corresponding data layer. The initial entity symbol is a basic block that does not contain any symbol information, or is only initialized. Then, the data attributes such as name, angle and scale in the point data in the DGN format are transferred to the initial entity symbol, so that the initial entity symbol is adjusted according to these data attributes to obtain the target entity symbol that can reflect the specific feature information.

[0081] Step S105 , converting the line data in the DGN format into a line type according to the line type correspondence, and setting the line type ratio and line type thickness to obtain the line data in the GIS format.

[0082] In specific implementation, the line data in DGN format includes single line data and compound line data, and the compound line data includes at least one closed primitive composed of multiple single line data. The present application embodiment introduces the line type conversion process of the two types of line data respectively:

[0083] 1. The line data in the DGN format is single-line data. Single-line data can also be divided into continuous line data and non-continuous line data, such as continuous straight lines and dashed line segments. In a GIS system or GIS file, non-continuous line data is a non-standard element, while continuous line data is a standard element and can be directly displayed or operated in other ways in a GIS system.

[0084] It can be determined whether the line data in the DGN format is non-continuous line data. If the line data in the DGN format is non-continuous line data, the non-continuous line data is reset to continuous line data through a reset function. If the line data in the DGN format is continuous line data, the continuous line data is converted to a line type according to a line type correspondence. The specific line type correspondence can be referred to Table 3:

[0085] Table 3

[0086]

[0087] Among them, linetype refers to the line type in DGN format; newLinetype is the line type in GIS format.

[0088] In specific implementation, for any special line type that does not belong to the preset line type correspondence table, the special line type can be selected according to the line type name in the DGN format, such as: single-line dry ditch, and then a specific thickness value is assigned to this special line type.

[0089] 2. The line data in the DGN format is composite line data. The step of converting the line data in the DGN format into a composite line type according to the line type correspondence relationship comprises:

[0090] Performing line type conversion on each single line type data in the composite line type data according to the line type corresponding relationship;

[0091] Determine whether the area of ​​the closed primitive in the composite line type data is greater than a threshold;

[0092] If the area of ​​the closed primitive in the composite line type data is greater than a threshold, the closed primitive is filled.

[0093] In actual implementation, after the composite line type is broken, the filled surface often cannot be displayed correctly and needs to be filled and displayed. Common composite line types such as railways, see Figure 2 , Figure 2 A composite line type schematic diagram involved in a format conversion method from DGN data to GIS data provided in an embodiment of the present application, in which "railway" is displayed by a combination of lines and filled surfaces in a GIS file. Based on the conversion process of the "single line type data" described above, the area size of the closed primitives in the composite line type data can be conditionally judged, and the closed primitives that meet the requirements can be filled.

[0094] Step S106, based on the marked coordinate information, storing the entity symbol in the GIS format and the line data in the GIS format in the data layer in the GIS format to obtain a converted GIS file.

[0095] After converting the point data in DGN format into entity symbols in GIS format, and converting the line data in DGN format into line data in GIS format, based on the coordinate information marked in step S102, the entity symbols in GIS format and the line data in GIS format are stored in corresponding positions in the data layer to obtain the converted GIS file.

[0096] In addition, in the specific implementation, different colors are used to mark various elements in the DGN file, and different categories of elements or feature classes are displayed in different colors, so that users can read and use the map more intuitively during use or editing. Therefore, this part of the color information should also be transferred to the data layer of the converted GIS file when the data format is converted. The specific color correspondence can be referred to Table 4:

[0097] Table 4

[0098]

[0099] Among them, c refers to the color number in DGN format, and newc refers to the RGB value in GIS format.

[0100] For the conversion of text-type DGN data into GIS data, after the step S102 of determining whether the DGN data in each layer is non-text data, if the DGN data is text data, the text data in DGN format is converted into text according to the font family correspondence and the font size correspondence to obtain text data in GIS format. Similarly, the coordinate information corresponding to the text data should also be marked at the same time. Based on the marked coordinate information, the text data in GIS format is stored in the data layer in GIS format to obtain the converted GIS file. The conversion of color information involved in the non-text data conversion process described above is also applicable to the conversion process of text data, which will not be described here one by one.

[0101] The steps of converting the text data in DGN format according to the font family correspondence and the font size correspondence include:

[0102] Performing font family conversion on the text data in the DGN format according to the font family correspondence, wherein the types of the text data after the font family conversion include digital text and non-digital text;

[0103] The digital text is converted into a font size according to a first font size correspondence, and the non-digital text is converted into a font size according to a second font size correspondence.

[0104] The font family names of DGN data and GIS data are not expressed in the same way. For example, Songti in GIS format has a font family name of 1044 in DGN. For DGN data in text format, you can convert the text data to a font family first, then convert the font size, or convert the font size first, then convert the font family. There is no specific limitation here. The specific font family correspondence can be referred to Table 5:

[0105] Table 5

[0106]

[0107] Among them, idsfont refers to the font family name in DGN format, and Newfont refers to the font family name in GIS format.

[0108] In addition, the correspondence between the font sizes in DGN data and GIS data, that is, the font sizes, are also inconsistent. The font sizes in the DGN file should be converted to the font sizes in the GIS file according to the font size correspondence. The correspondence between digital text and non-digital texts such as Chinese characters is also inconsistent. Digital texts can be converted to font sizes according to the first font size correspondence, and non-digital texts can be converted to font sizes according to the second font size correspondence. For example, the font sizes of digital texts in DGN files and GIS files can be 1 times, while the font sizes of non-texts such as Chinese characters can be 0.8 times.

[0109] The format conversion method from DGN data to GIS data provided in the present application divides DGN data into text data and non-text data, and converts the text data and non-text data in DGN format into GIS data respectively through different data conversion methods, which can improve the efficiency of converting DGN data into GIS data, while retaining the attribute information of DGN data and ensuring the accuracy of data conversion.

[0110] Corresponding to the above method embodiment, see Figure 3 The present invention further provides a DGN data to GIS data format conversion device 300, the DGN data to GIS data format conversion device 300 comprising:

[0111] A layer conversion module 301 is used to convert each layer in the DGN file into a GIS format data layer according to the data layer correspondence, wherein the DGN file is composed of different layers;

[0112] A determination module 302 is used to determine whether the DGN data in each layer is non-text data;

[0113] A coarseness conversion module 303 is used for, if the DGN data is non-text data, performing coarseness conversion on the DGN data according to the coarseness correspondence and marking corresponding coordinate information, wherein the types of the non-text data after coarseness conversion include point data in DGN format and line data in DGN format;

[0114] The point data conversion module 304 is used to convert the point data in the DGN format into entity symbols in the GIS format according to the corresponding data attributes; and / or,

[0115] The line data conversion module 305 is used to convert the line data in the DGN format into a line type according to the line type correspondence, and to set the line type ratio and line type thickness to obtain the line data in the GIS format;

[0116] The comprehensive conversion module 306 is used to store the entity symbols in the GIS format and the line data in the GIS format in the data layer in the GIS format based on the marked coordinate information to obtain a converted GIS file.

[0117] In specific implementation, the data attributes include the name, angle and proportion of the point data, and the point data conversion module 304 is specifically used for:

[0118] Create initial entity symbols in GIS format;

[0119] Transferring the name, the angle and the scale of the point data in the DGN format to the initial entity symbol in the GIS format;

[0120] The initial entity symbol in GIS format is adjusted in name, angle and proportion according to the name, angle and proportion of the point data in DGN format to obtain a target entity symbol in GIS format corresponding to the point data in DGN format.

[0121] The DGN data to GIS data format conversion device, computer equipment and computer-readable storage medium provided in the present application divide DGN data into text data and non-text data, and convert the text data and non-text data in DGN format into GIS data respectively through different data conversion methods, which can improve the efficiency of converting DGN data into GIS data, while retaining the attribute information of DGN data and ensuring the accuracy of data conversion.

[0122] The specific implementation process of the DGN data to GIS data format conversion device, computer equipment and computer-readable storage medium provided in this application can refer to the specific implementation process of the DGN data to GIS data format conversion method provided in the above embodiment, which will not be repeated here.

[0123] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0125] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0126] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for converting the format of DGN data to GIS data, characterized in that: The method comprises: Convert each layer in the DGN file into a GIS format data layer according to the corresponding relationship of the data layers, wherein the DGN file is composed of different layers; Determine whether the DGN data in each layer is non-text data; If the DGN data is non-text data, the DGN data is roughened according to the roughness correspondence and the corresponding coordinate information is marked, wherein the types of the non-text data after the roughness conversion include point data in DGN format and line data in DGN format; Converting the point data in the DGN format into entity symbols in the GIS format according to corresponding data attributes; and / or, The line data in the DGN format is converted into a line type according to the line type correspondence, and the line type ratio and line type thickness are set to obtain the line data in the GIS format; Based on the marked coordinate information, the entity symbol in the GIS format and the line data in the GIS format are stored in the data layer in the GIS format to obtain a converted GIS file; The data attributes include the name, angle and scale of the point data. The step of converting the point data in the DGN format into entity symbols in the GIS format according to the corresponding data attributes includes: Create initial entity symbols in GIS format; Transferring the name, the angle and the scale of the point data in the DGN format to the initial entity symbol in the GIS format; The initial entity symbol in GIS format is adjusted in name, angle and proportion according to the name, angle and proportion of the point data in DGN format to obtain a target entity symbol in GIS format corresponding to the point data in DGN format.

2. The method according to claim 1, characterized in that The line data in the DGN format is single-line data, and the single-line data includes continuous line data and discontinuous line data; The step of converting the line data in the DGN format into a line type according to the line type correspondence relationship comprises: Determine whether the line data in the DGN format is non-continuous line data; If the line data in the DGN format is discontinuous line data, resetting the discontinuous line data to continuous line data by using a reset function; If the line data in the DGN format is continuous line type data, the continuous line type data is converted into a line type according to a line type correspondence relationship.

3. The method according to claim 1, characterized in that The line data in the DGN format is composite line data, and the composite line data includes at least one closed graphic element composed of a plurality of single line data; The step of converting the line data in the DGN format into a line type according to the line type correspondence relationship comprises: Performing line type conversion on each single line type data in the composite line type data according to the line type corresponding relationship; Determine whether the area of ​​the closed primitive in the composite line type data is greater than a threshold; If the area of ​​the closed primitive in the composite line type data is greater than a threshold, the closed primitive is filled.

4. The method according to claim 1, characterized in that: After the step of determining whether the DGN data in each layer is non-text data, the method further comprises: If the DGN data is text data, the text data in DGN format is converted into text according to the font family correspondence and the font size correspondence to obtain the text data in GIS format and mark the corresponding coordinate information; Based on the marked coordinate information, the text data in the GIS format is stored in the data layer in the GIS format to obtain a converted GIS file.

5. The method according to claim 4, characterized in that The steps of converting the text data in DGN format according to the font family correspondence and the font size correspondence include: Performing font family conversion on the text data in the DGN format according to the font family correspondence, wherein the types of the text data after the font family conversion include digital text and non-digital text; The digital text is converted into a font size according to a first font size correspondence, and the non-digital text is converted into a font size according to a second font size correspondence.

6. A format conversion device for DGN data to GIS data, characterized in that: The device comprises: A layer conversion module, used to convert each layer in the DGN file into a GIS format data layer according to the corresponding relationship of the data layers, wherein the DGN file is composed of different layers; A judging module, used for judging whether the DGN data in each layer is non-text data; A coarseness conversion module, for, if the DGN data is non-text data, performing coarseness conversion on the DGN data according to the coarseness correspondence and marking corresponding coordinate information, wherein the types of the non-text data after coarseness conversion include point data in DGN format and line data in DGN format; A point data conversion module, used to convert the point data in the DGN format into entity symbols in the GIS format according to corresponding data attributes; and / or, A line data conversion module is used to convert the line data in the DGN format into a line type according to the line type correspondence, and to set the line type ratio and line type thickness to obtain the line data in the GIS format; A comprehensive conversion module, for storing the entity symbols in the GIS format and the line data in the GIS format in the data layer in the GIS format based on the marked coordinate information, to obtain a converted GIS file; The data attributes include the name, angle and proportion of the point data, and the point data conversion module is specifically used for: Create initial entity symbols in GIS format; Transferring the name, the angle and the scale of the point data in the DGN format to the initial entity symbol in the GIS format; The initial entity symbol in GIS format is adjusted in name, angle and proportion according to the name, angle and proportion of the point data in DGN format to obtain a target entity symbol in GIS format corresponding to the point data in DGN format.

7. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed on the processor, the method for converting the format of DGN data to GIS data according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a processor, the method for converting the format of DGN data to GIS data according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Conversion method for DGN data format

    CN107273543A

  • Method for converting various BIM model data to DEM data

    CN107992702A