Universal connectivity quality inspection method and system based on linear ground features
Through automated linear ground connection quality inspection methods and systems, the problem of missed inspection and missed inspection in manual inspection is solved, and the accuracy and efficiency of vector data entry is improved.
Patent Information
- Application Number
- CN202510433004.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-22
AI Technical Summary
When manually checking the connectivity of linear land objects, missed and misdetection are prone to occur, resulting in errors in vector data entry and affecting the effect of post-publishing.
Provide a general connectivity quality inspection method and system based on linear land objects. By reading database layers, obtaining a list of unique attribute values, converting coordinates into text type lists and establishing a dictionary, using SQL statements to check the continuity of linear elements, and automatically identifying discontinuous elements.
It realizes connectivity quality inspection without error-reports, and improves the accuracy and quality inspection efficiency of vector data entry.
Smart Images

Figure CN120354846A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of connectivity quality inspection, and particularly to a general connectivity quality inspection method and system for linear features. Background Art
[0002] Linear features refer to features that present linear or strip-like characteristics geographically, usually including roads, rivers, railways, pipelines, ditches, etc. These features are important components of topographic maps and have important significance in aspects such as land resource management, territorial space planning, and ecological environment protection.
[0003] In the production process of topographic maps, the coding of roads, the names and kilovolt numbers of power lines, the river coding of rivers, the track coding of railways, etc., except for the co-lined sections, are generally connected and cannot be represented discontinuously. When the data volume is large, errors are inevitable during manual operations. Traditionally, inspections are carried out manually, which is time-consuming and laborious, and it is extremely easy to miss inspections and misjudgments, resulting in errors in the data stored in the database, seriously affecting the later mapping effect; Dong Linlin et al. designed an algorithm for detecting the connectivity of roads based on the FME platform. The algorithm takes into account road objects with duplicate sections and disconnection error types, and verifies the correctness of the algorithm using simulation data and geographical conditions census result data; Li Mingguang et al. also designed an algorithm for detecting the connectivity of road entities through the FME platform. It is applicable to both conventional road entities with single linear structures and unconventional road entities with three-way intersection structures, and realizes the refined detection of disconnection errors of various different types of road entities, providing a powerful tool for the connectivity quality inspection and modification of the road data stored in the database. Summary of the Invention
[0004] Aiming at the deficiencies in the above problems, the present invention provides a general connectivity quality inspection method and system for linear features.
[0005] To achieve the above object, the present invention provides a general connectivity quality inspection method for linear features, including reading all layers in the database and obtaining a list of unique attribute values of the continuity field of the linear layer whose connectivity is to be inspected;
[0006] Successively obtaining all elements of each of the attribute values based on SQL statements;
[0007] Obtaining the coordinates of the starting points of each linear element based on all elements of the attribute value;
[0008] Converting the coordinates of the starting points of each linear element into a text type list;
[0009] Converting the text type list into a dictionary and determining the meaning of the values in each key-value pair of the dictionary;
[0010] Among them, when the key value of the key-value pair is 2, the corresponding element is continuous; when the key value of the key-value pair is not 2, the corresponding element is discontinuous.
[0011] Preferably, when the SQL statement is "field name = unique field value", collinear elements are not checked; when "field name LIKE unique field value", the collinear elements are checked.
[0012] Preferably, for the floating-point coordinates (x, y) of the starting point and the ending point of each linear element, they are respectively converted into text type (x', y'), and the text type value z is assigned;
[0013] Among them, z = x' + y', and each text type value z is saved.
[0014] Preferably, converting the text type list into a dictionary includes:
[0015] Establish an empty dictionary data structure, with the key being z and the value being the number of z. When the key of the dictionary contains z, the value is incremented by 1.
[0016] Preferably, when the key value of the key-value pair is 1, the corresponding element is discontinuous; when the key value of the key-value pair is 3, the corresponding element bifurcates; when the key value pair is greater than 3, at least four linear elements intersect.
[0017] Preferably, when the key-value pair of the dictionary is not 2, retain all the keys in the key-value pairs as a new list. When the number of the list is 2, it indicates that the linear feature of this attribute value is continuous; when it is greater than 2, it indicates that the linear feature is discontinuous. Sequentially for the unique attribute value list, all discontinuous elements in the layer are obtained.
[0018] The present invention also provides a general connectivity quality inspection system for linear features, including:
[0019] An acquisition module, configured to read all layers in the database and obtain a list of unique attribute values of the continuous fields of the linear layer to be checked for connectivity;
[0020] An SQL module, configured to sequentially obtain all elements of each of the attribute values based on an SQL statement;
[0021] A coordinate module, configured to obtain the coordinates of the starting point of each linear element based on all elements of the attribute value;
[0022] A text module, configured to convert the coordinates of the starting point of each linear element into a text type list;
[0023] A dictionary module for converting the said list of text types into a dictionary and determining the meaning of the values in each key-value pair of the dictionary;
[0024] Among them, when the key value of the key-value pair is 2, it corresponds to the continuity of the said element; when the key value of the key-value pair is not 2, it corresponds to the discontinuity of the said element.
[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0026] The inspection result of the present invention has no false alarms or missed reports, solves the trouble of manual inspection of the connectivity of linear features, and improves the accuracy of vector data storage in the database. Description of the Drawings
[0027] Figure 1 It is a flowchart of a general connectivity inspection method for linear features. Detailed Embodiments
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0029] Refer to Figure 1 , the present invention provides a general connectivity inspection method for linear features, including reading all layers in the database and obtaining a list of unique attribute values of the continuous fields of the linear layer whose connectivity is to be inspected;
[0030] Successively obtain all elements of each attribute value based on SQL statements;
[0031] Specifically, when the SQL statement is "field name = unique field value", collinear elements are not inspected; when "field name LIKE unique field value", collinear elements are inspected;
[0032] Obtain the coordinates of the starting points of each linear feature based on all elements of the attribute value;
[0033] Specifically, for the floating-point coordinates (x, y) of the starting point and the ending point of each linear feature, convert them into text types (x', y') respectively, and assign them to the text type value z;
[0034] Among them, z = x' + y', and each text type value z is saved.
[0035] Convert the coordinates of the starting points of each linear feature into a list of text types;
[0036] Convert the text type list into a dictionary and determine the meaning of the values in each key-value pair of the dictionary;
[0037] Specifically, converting the text type list into a dictionary includes: establishing an empty dictionary data structure, with the key being z and the value being the number of z. When the key of the dictionary contains z, the value is incremented by 1.
[0038] Among them, when the key-value of the key-value pair is 2, the corresponding feature is continuous; when the key-value of the key-value pair is not 2, the corresponding feature is discontinuous.
[0039] In this embodiment, when the key-value of the key-value pair is 1, the corresponding feature is discontinuous; when the key-value of the key-value pair is 3, the corresponding feature bifurcates; when the key-value pair is greater than 3, at least four linear features intersect.
[0040] Furthermore, when the key-value pair of the dictionary is not 2, retain the keys in all key-value pairs as a new list. When the number of the list is 2, it indicates that the linear feature of this attribute value is continuous; when it is greater than 2, it indicates that the linear feature is discontinuous. For the unique attribute value list in turn, all discontinuous features in the layer are obtained.
[0041] Embodiment
[0042] The following four cases are used to verify the effect of the present invention. See Table 1 for details:
[0043] In Test 1, water system features are selected for verification. The water system code HYDC of the same water system is consistent. By using this invention for quality inspection, the number of discontinuous error points is 4, indicating that the feature with HYDC of DA020XS9 is discontinuous;
[0044] In Test 2, road features are selected for verification. The road code RN of the same road is consistent. By using this invention for quality inspection, the number of discontinuous error points is 4, indicating that the feature with RN of C158 is discontinuous;
[0045] In Test 3, railway features are selected for verification. The railway code RN of the same road is consistent. By using this invention for quality inspection, the number of discontinuous error points is 4, indicating that the feature with RN of 0416 is discontinuous;
[0046] In Test 4, pipeline features are selected for verification. The name NAME of the same pipeline is consistent. By using this invention for quality inspection, the number of discontinuous error points is 4, indicating that the feature with NAME of Tianbai Line is discontinuous;
[0047] Through the above 4 tests, the following conclusions are obtained: applicable to the connectivity check of all linear features, well meeting the project production requirements and ensuring the accuracy of the vector data stored in the database.
[0048] Table 1
[0049]
[0050]
[0051] In the present invention, a number of 1:10000 national standard sheet data are respectively selected for example verification. Using the quality inspection algorithm provided by the present invention, a certain number of single sheets and the merged overall sheet are inspected. The inspection results are shown in Table 2. Through analysis, it can be known that: the time taken for sheet inspection is related to the number of sheets. The more the number of sheets, the longer the time. When more than 100 sheets are merged and the total number of elements reaches tens of thousands, the time used is also less than 1 second, indicating that the quality inspection algorithm provided by the present invention has extremely high efficiency and can greatly improve the quality inspection efficiency.
[0052] Table 2
[0053]
[0054] The present invention also provides a general connectivity quality inspection system for linear features, including:
[0055] An acquisition module, configured to read all layers in the database and obtain a list of unique attribute values of the continuous field of the linear layer whose connectivity is to be inspected;
[0056] An SQL module, configured to sequentially obtain all elements of each attribute value based on SQL statements;
[0057] A coordinate module, configured to obtain the coordinates of the starting point of each linear feature based on all elements of the attribute value;
[0058] A text module, configured to convert the coordinates of the starting point of each linear feature into a list of text types;
[0059] A dictionary module, configured to convert the list of text types into a dictionary and determine the meaning of the value in each key-value pair of the dictionary;
[0060] Among them, when the key value of the key-value pair is 2, the corresponding feature is continuous; when the key value of the key-value pair is non-2, the corresponding feature is discontinuous.
[0061] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A general connectivity property inspection method for linear features, characterized in that, including: Read all layers in the database and obtain a list of unique attribute values of the continuous fields of the linear layers to be checked for connectivity; Obtain all features of each of the attribute values in sequence based on the SQL statement; Obtain the coordinates of the starting points of each linear feature based on all features of the attribute value; Convert the coordinates of the starting points of each linear feature into a list of text types; Convert the list of text types into a dictionary and determine the meaning of the values in each key-value pair of the dictionary; Among them, when the key value of the key-value pair is 2, it corresponds to the continuity of the feature; when the key value of the key-value pair is not 2, it corresponds to the discontinuity of the feature.
2. The method for detecting the connectivity property based on the general linear features according to claim 1, wherein When the SQL statement is "field name = unique field value", collinear features are not checked; when "field name LIKE unique field value", the collinear features are checked.
3. The method for detecting the connectivity property based on the general linear feature according to claim 2, wherein For the floating-point coordinates (x, y) of the starting and ending points of each linear feature, convert them into text types (x', y') respectively, and assign them to the text type value z; Among them, z = x' + y', and save each text type value z.
4. The method for detecting the connectivity property based on the generality of linear features according to claim 3, characterized in that, Converting the list of text types into a dictionary includes: Establish an empty dictionary data structure, with the key as z and the value as the number of z. When the key of the dictionary contains z, the value is incremented by 1.
5. The method for detecting the connectivity property based on the generality of linear features according to claim 4, wherein When the key value of the key-value pair is 1, it corresponds to the discontinuity of the feature; when the key value of the key-value pair is 3, it corresponds to the bifurcation of the feature; when the key value pair is greater than 3, at least four linear features intersect.
6. The method for detecting the connectivity property based on the generality of linear features according to claim 5, wherein, When the key-value pair of the dictionary is not 2, retain the keys in all the key-value pairs as a new list. When the number of the list is 2, it indicates that the linear feature of this attribute value is continuous; when it is greater than 2, it indicates that the linear feature is discontinuous. Sequentially for the list of unique attribute values, obtain all the discontinuous features in the layer.
7. A general connectivity property inspection system based on linear features, characterized in that, including: An acquisition module for reading all layers in the database and obtaining a list of unique attribute values of the continuous fields of the linear layers to be checked for connectivity; An SQL module for obtaining all features of each of the attribute values in sequence based on the SQL statement; A coordinate module for obtaining the coordinates of the starting points of each linear feature based on all features of the attribute value; A text module for converting the coordinates of the starting points of each linear feature into a list of text types; A dictionary module for converting the list of text types into a dictionary and determining the meaning of the values in each key-value pair of the dictionary; Among them, when the key value of the key-value pair is 2, it corresponds to the continuity of the feature; when the key value of the key-value pair is not 2, it corresponds to the discontinuity of the feature.