Conversion method of road network CAD data to GIS data based on spatial capture

By preprocessing and space capture methods of urban road network CAD files, the road network segments are matched with character attributes, and the city road ledger is used to connect attributes, which solves the operationality of road network data in unified coordinate system and attribute display. The difference realizes efficient topology and attribute extraction, and improves the accuracy of data conversion.

CN118885447BActive Publication Date: 2024-11-29TIANJIN URBAN PLANNING & DESIGN INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411365555.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-11-29
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

The existing urban road network CAD files are poor in uniform coordinate system, data attribute display and spatial analysis, and the road network segments and character attributes cannot be effectively matched and attached, resulting in batch topological relationship inspection and attribute extraction. Difficult, requires a lot of manpower and time.

Method used

By preprocessing the road network CAD file, breakpoints are eliminated, trimmed and merged line segments, the space capture method is used to match the road name character attributes with line segment features, and the attribute connection is used by the city road ledger, and finally the Shapefile or Geodatabase format file is exported. , ensure the topological relationship is correct.

Benefits of technology

It realizes efficient topology and attribute extraction of road network data, improves the accuracy of data conversion, reduces artificial errors, and completely retains the original road network attribute information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885447B_ABST
    Figure CN118885447B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for converting road network CAD data to GIS data based on spatial capture, using spatial topology processing software or computer-aided design software to pre-process the road network CAD file; reading the line segment elements in each road level layer and the character block elements in the road name layer of the road network CAD file; performing spatial capture processing on the road name character block elements and the line segment elements; performing string processing on the road name character attributes of the line segment elements; performing string processing on the road name column attributes in the urban road ledger; using the processed road name attribute column as a public key to perform attribute public key connection between the line segment elements and the urban road ledger; exporting Shapefile or Geodatabase format files to form a road network GIS database. The method of the present invention efficiently realizes the road network topology work, improves the accuracy of data conversion, reduces the errors caused by human factors, and completely retains the original road network attribute information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital informationization of the transportation industry. It extracts the attributes of road network data from existing road network CAD files through spatial capture, character attribute processing, public key attribute connection and other processing means and converts them into GIS data to form a road network ArcGIS geographic information database. Background Art

[0002] At present, urban planning road networks are mostly drawn, stored and approved in CAD format. Due to the limitations of CAD format, the operability and expressiveness of road network files in terms of unified coordinate system, data attribute display, and data spatial analysis are poor. ArcGIS geographic information database uses relational database for data storage, which can effectively store and manage spatial data, support spatial topological relationship processing of road network data, and facilitate data attribute query, spatial analysis and maintenance management. Therefore, the existing national land space planning results require submission in ArcGIS geographic information database format, and the existing road network CAD files need to be converted into ArcGIS geographic information database files. At the same time, the road network related attributes of the original CAD files need to be effectively extracted to form a geographic file attribute table.

[0003] The existing urban road network CAD files have a city-level network scale, with complex network topology relationships, and road names and other attributes are placed independently on road network line elements as character block elements. There is a problem that road network line elements and character attribute elements cannot be effectively matched and linked. To solve this problem, the current method of manual verification is usually used to check and repair the topological relationship of the road network, and manually input road-related attributes into the GIS attribute table with reference to the content of the CAD file. The traditional method cannot solve the problem of batch road network topological relationship inspection and repair and effective extraction of road network attributes, and requires a lot of manpower and time for data standardization conversion. Summary of the invention

[0004] In view of the above-mentioned prior art, the present invention provides a method for converting road network CAD data to GIS data based on spatial capture. The present invention is based on road network CAD files and urban road ledgers. By preprocessing the road network CAD files, the factors affecting the correctness of the road network topological relationship and the accuracy of subsequent spatial capture processing due to the existence of line segment element breakpoints, superimposed broken line segments, overlapping line segment elements, etc. in the road network are eliminated; and a spatial capture processing method is adopted to connect one or more road name character attributes to a single road segment element, which are arranged as matching road names to match with the urban road ledger and associate with other attributes of the road, and finally export Shapefile format or Geodatabase format files, so as to quickly and accurately convert the road network CAD data into GIS data while ensuring the correctness of the road network topological relationship, thereby forming a road network ArcGIS geographic information database.

[0005] In order to solve the above technical problems, the present invention proposes a method for converting road network CAD data to GIS data based on spatial capture, comprising the following steps:

[0006] Step 1: Preprocess the road network CAD file using spatial topology processing software or computer-aided design software: the road network CAD file includes line segment elements and road names, all line segment elements are stored in corresponding layers according to road levels, and the layer names are named after the road levels; the character block elements of the road names are stored in the road name layer; extract the line segment elements of all road levels and the character block elements of their road names, check the connectivity of the line segment elements in the road network, connect if there are breakpoints between the line segment elements, and trim if there are extended line segments between the line segment elements; merge the line segment elements of the same road name; delete multiple line segment elements that are completely overlapped and only retain one of them; adjust the base point of the character block element of the road name to the position with the shortest spatial distance on the corresponding line segment element;

[0007] Step 2: Read the line segment elements in each road level layer from the preprocessed road network CAD file, extract the layer name of the line segment element to form a road level attribute column; read the road name layer from the preprocessed road network CAD file, and extract the character attributes of all road name character block elements in the road name layer;

[0008] Step 3: Take the road name character block elements in the road name layer and the line segment elements in each road grade layer as the capture objects, and perform spatial capture between the road name character block elements and the line segment elements, including:

[0009] (3-1) Take the road name character block element as the candidate element and the line segment element as the anchor point element. Perform the following operations on the base point of the road name character block element within the preset spatial threshold:

[0010] (3-2) traversing and calculating the shortest spatial distance between the base point of the road name character block element and the line segment element, moving the base point of the road name character block element to the line segment element with the shortest spatial distance therefrom, recording the line segment element as line segment element A, and assigning the character attributes of the road name character block element to the line segment element A;

[0011] (3-3) Determine whether the base points of all road name character block elements in the road name layer are captured and moved to the line segment element. If not, adjust the spatial threshold and return to step (3-2) until the base points of all road name character block elements are moved to the line segment element. At this point, a line segment element has one or more character attributes.

[0012] (3-4) The line segment elements in each road level layer are regarded as base elements, and the road name character block elements in the road name layer are regarded as candidate elements. The closest candidate element to each base element is found, and the character attributes of the candidate element are merged into the base element. At this point, a line segment element has one or more character attributes.

[0013] Step 4: Create an attribute column called the road name to be matched in the layer where the line segment element is located; sort one or more character attributes on the same line segment element in ascending or descending order of pinyin letters, and then form an attribute value according to the sorting result, and assign the attribute value to the attribute column of the road name to be matched;

[0014] Step 5: Call the city road ledger, the city road ledger includes a road name column, the road name column includes road names corresponding to all line segment elements in the road network CAD file, and create a new attribute column called the road name to be matched in the ledger in the city road ledger; perform the following processing on the road name attribute value in the city road ledger: split the road name attribute value into single characters, sort all the single characters after the split in ascending or descending order of pinyin letters, and then form an attribute value according to the sorting result, and assign the attribute value to the attribute column of the road name to be matched in the ledger;

[0015] Step 6: Use the attribute column of the road name to be matched in the layer and the attribute column of the road name to be matched in the ledger as the common key to perform attribute connection, so that all attribute columns in the urban road ledger except the road name to be matched in the ledger are connected to the layer to which the line segment feature belongs;

[0016] Step 7: Export the layer to which the line segment features belong as a Shapefile format or a Geodatabase format file to form a road network GIS database.

[0017] Furthermore, the sorting of one or more character attributes on the same line segment element in ascending or descending order of the pinyin letters in step 5 and the sorting of all the split single characters in ascending or descending order of the pinyin letters in step 4 have the same sorting direction.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] This method extracts the attributes of the existing road network CAD files through spatial capture, character attribute processing, and public key attribute connection, and converts them into GIS data, forming a set of processing methods for checking and repairing the road network topology structure and effectively attaching related attributes to the road network database, solving the problem that the road attributes are placed independently on the road network line and surface elements as character block elements, and the road network structure and attributes cannot be effectively matched and attached. Through this method, the road network topology work is efficiently realized, the accuracy of data conversion is improved, the errors caused by human factors are reduced, and the original road network attribute information is completely retained. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is an example of a road network CAD file for a certain area;

[0021] Figure 2 It is a flow chart for converting road network CAD data to GIS data based on spatial capture;

[0022] Figure 3 This is an example of the comparison results before and after extending and trimming the line segments;

[0023] Figure 4 This is an example of a road network CAD file of a certain area after preprocessing. DETAILED DESCRIPTION

[0024] The design idea of ​​the method for extracting attributes from road network CAD data and converting it to GIS based on spatial capture of the present invention is as follows: since road network CAD files usually have incorrect topological relationships, such as overlapping, overlapping, and unconnected road segments in spatial relationships, which affect the correctness of the road network topological relationship and the accuracy of subsequent spatial capture processing, the method of the present invention first performs preprocessing of the road network CAD file before converting CAD data to GIS data, including: checking the connectivity of the road network, processing overlapping broken line segments, deduplicating overlapping line segments, removing character block elements in the CAD file that are not related to associated attributes, and merging road segment elements with the same road name. The read-in road network CAD file is read in layers according to the road grade layer. Since the layer where the character block elements in the CAD file are located has no attribute association and no direct spatial association with the road segment element layer, the present invention adopts a spatial capture processing method, with the character block elements as candidate elements and the road segment as anchor elements, to capture the candidate elements within the set capture range to the anchor elements. The character attributes of the character block elements are connected to the road segment elements with the shortest spatial distance by traversing the spatial distance with each road segment element. At this time, one or more character attributes are connected to a single road segment element. Since the arrangement of the connected character attributes is disordered, for the road segment connected with one character attribute, it is used as a matching road name, matched with the urban road ledger and associated with other road attributes. For the road segment connected with multiple character attributes, the character attributes are sorted in ascending or descending order by pinyin letters, and the contents after sorting are combined into a single character attribute. For the urban road ledger data, after splitting the road name attributes into single characters, they are sorted in ascending or descending order by pinyin letters, and the contents after sorting are combined into a single character attribute. At this time, the processed road segment element character attributes and the processed road ledger character attributes are connected to the data, and other attributes of the road ledger are assigned to the road segment. Finally, the road is classified according to the CAD road grade layer and exported as a GIS file.

[0025] The present invention will be further described below in conjunction with the accompanying drawings and embodiments, but the following embodiments are by no means intended to limit the present invention in any way.

[0026] The example diagram of the road network CAD file of a certain area involved in this embodiment is as follows: Figure 1 As shown, the layers included include various road grade layers and road name layers. An example table of an urban road ledger excel file in a certain area is shown in Table 1, in which the attribute columns included include at least a road name column. The data processing tools used in this embodiment include: AutoCAD 2021, FMEWorkbench 2023.1.1.1.

[0027] Table 1 Example of an Excel file of urban road records in a certain area

[0028]

[0029] The following describes the method for converting road network CAD data to GIS data based on spatial capture proposed by the present invention with respect to this embodiment. Figure 2 As shown, the method comprises the following steps:

[0030] Step 1: Use spatial topology processing software or computer-aided design software to pre-process the road network CAD file: the road network CAD file includes line segment elements and road names. All line segment elements are stored in corresponding layers according to the road level, and the layer names are named after the road level; the character block elements of the road name are stored in the road name layer; extract the line segment elements of all road levels and the character block elements of their road names, that is, use AutoCAD 2021 software to open the road network CAD file, open the layer properties manager, open only all road level layers and road name layers, and copy the layer to a new CAD file. Check the connectivity of the line segment elements in the road network. If there are breakpoints between the line segment elements, connect them. That is, for the phenomenon that there are breakpoints at the intersection of the line segment, use the "EXTEND" command in the AutoCAD software to extend the line segment with breakpoints to the intersection. If there are extended segments between line elements, they will be trimmed; that is, if there are extended segments at the curve, use the "Trim" command in the AutoCAD software to trim until only the curve segment is retained. The example of the comparison between the extended and trimmed segments is shown in the figure below. Figure 3 As shown, a) is the comparison result before and after extending the line segment, and b) is the comparison result before and after trimming the line segment. Merge the line segment elements with the same road name; that is, use the "Polyline Edit (PEDIT)" command, enter "M" and press Enter, select multiple line segment elements with the same road name, and enter "J" to merge the selected line segments. For multiple line segment elements that completely overlap, use the "Delete (DELETE) command" to delete the line segments until only one of the line segment elements is retained. Use the "Move (MOVE) command" to select the character block element of the road name and move it so that the base point of the character block element of the road name is adjusted to the position with the shortest spatial distance on the corresponding line segment element. An example of a road network CAD file of a certain area after preprocessing is shown in the figure below. Figure 4 shown.

[0031] Step 2: Read the line segment features in each road level layer from the preprocessed road network CAD file. Open FME Workbench 2023.1.1.1 software, add a reader, select the preprocessed road network CAD file, select the "Independent Feature Class" option, select each road level layer and click OK. Extract the layer name of the line segment feature to form a road level attribute column, connect the read line segment feature to the AttributeExposer transformer, set the exposure attribute in the transformer to "autocad_layer", and click OK. Read the road name layer from the preprocessed road network CAD file, add a reader, select the preprocessed road network CAD file, select the "Independent Feature Class" option, select the road name layer and click OK. Extract the character attributes of all road name character block features in the road name layer, connect the read line segment feature to the AttributeExposer transformer, set the exposure attribute in the transformer to "autocad_text_string", and click OK.

[0032] Step 3: Take the road name character block elements in the road name layer and the line segment elements in each road grade layer as the capture objects, and perform spatial capture between the road name character block elements and the line segment elements, including:

[0033] (3-1) Take the road name character block element as the candidate element and the line segment element as the anchor point element. Perform the following operations on the base point of the road name character block element within the preset spatial threshold:

[0034] (3-2) traversing and calculating the shortest spatial distance between the base point of the road name character block element and the line segment element, moving the base point of the road name character block element to the line segment element with the shortest spatial distance therefrom, recording the line segment element as line segment element A, and assigning the character attributes of the road name character block element to the line segment element A;

[0035] (3-3) Determine whether the base points of all road name character block elements in the road name layer are snapped and moved to the line segment elements. Otherwise, adjust the spatial threshold and return to step (3-2) until the base points of all road name character block elements are moved to the line segment elements. At this point, all character block elements fall on the corresponding line segment elements. Call the AnchoredSnapper converter, connect the Anchor input to the line segment elements in each road grade layer, and connect the Candidate input to the road name character block elements in the road name layer. Set the snap type in the converter to "slice snap", and the snap distance can be preset to a value. Run the converter. If the sum of the number of elements at the Snapped output end and the number of elements at the Untouched output end of the converter is less than the number of elements at the Candidate input end, adjust the snap distance until the sum of the number of elements at the Snapped output end and the number of elements at the Untouched output end of the converter is equal to the number of elements at the Candidate input end. At this time, all character block elements are snapped to the corresponding line segment elements.

[0036] (3-4) Treat the line segment elements in each road level layer as base elements, and the road name character block elements in the road name layer as candidate elements, find the base element with the shortest distance to the candidate element, and merge the character attributes of the candidate element into the found base element. Specifically, call the NeighborFinder converter, connect the line segment elements in each road level layer to the Base input end, connect the road name character block elements in the road name layer to the Candidate input end, select "Bases and Candidates" in the input option of the converter, preset the maximum distance option to "1", check the "Generate List" option, and select "autocad_text_string" in the selected attribute option, click Confirm to run the converter, the MatchedBase output end is the output result end of the line segment element, complete the proximity search of the character block element and the line segment element, and merge the character block character attributes into the line element attributes. At this time, the attribute example table of the line segment element after merging the character attributes is shown in Table 2, where the road_id column stores the unique identifier of the line segment element, and the autocad_text_string column stores the character attribute value of the corresponding line segment element. At this point, a line segment feature has one or more character attributes.

[0037] Table 2 Example of line segment feature attributes after merging character attributes

[0038]

[0039] Step 4: Create an attribute column called the road name to be matched in the layer where the line segment element is located; sort one or more character attributes on the same line segment element in ascending or descending order of pinyin letters. Further, connect the line segment element to the input end of the Sorter converter, select "road_id" for the grouping option in the converter, select "autocad_text_string" for the attribute in the sorting option, select "alphabetical sort" for Alpha / Num, and select "ascending" for the order in this example. Click OK to complete the setting of the converter; connect the output end of the Sorter converter to the Counter converter, set the count output output attribute in the converter to the "_count" field, select "road_id" for the counter name, and set the count start to "0". Click OK to complete the setting of the converter. Then, form an attribute value according to the sorting result, and assign the attribute value to the attribute column of the road name to be matched; further, connect the line segment element to the input end of the Aggregator converter, select "road_id" for the grouping option, select "autocad_text_string" for the attribute to be connected, and click OK to complete the setting of the converter. Connect the line segment feature to the input of the AttributeManager transformer, add an attribute column named "Road Name to be Matched" in the <Add New Attribute> space in the transformer, and assign the content of the output of the Aggregator transformer to the attribute column of "Road Name to be Matched".

[0040] Step 5: Call the city road ledger, the city road ledger includes a road name column, the road name column includes road names corresponding to all line segment elements in the road network CAD file, and create a new attribute column called the ledger road name to be matched in the city road ledger; perform the following processing on the road name attribute value in the city road ledger;

[0041] Split the road name attribute value into single characters, and sort all the single characters after the splitting in ascending or descending order of the pinyin letters. The sorting direction is consistent with the ascending or descending order of the pinyin letters for one or more character attributes on the same line segment element in step 4; then, form an attribute value according to the sorting result, and assign the attribute value to the attribute column of the road name to be matched in the ledger;

[0042] Add a reader module, select "Microsoft Excel" for the format option, select "Urban Road Ledger.xlsx" file for the data set option, and click OK to complete the reading of the urban road ledger. Connect the urban road ledger to the input of the StringSearcher converter, select "Road Name" for the search option in the converter, select "." for the regular expression option, fill in "_split" for all matching list names, click OK to run the converter, and the road name attribute value will be split into single characters and stored in the attribute column named "_split". Further, connect the urban road ledger to the input of the Sorter converter, select the "Number" column, the unique identifier of each road, for the grouping option in the converter, select "_split" for the attribute in the sorting option, select "alphabetically" for Alpha / Num, and select "ascending" for the order in this example. Click OK to complete the setting of the converter; connect the output of the Sorter converter to the Counter converter, set the count output attribute in the converter to the "_count" field, select "Number" for the counter name, and set the count start to "0". Click OK to complete the setting of the converter. Furthermore, connect the urban road ledger to the input of the Aggregator converter, select "number" for the grouping option, select "_split" for the attribute to be connected, and click OK to complete the settings of the converter. Connect the urban road ledger to the input of the AttributeManager converter, add an attribute column named "Road name to be matched in the ledger" in the <Add new attribute> space in the converter, and assign the content of the output of the Aggregator converter to the attribute column of "Road name to be matched in the ledger".

[0043] Step 6: Use the attribute column of the road name to be matched in the layer and the attribute column of the road name to be matched in the ledger as the common key, and perform attribute connection, so that all attribute columns in the urban road ledger except the road name to be matched in the ledger are connected to the layer to which the line segment feature belongs; call the FeatureJoiner converter, connect the line segment feature to the Left input end, connect the Right input end to the urban road ledger, select "Internal" for the connection type option, select "Use Right" for the attribute conflict resolution option, select "Use Left" for the geometric object processing option, select "Road Name to be Matched" for the left option associated with it, and select "Road Name to be Matched in the Ledger" for the right option, click OK to complete the setting, and the example table of the connection results of the line segment feature connected to the urban road ledger is shown in Table 3.

[0044] Table 3 Example table of line segment feature connection results connecting urban road records

[0045]

[0046] Step 7: Export the layer to which the line segment features belong to as a Shapefile or Geodatabase format file to form a road network GIS database. Add a writer, select "Esri Shapefile" or "EsriGeodatabase (File Geodb Open API)" as the format option, select the folder to be saved as the dataset option, select "Automatic" as the feature type or table definition option, enter "Road Network GIS Data" as the Esri Shapefile name, and click OK.

[0047] Although the present invention has been described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can make many changes and improvements without departing from the purpose of the present invention, all of which are within the protection of the present invention.

Claims

1. A method for converting road network CAD data to GIS data based on spatial capture, It is characterized in that The following steps are involved: Step 1: Preprocess the road network CAD file using spatial topology processing software or computer-aided design software: The road network CAD file includes line segment elements and road names. All line segment elements are stored in corresponding layers according to road levels, and the layer names are named according to the road levels; the character block elements of the road names are stored in the road name layer; Extract the line segment elements of all road levels and the character block elements of their road names, check the connectivity of the line segment elements in the road network, connect them if there are breakpoints between the line segment elements, and trim them if there are extended line segments between the line segment elements; merge the line segment elements with the same road name; delete multiple line segment elements that completely overlap and keep only one of them; adjust the base point of the character block element of the road name to the position with the shortest spatial distance on the corresponding line segment element; Step 2: Read the line segment elements in each road grade layer from the above pre-processed road network CAD file, extract the layer name of the line segment element to form a road grade attribute column; Read the road name layer from the preprocessed road network CAD file, and extract the character attributes of all road name character block elements in the road name layer; Step 3: Take the road name character block elements in the road name layer and the line segment elements in each road grade layer as the capture objects, and perform spatial capture between the road name character block elements and the line segment elements, including: (3-1) Take the road name character block element as the candidate element and the line segment element as the anchor point element. Perform the following operations on the base point of the road name character block element within the preset spatial threshold: (3-2) traversing and calculating the shortest spatial distance between the base point of the road name character block element and the line segment element, moving the base point of the road name character block element to the line segment element with the shortest spatial distance therefrom, recording the line segment element as line segment element A, and assigning the character attributes of the road name character block element to the line segment element A; (3-3) Determine whether the base points of all road name character block elements in the road name layer are captured and moved to the line segment elements. If not, adjust the spatial threshold and return to step (3-2) until the base points of all road name character block elements are moved to the line segment elements. (3-4) The line segment elements in each road grade layer are regarded as base elements, and the road name character block elements in the road name layer are regarded as candidate elements. The base element with the shortest distance to the candidate element is found, and the character attributes of the candidate element are merged into the found base element. At this point, a line segment element has one or more character attributes. Step 4: Create an attribute column called the road name to be matched in the layer where the line segment element is located; sort one or more character attributes on the same line segment element in ascending or descending order of pinyin letters, and then form an attribute value according to the sorting result, and assign the attribute value to the attribute column of the road name to be matched; Step 5: Call the city road ledger, the city road ledger includes a road name column, the road name column includes road names corresponding to all line segment elements in the road network CAD file, and create a new attribute column called the ledger road name to be matched in the city road ledger; perform the following processing on the road name attribute value in the city road ledger; Split the road name attribute value into single characters, sort all the single characters after the splitting in ascending or descending order of pinyin letters, and then form an attribute value according to the sorting result, and assign the attribute value to the attribute column of the road name to be matched in the ledger; Step 6: Use the attribute column of the road name to be matched in the layer and the attribute column of the road name to be matched in the ledger as the common key to perform attribute connection, so that all attribute columns in the urban road ledger except the road name to be matched in the ledger are connected to the layer to which the line segment feature belongs; Step 7: Export the layer to which the line segment features belong as a Shapefile format or a Geodatabase format file to form a road network GIS database.

2. The method for converting road network CAD data to GIS data according to claim 1, It is characterized in that The sorting of one or more character attributes on the same line segment element in step 5 in ascending or descending order of the pinyin letters is consistent with the sorting of all the split single characters in step 4 in ascending or descending order of the pinyin letters, and the sorting direction is consistent.

Citation Information

Patent Citations

  • Urban and rural planning result data multidirectional conversion method

    CN111475559A

  • Database auto-building method for link of search data in GIS system using CAD drawings

    WO2008105611A1