Geographical entity element duplicate detection method and processing system, storage medium

CN122817629APending Publication Date: 2026-09-25SICHUAN SURVEYING & MAPPING PROD QUALITY SUPERVISION & INSPECTION STATION OF THE MINIST OF NATURAL RESOURCES SICHUAN SURVEYING & MAPPING PROD QUALITY SUPERVISION & INSPECTION STATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610614679.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-12-08
Filing Date
2026-05-07
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]本发明的目的在于提供一种地理实体要素重复检测方法及处理系统、存储介质,以解决现有重复检测方法因全量几何计算而导致处理效率低下的问题

Benefits of technology

通过引入预排序和空间位置快速排除判断机制,减少需进行精确几何计算的地理实体要素对的数量,从而极大地提升了检测效率。具体而言,首先,基于参考点进行空间位置的预排序,使得空间距离较远、不可能重复的要素在序列中自然分离。在成对比较时,利用排序依据值的差值快速判定当前比较对是否有可能重复。对于线、面要素,通过计算外接矩形中心距差值与一个基于外接矩形大小的距离阈值进行比较,可有效排除几何上不可能重叠的要素对,避免了耗时的不必要的外接矩形相交判断及更复杂的几何计算。对于点要素,由于排序依据值为到参考点的距离,若两点到参考点的距离不同,其相互间的欧氏距离必然大于等于该差值,从而可以快速排除。此外,采用多级几何过滤判断,从计算成本较低的判断(如外接矩形相交)开始,逐级递进,一旦某级判断失败即终止,进一步避免了无谓的复杂计算。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122817629A_ABST
    Figure CN122817629A_ABST
Patent Text Reader

Abstract

The application discloses a geographical entity element duplicate detection method and processing system, and a storage medium. The method comprises the following steps: acquiring a geographical entity element data set and a preset overlap threshold; determining a reference point of the data set, and pre-sorting elements in the data set according to spatial position relationships of each geographical entity element relative to the reference point to obtain an ordered geographical entity element sequence; traversing the ordered sequence, and performing pairwise comparison on the geographical entity elements in the sequence; for a current comparison pair, firstly performing a spatial position quick exclusion judgment based on the pre-sorting result; if not excluded, further calculating a geometric spatial relationship between the two geographical entity elements in the comparison pair; based on a comparison result of the geometric spatial relationship and the overlap threshold, and in combination with attribute information of the two geographical entity elements, judging whether the current comparison pair is a duplicate element, and outputting a judgment result. Through the pre-sorting and quick exclusion mechanism, unnecessary accurate geometric calculation is reduced, and the processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information data processing technology, specifically to a method and system for duplicate detection of geographic entity elements. Background Technology

[0002] In Geographic Information Systems (GIS) and surveying data processing, the same geographic entity may have multiple geometrically identical or similar feature records in a dataset due to multi-source data fusion, manual collection errors, or data processing procedures. This phenomenon is called geographic entity feature duplication. Duplicate features occupy unnecessary storage space, affect the accuracy of spatial analysis, and lead to a decline in data quality. Therefore, it is crucial to efficiently and accurately detect and label duplicate features during data entry, updating, or quality inspection.

[0003] Current common duplicate detection methods typically employ a traversal approach, comparing each pair of geographic entities in the dataset, calculating their geometric relationships, and comparing attribute information. However, when the number of geographic entities is large, this full pairwise comparison method generates enormous computational costs, especially for complex geometric elements such as lines and polygons, where calculating precise geometric relationships is extremely time-consuming. This results in low processing efficiency for existing methods, making it difficult to meet the demands of large-scale or real-time data processing. Therefore, reducing unnecessary geometric calculations and improving the overall efficiency of duplicate detection is a pressing technical problem that needs to be solved. Summary of the Invention

[0004] The purpose of this invention is to provide a method, processing system, and storage medium for detecting duplicate geographic entity features, in order to solve the problem of low processing efficiency caused by full geometric calculation in existing duplicate detection methods.

[0005] According to a first aspect of the present invention, a method for detecting duplicate geographic entity features is provided, comprising: Data acquisition: Acquire a dataset of geographic entity features and a preset overlap threshold; Pre-sorting: Determine the reference point of the geographic entity feature dataset, and pre-sort the geographic entity features in the dataset according to the spatial positional relationship of each geographic entity feature relative to the reference point to obtain an ordered sequence of geographic entity features; Traversal and Judgment: Traverse the ordered sequence of geographic entity elements and compare the geographic entity elements in the sequence in pairs in sequence; for the current comparison pair, first perform a quick spatial location exclusion judgment based on the pre-sorting result; if not excluded, then further calculate the geometric spatial relationship between the two geographic entity elements in the current comparison pair. Duplicate Detection and Output: Based on the comparison result between the geometric spatial relationship and the overlap threshold, and combined with the attribute information of the two geographic entity elements, determine whether the current comparison pair is a duplicate element, and output the judgment result.

[0006] According to the aforementioned method for detecting duplicate geographic entity features, the reference points for the geographic entity feature dataset are determined, including: Calculate the minimum bounding rectangle of the geographic entity feature dataset; One vertex of the minimum bounding rectangle is determined as the reference point; Based on the spatial positional relationship of each geographic entity feature relative to the reference point, the geographic entity features in the dataset are pre-sorted, including: For point-type geographic entity features, calculate the distance from each point feature to the reference point, and use it as the sorting criterion. For line or polygon geographic entity features, calculate the distance from the center of the bounding rectangle of each feature to the reference point, and use it as the sorting criterion. Based on the sorting criteria value, the corresponding geographic entity elements are sorted in ascending order.

[0007] According to the aforementioned method for detecting duplicate geographic entity features, a rapid spatial location exclusion judgment is performed based on the pre-sorting results, including: Obtain the sorting criteria value of the first geographic entity element and the sorting criteria value of the second geographic entity element in the current comparison pair; Calculate the absolute value of the difference between the two sorting criteria values ​​to obtain the sorting criterion difference; Determine whether the difference in the sorting criteria is greater than a preset distance threshold. If so, determine that the current comparison pair is excluded and skip the subsequent geometric spatial relationship calculation and repeated determination. The distance threshold is determined as follows: If the geographic entity feature is a point, then the distance threshold is set to an overlap threshold; If the geographic entity feature is a line or a polygon, then the distance threshold is the sum of the maximum distance from the center of the outer rectangle of the first geographic entity feature to each vertex of its outer rectangle and the maximum distance from the center of the outer rectangle of the second geographic entity feature to each vertex of its outer rectangle.

[0008] According to the aforementioned method for detecting duplicate geographic entity features, the geometric spatial relationship between two geographic entity features in the current comparison pair is calculated, including: Multi-level geometric filtering judgments are performed sequentially. The multi-level geometric filtering judgments include at least one of the following judgments: intersection of circumscribed rectangles, equality of geometric measurements, coincidence of centroid positions, and buffer containment. If the result of any level judgment is negative, the subsequent geometric filtering judgment will be terminated, and it will be determined that the two geographic entity elements are not duplicates. The multi-level geometric filtering judgment includes: Level 1 judgment: Determine whether the bounding rectangles of two geographic entity features intersect; Second-level judgment: If they intersect, then determine whether the preset geometric measurement values ​​of the two geographic entity elements are equal; the geometric measurement value is the length for line elements and the area for polygon elements. Level 3 judgment: If they are equal, then determine whether the centroids of the two geographic entity elements coincide; Fourth-level judgment: If the centers of gravity coincide, a buffer area is generated with one of the geographic entities as the center and the overlap threshold as the buffer distance, and it is determined whether the buffer area completely contains the other geographic entity.

[0009] According to the aforementioned method for detecting duplicate geographic entity features, and in conjunction with the attribute information of the two geographic entity features, the method determines whether the current comparison pair is a duplicate feature, including: If the buffer zone completely contains another geographic entity feature, then the preset set of attributes to be compared between the two geographic entity features is further compared. If all attribute values ​​in the set of attributes to be compared are the same, then the current comparison pair is determined to be duplicate features.

[0010] According to the aforementioned geographic entity feature duplication detection method, when all features in the geographic entity feature dataset are of point type, the traversal and judgment process specifically includes: S201: Set the first index i=1 and the second index j=i+1; S202: Obtain the sorting criteria value for the i-th element. And the sorting criteria value of the j-th point element. ; S203: Calculation If the result is greater than the overlap threshold, then set i=i+1, j=i+1, and execute S206; otherwise, calculate the actual Euclidean distance between the i-th point and the j-th point. S204: If the actual Euclidean distance is less than or equal to the overlap threshold, then compare the attribute information of the two. S205: Let j = j + 1; S206: Determine if j is greater than the sequence length. If so, let i = i + 1 and j = i + 1. S207: Determine if i is greater than the sequence length minus 1. If yes, end; otherwise, return to S202.

[0011] According to the aforementioned geographic entity feature duplication detection method, when all features in the geographic entity feature dataset are line or polygon types, the traversal and judgment process specifically includes: S301: Set the first index i=1 and the second index j=i+1; S302: Obtain the sorting criterion value for the i-th element. The sorting criterion value for the j-th element and the distance threshold ; S303: Calculation If the result is greater than If i = i+1 and j = i+1, then execute S410; otherwise, execute the multi-level geometric filtering judgment. S304: If the judgment is made through all multi-level geometric filtering, then compare the attribute information of the two. S305: Let j = j + 1; S306: Determine if j is greater than the sequence length. If so, let i = i + 1 and j = i + 1. S307: Determine if i is greater than the sequence length minus 1. If yes, end; otherwise, return to S302.

[0012] According to the aforementioned method for detecting duplicate geographic entity features, a geographic entity feature dataset is obtained, including: Read a set of geographic entity features containing coordinate and attribute information from a geographic information database, file, or data interface; After obtaining the geographic entity feature dataset, the following is also included: Identify the geometric type of each geographic entity feature in the dataset; Based on the geometry type, the corresponding pre-sorting rules and geometric spatial relationship calculation rules are distributed and executed.

[0013] According to a second aspect of the present invention, a processing system is provided for processing the above-described method for detecting duplicate geographic entity features, characterized in that it comprises: The data acquisition module is used to acquire geographic entity feature datasets and preset overlap thresholds; The pre-sorting module is used to determine the reference point of the geographic entity feature dataset and pre-sort the geographic entity features in the dataset according to the spatial positional relationship of each geographic entity feature relative to the reference point, so as to obtain an ordered sequence of geographic entity features. The traversal and judgment module includes a traversal comparison submodule, a fast exclusion submodule, and a geometric relationship calculation submodule. The traversal comparison module is used to traverse the ordered sequence of geographic entity elements and perform pairwise comparisons on the geographic entity elements in the sequence in sequence. The fast exclusion module is used to perform a fast spatial location exclusion judgment on the current comparison pair based on the pre-sorting result. The geometric relationship calculation module is used to calculate the geometric spatial relationship between the two geographic entity elements in the current comparison pair if the current comparison pair is not excluded by the fast exclusion module. Duplicate Detection and Output Module: Based on the comparison result between the geometric spatial relationship and the overlap threshold, and combined with the attribute information of the two geographic entity elements, it determines whether the current comparison pair is a duplicate element and outputs the judgment result.

[0014] According to a second aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for detecting duplicate geographic entity features.

[0015] Beneficial effects: By introducing a pre-sorting and spatial location-based rapid exclusion mechanism, the number of geographic entity feature pairs requiring precise geometric calculations is reduced, thereby significantly improving detection efficiency. Specifically, firstly, spatial location pre-sorting based on a reference point naturally separates spatially distant and non-repeating features in the sequence. During pairwise comparisons, the difference in sorting criteria is used to quickly determine if the current comparison pair is likely to be duplicated. For line and polygon features, the difference in the center distance of the bounding rectangles is compared with a distance threshold based on the size of the bounding rectangles, effectively eliminating geometrically non-overlapping feature pairs and avoiding time-consuming unnecessary bounding rectangle intersection checks and more complex geometric calculations. For point features, since the sorting criteria are based on the distance to the reference point, if two points have different distances to the reference point, their Euclidean distance must be greater than or equal to this difference, allowing for rapid exclusion. Furthermore, a multi-level geometric filtering judgment is employed, starting with judgments of lower computational cost (such as bounding rectangle intersection) and progressing step by step. The process terminates once a judgment at a certain level fails, further avoiding unnecessary complex calculations.

[0016] By combining the above steps, this invention reduces the number of precise geometric calculations while ensuring the accuracy of duplicate detection, thereby efficiently and accurately completing the duplicate detection of large-scale geographic entity feature datasets.

[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments; Figure 1 This is a flowchart of the geographic entity feature duplication detection method of the present invention; Figure 2 A simplified diagram of the traversal and judgment process when all features in a geographic entity feature dataset are point types; Figure 3 A simplified diagram of the traversal and judgment process when all features in a geographic entity feature dataset are line or polygon types; Figure 4 This is a block diagram of the processing system of the present invention. Detailed Implementation

[0019] This section will describe in detail specific embodiments of the present invention. Preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the drawings is to supplement the textual description with graphics, so that people can intuitively and vividly understand each technical feature and overall technical solution of the present invention, but they should not be construed as limiting the scope of protection of the present invention.

[0020] Reference Figure 1 The embodiments of the present invention provide a method for detecting duplicate geographic entity features, the method comprising steps S101, S102, S103 and S104.

[0021] Specifically, the method first acquires the dataset and threshold (S101), then pre-sorts all features in the dataset based on a unified reference point (S102), followed by traversal and judgment (S103). The traversal and judgment step includes ordered traversal and pairwise comparison of features (S1031). When comparing each pair of features, a quick exclusion judgment is first performed using the sorting results (S1032). If the feature can be excluded, the next pair is processed directly; otherwise, the precise geometric spatial relationship needs to be calculated (S1033). Finally, the geometric relationship and attribute information are combined to determine duplicates and output the result (S104). This process transforms the complex full comparison into a two-stage strategy of "coarse screening followed by fine judgment." Utilizing the "spatial proximity" index established by the pre-sorting, it can quickly skip a large number of feature pairs that are impossible to repeat in spatial location during the traversal and comparison stage, thereby greatly reducing the number of time-consuming geometric calculations (S1033) and significantly improving the overall detection efficiency.

[0022] In this embodiment, step S101 can be specifically executed as follows: acquiring a geographic entity feature dataset and a preset overlap threshold. This step is the data preparation stage of the method. The processor can read the geographic entity feature dataset from various data sources, including but not limited to geographic information databases (such as PostGIS), files (such as Shapefile, GeoJSON), or data streams transmitted through data interfaces (such as Web Feature Service). The read dataset contains the geometric coordinate information of each geographic entity feature (used to define its spatial location and shape) and related non-spatial attribute information (such as name, code, type, etc.). The overlap threshold is a preset distance value used to tolerate small geometric deviations caused by data acquisition or processing errors. Its specific value can be set according to data accuracy and application scenario and stored in a configuration file. Generally, it is taken as the topological tolerance value of the data (e.g., 0.01 meters, 0.02 meters), which is read by the processor.

[0023] Step S102 can be specifically executed as follows: Determine the reference point for the geographic entity feature dataset, and pre-sort the geographic entity features in the dataset according to the spatial positional relationship of each geographic entity feature relative to the reference point, obtaining an ordered sequence of geographic entity features. This step lays the foundation for subsequent rapid elimination through a one-time pre-calculation. First, the processor calculates the minimum bounding rectangle (MBR) of the entire dataset. This rectangle is the smallest axis-aligned rectangle that can enclose all features in the dataset. Its coordinates can be obtained by traversing the coordinate points of all features and finding the minimum and maximum values ​​in the X and Y directions. Then, a specific vertex of this minimum bounding rectangle (e.g., the lower left vertex (X_min, Y_min)) is determined as the reference point. For point features, the processor calculates the Euclidean distance from the coordinates of each point feature to the reference point, which is used as the sorting criterion. For line or polygon features, due to their complex geometry, directly calculating the geometric center may be time-consuming; therefore, the center point of its bounding rectangle is used as the representative point. The processor calculates the Euclidean distance from the center point of the bounding rectangle of each feature to the reference point, which is used as the sorting criterion. Finally, the processor sorts all geographic entity features in ascending order based on the calculated sorting criteria, thus generating an ordered sequence. After sorting, features spatially close to the reference point are also adjacent to each other in the sequence, providing a basis for subsequent rapid exclusion judgments.

[0024] Regarding step S102, the index structure (such as an array or list) and the corresponding sorting criteria values ​​of the pre-sorted ordered sequence of geographic entity features can be stored in memory for quick access in subsequent steps. The reference point is chosen as the lower left vertex of the smallest bounding rectangle because its coordinates are stable and easy to calculate; other vertices can also be chosen, with the same principle.

[0025] In this embodiment, steps S1031, S1032, and S1033 work together to achieve efficient traversal and filtering. Step S1031 involves traversing the ordered sequence of geographic entity elements and comparing each geographic entity element in the sequence in pairs. The processor uses a double-loop index (e.g., i and j) to traverse all possible element pairs. Step S1032 involves performing a quick spatial location exclusion judgment based on the pre-sorted result for the current comparison pair. The processor obtains the sorting criterion value of the first geographic entity element (index i) in the current comparison pair (which includes the first geographic entity element and the second geographic entity element). And the sorting criteria value of the second geographic entity element (index j). Then calculate the absolute value of the difference between the two. For point features, since their sorting criterion is the precise distance from the point to the reference point, according to the triangle inequality, the actual Euclidean distance between two non-repeating points must be greater than the reference distance. Further considering the topological tolerance value of the data, if... If the overlap value exceeds the overlap threshold, it can be determined that the two elements cannot overlap. For line or polygon features, the sorting criterion is the distance from the center of its bounding rectangle to the reference point. Let the maximum distance from the center of feature A's bounding rectangle to the four vertices of its own bounding rectangle be... (This can be understood as the "radius" of the circumscribed rectangle), and the corresponding value for element B is... According to spatial geometric relationships, if the distance between the centers of two circumscribed rectangles... Greater than If the two bounding rectangles do not intersect, then the two elements cannot overlap. Therefore, the processor will pre-calculate or obtain the values ​​in real time. and and combine it with the dynamic distance threshold used as the current comparison pair. .like If the current comparison pair is excluded, the processor immediately skips steps S1033 and S104 and proceeds to process the next comparison pair. This judgment involves only simple numerical subtraction and comparison operations, with extremely low computational cost, yet it can filter out a large number of spatially distant element pairs.

[0026] Regarding step S1032, calculate the maximum distance from the center of the circumscribed rectangle to each of its vertices. The processor reads the bounding rectangle coordinates of the feature (usually (minX, minY, maxX, maxY)), calculates the center point coordinates ((minX+maxX) / 2, (minY+maxY) / 2), and then calculates the distances from the center point to each of the four vertices (minX, minY), (maxX, minY), (minX, maxY), and (maxX, maxY), taking the maximum value. This calculation can be completed and cached during the pre-sorting stage to improve the speed of fast exclusion judgment.

[0027] In this embodiment, for line features and polygon features, if the current comparison pair is not excluded by step S1032, then step S1033 is executed: calculating the geometric spatial relationship between the two geographic entity features in the current comparison pair. To improve efficiency and avoid unnecessary complex calculations, this method employs multi-level geometric filtering judgment. The processor executes judgments sequentially from simple to complex, and if any level of judgment fails, the subsequent judgments are immediately terminated. The first level of judgment is the intersection judgment of bounding rectangles: the processor determines whether the bounding rectangles of the two features have overlapping areas (including edge contact) on the plane. This is a simple Boolean operation. If they do not intersect, the two features must not be duplicated, and the judgment terminates. If they intersect, then the second level of judgment is performed: geometric metric equality judgment. For line features, the processor calculates their geometric length; for polygon features, the processor calculates their geometric area. Then it is determined whether the geometric metric values ​​of the two features are equal within the allowable error range (e.g., the absolute difference is less than a minimum value, or the relative difference is less than a percentage). If the metric values ​​are significantly different, the feature shapes are different, and the judgment terminates. If they are equal, then the third level of judgment is performed: centroid position coincidence judgment. The processor calculates the geometric centroid coordinates of two features (or, for polygons, their area center) and determines whether they overlap or fall within an overlap threshold. If they do not overlap, the process terminates. If they overlap, a fourth-level judgment is performed: buffer inclusion judgment. The processor uses the geometric boundary of one of the geographic entity features (e.g., the feature corresponding to index i) as the center and a preset overlap threshold δ as the buffer distance, calling spatial analysis library functions to generate a buffer region (a buffer surface for lines, and a larger buffer surface for surfaces). It then determines whether this buffer region completely contains the other geographic entity feature (the feature corresponding to index j). This is a relatively accurate but computationally expensive spatial relationship judgment. Through these four progressive filtering levels, feature pairs that do not meet the conditions can be eliminated as early as possible, avoiding the most time-consuming buffer inclusion judgment.

[0028] In this embodiment, step S104 is as follows: Based on the comparison results of geometric spatial relationships and overlap thresholds, and combined with the attribute information of the two geographic entity elements, determine whether the current comparison pair is a duplicate element, and output the determination result. Specifically, if the two elements successfully pass all four levels of geometric filtering (i.e., the buffer area completely contains the other element), it indicates that they are highly similar in geometric shape and may be duplicates. At this time, the processor further compares the preset set of attributes to be compared between the two elements. This set of attributes can be specified by the user or defined through a configuration file, and includes key attributes such as "element name", "element code", and "type". The processor reads and compares the values ​​of these attributes one by one. If all attribute values ​​in the set of attributes to be compared are the same, the current comparison pair is finally determined to be a duplicate element. The processor generates a duplicate element error record, which at least contains the identification information (such as ID) of the duplicate elements and the determination criteria (such as "geometric buffer contains and attributes are consistent"), and outputs it to a log file, a database table, or returns it to the calling program. If the attribute comparison fails, it is not determined to be a duplicate.

[0029] In this embodiment, after acquiring the geographic entity feature dataset (step S101), a further step may be included: identifying the geometric type of each geographic entity feature in the dataset. The processor determines whether it is a point, line, or polygon by reading the geometric description information of the feature. Based on the identified geometric type, the method can distribute and execute the corresponding pre-sorting rules and geometric spatial relationship calculation rules. For example, for a point dataset, an optimization process for pure point types is executed; for a line or polygon dataset, a general process for line and polygon types is executed; for a mixed-type dataset, it can be grouped by type and processed separately, or a unified rule (such as using the center distance of the circumscribed rectangle for all) can be used for compatibility judgment.

[0030] In this embodiment, the specific traversal judgment process for pure point type and pure line / surface type is described in detail. These two processes are optimizations and concretizations of the aforementioned general process in specific scenarios.

[0031] like Figure 2 As shown, when all features in the geographic entity feature dataset are of point type, the traversal and judgment process can be specifically executed as follows: steps S201 to S207: S201: The processor sets the first index i=1 and the second index j=i+1; S202: Obtain the sorting criteria value for the i-th element. And the sorting criteria value of the j-th point element. These values ​​have already been calculated and stored during the pre-sorting stage; S203: Calculation Since the distance threshold for point features is the overlap threshold, we determine whether the result is greater than the overlap threshold. If it is greater than the overlap threshold, then according to the aforementioned geometric principle, the actual Euclidean distance between the i-th point and the j-th point must be greater than the overlap threshold (i.e., they do not overlap), and they can be directly excluded. At this point, let i = i + 1, j = i + 1, and jump to S206 to check the cycle boundary. If... If the distance is equal to or less than the overlap threshold (meaning that the two points may or may not overlap), then it is necessary to further calculate the actual Euclidean distance between the i-th point and the j-th point; S204: Determine whether the calculated actual Euclidean distance is less than or equal to the preset overlap threshold δ (based on the above, 0.01m≤δ≤0.02m). If so, it means that the two points can be considered to coincide in geometric space, and the processor further compares the attribute information of the two. S205: Regardless of the result of this comparison, the processor sets j = j + 1 to compare the i-th point with the next point in the sequence; S206: Determine if j is greater than the sequence length N. If yes, it means that the i-th point has been compared with all subsequent points. Then let i = i + 1, j = i + 1, and start the next round of comparison with the new i as the reference. S207: Determine if i is greater than the sequence length N minus 1. If yes, it means that all possible point pairs have been traversed and compared, and the process ends; otherwise, return to S202 to continue execution.

[0032] like Figure 3 As shown, when all features in the geographic entity feature dataset are line or polygon types, the traversal and judgment process can be specifically executed as follows: steps S301 to S307: S301: The processor sets the first index i=1 and the second index j=i+1; S302: Obtain the sorting criterion value for the i-th element. The sorting criterion value for the j-th element and the distance threshold . The radius of the bounding rectangle of the i-th element. The radius of the bounding rectangle of the j-th element. These values ​​are obtained by adding them together; they can be pre-calculated during the pre-sorting stage. S303: Calculation And determine whether it is greater than If the result is greater than the given value, the logic for quickly eliminating elements based on their spatial location is applied. Since these two elements cannot be duplicated, the processor sets i=i+1, j=i+1, and jumps to S307. If the result is not greater than the given value, the aforementioned multi-level geometric filtering judgment is executed (judgment of intersection of circumscribed rectangles → judgment of equality of geometric measurements → judgment of coincidence of centroid positions → judgment of buffer containment). S304: If the current comparison pair passes all multi-level geometric filtering judgments (i.e., the buffer area completely contains another feature), the processor further compares the attribute information of the two. S305: Let j = j + 1; S306: Determine if j is greater than the sequence length N. If yes, set i = i + 1 and j = i + 1. S307: Determine if i is greater than the sequence length N minus 1. If yes, the process ends; otherwise, return to S302.

[0033] The embodiments of this application, through the above method, reduce the time complexity from naive pairwise comparisons. Reduced to approximately (The main overhead is in pre-sorting) plus a much smaller The number of geometric calculations is significantly reduced, offering a clear advantage in large-scale data processing. Preset parameters such as the overlap threshold δ and the set of attributes to be compared can be flexibly adjusted via configuration files to adapt to different data standards and quality control requirements.

[0034] This invention also provides a processing system for processing the above-mentioned method for detecting duplicate geographic entity features. The processing system specifically includes a data acquisition module, a pre-sorting module, a traversal and judgment module, and a duplicate judgment and output module.

[0035] The system includes a data acquisition module for acquiring a dataset of geographic entity elements and a preset overlap threshold. A pre-sorting module determines a reference point for the geographic entity element dataset and pre-sorts the geographic entity elements in the dataset according to their spatial position relative to the reference point, resulting in an ordered sequence of geographic entity elements. A traversal and judgment module includes a traversal comparison submodule, a fast exclusion submodule, and a geometric relationship calculation submodule. The traversal comparison submodule traverses the ordered sequence of geographic entity elements, performing pairwise comparisons of the geographic entity elements in the sequence. The fast exclusion submodule performs a fast spatial position exclusion judgment based on the pre-sorting result for the current comparison pair. The geometric relationship calculation submodule calculates the geometric spatial relationship between the two geographic entity elements in the current comparison pair if the current comparison pair is not excluded by the fast exclusion module. A duplicate judgment and output module determines whether the current comparison pair is a duplicate element based on the comparison result of the geometric spatial relationship and the overlap threshold, combined with the attribute information of the two geographic entity elements, and outputs the judgment result.

[0036] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for detecting duplicate geographic entity features.

[0037] The computer-readable storage medium can be any medium capable of storing program code, such as cloud storage, USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0038] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A method for detecting duplicate geographic entity features, characterized in that, include: Data acquisition: Acquire a dataset of geographic entity features and a preset overlap threshold; Pre-sorting: Determine the reference point of the geographic entity feature dataset, and pre-sort the geographic entity features in the dataset according to the spatial positional relationship of each geographic entity feature relative to the reference point to obtain an ordered sequence of geographic entity features; Traversal and Judgment: Traverse the ordered sequence of geographic entity elements and compare the geographic entity elements in the sequence in pairs in sequence; for the current comparison pair, first perform a quick spatial location exclusion judgment based on the pre-sorting result; if not excluded, then further calculate the geometric spatial relationship between the two geographic entity elements in the current comparison pair. Duplicate Detection and Output: Based on the comparison result between the geometric spatial relationship and the overlap threshold, and combined with the attribute information of the two geographic entity elements, determine whether the current comparison pair is a duplicate element, and output the judgment result.

2. The method for detecting duplicate geographic entity features according to claim 1, characterized in that, Determining the reference point for the geographic entity feature dataset includes: Calculate the minimum bounding rectangle of the geographic entity feature dataset; One vertex of the minimum bounding rectangle is determined as the reference point; Based on the spatial positional relationship of each geographic entity feature relative to the reference point, the geographic entity features in the dataset are pre-sorted, including: For point-type geographic entity features, calculate the distance from each point feature to the reference point, and use it as the sorting criterion. For line or polygon geographic entity features, calculate the distance from the center of the bounding rectangle of each feature to the reference point, and use it as the sorting criterion. Based on the sorting criteria value, the corresponding geographic entity elements are sorted in ascending order.

3. The method for detecting duplicate geographic entity features according to claim 2, characterized in that, Based on the pre-sorting results, a rapid spatial location exclusion judgment is performed, including: Obtain the sorting criteria value of the first geographic entity element and the sorting criteria value of the second geographic entity element in the current comparison pair; Calculate the absolute value of the difference between the two sorting criteria values ​​to obtain the sorting criterion difference; Determine whether the difference in the sorting criteria is greater than a preset distance threshold. If so, determine that the current comparison pair is excluded and skip the subsequent geometric spatial relationship calculation and repeated determination. The distance threshold is determined as follows: If the geographic entity feature is a point, then the distance threshold is set to an overlap threshold; If the geographic entity feature is a line or a polygon, then the distance threshold is the sum of the maximum distance from the center of the outer rectangle of the first geographic entity feature to each vertex of its outer rectangle and the maximum distance from the center of the outer rectangle of the second geographic entity feature to each vertex of its outer rectangle.

4. The method for detecting duplicate geographic entity features according to claim 1 or 3, characterized in that, Calculating the geometric spatial relationship between two geographic entity features in the current comparison pair includes: Multi-level geometric filtering judgments are performed sequentially. The multi-level geometric filtering judgments include at least one of the following judgments: intersection of circumscribed rectangles, equality of geometric measurements, coincidence of centroid positions, and buffer containment. If the result of any level judgment is negative, the subsequent geometric filtering judgment will be terminated, and it will be determined that the two geographic entity elements are not duplicates. The multi-level geometric filtering judgment includes: Level 1 judgment: Determine whether the bounding rectangles of two geographic entity features intersect; Second-level judgment: If they intersect, then determine whether the preset geometric measurement values ​​of the two geographic entity elements are equal; the geometric measurement value is the length for line elements and the area for polygon elements. Level 3 judgment: If they are equal, then determine whether the centroids of the two geographic entity elements coincide; Fourth-level judgment: If the centers of gravity coincide, a buffer area is generated with one of the geographic entities as the center and the overlap threshold as the buffer distance, and it is determined whether the buffer area completely contains the other geographic entity.

5. The method for detecting duplicate geographic entity features according to claim 4, characterized in that, Based on the attribute information of the two geographic entity elements, determine whether the current comparison pair is a duplicate element, including: If the buffer zone completely contains another geographic entity feature, then the preset set of attributes to be compared between the two geographic entity features is further compared. If all attribute values ​​in the set of attributes to be compared are the same, then the current comparison pair is determined to be duplicate features.

6. The method for detecting duplicate geographic entity features according to claim 2, characterized in that, When all features in the geographic entity feature dataset are point types, the traversal and judgment process specifically includes: S201: Set the first index i=1 and the second index j=i+1; S202: Obtain the sorting criteria value for the i-th element. And the sorting criteria value of the j-th point element. ; S203: Calculation If the result is greater than the overlap threshold, then set i=i+1, j=i+1, and execute S206; otherwise, calculate the actual Euclidean distance between the i-th point and the j-th point. S204: If the actual Euclidean distance is less than or equal to the overlap threshold, then compare the attribute information of the two. S205: Let j = j + 1; S206: Determine if j is greater than the sequence length. If so, let i = i + 1 and j = i + 1. S207: Determine if i is greater than the sequence length minus 1. If yes, end; otherwise, return to S202.

7. The method for detecting duplicate geographic entity features according to claim 4, characterized in that, When all features in the geographic entity feature dataset are line or polygon types, the traversal and judgment process specifically includes: S301: Set the first index i=1 and the second index j=i+1; S302: Obtain the sorting criterion value for the i-th element. The sorting criterion value for the j-th element and the distance threshold ; S303: Calculation If the result is greater than If i = i+1 and j = i+1, then execute S410; otherwise, execute the multi-level geometric filtering judgment. S304: If the judgment is made through all multi-level geometric filtering, then compare the attribute information of the two. S305: Let j = j + 1; S306: Determine if j is greater than the sequence length. If so, let i = i + 1 and j = i + 1. S307: Determine if i is greater than the sequence length minus 1. If yes, end; otherwise, return to S302.

8. The method for detecting duplicate geographic entity features according to claim 1, characterized in that, Obtain the geographic entity feature dataset, including: Read a set of geographic entity features containing coordinate and attribute information from a geographic information database, file, or data interface; After obtaining the geographic entity feature dataset, the following is also included: Identify the geometric type of each geographic entity feature in the dataset; Based on the geometry type, the corresponding pre-sorting rules and geometric spatial relationship calculation rules are distributed and executed.

9. A processing system for processing the geographic entity feature duplication detection method as described in any one of claims 1 to 8, characterized in that, include: The data acquisition module is used to acquire geographic entity feature datasets and preset overlap thresholds; The pre-sorting module is used to determine the reference point of the geographic entity feature dataset and pre-sort the geographic entity features in the dataset according to the spatial positional relationship of each geographic entity feature relative to the reference point, so as to obtain an ordered sequence of geographic entity features. The traversal and judgment module includes a traversal comparison submodule, a fast exclusion submodule, and a geometric relationship calculation submodule; the traversal comparison module is used to traverse the ordered sequence of geographic entity elements and perform pairwise comparisons on the geographic entity elements in the sequence in sequence. The quick exclusion module is used to perform a quick spatial location exclusion judgment for the current comparison pair based on the pre-sorting result; the geometric relationship calculation module is used to calculate the geometric spatial relationship between the two geographic entity elements in the current comparison pair if the current comparison pair is not excluded by the quick exclusion module. Duplicate Detection and Output Module: Based on the comparison result between the geometric spatial relationship and the overlap threshold, and combined with the attribute information of the two geographic entity elements, it determines whether the current comparison pair is a duplicate element and outputs the judgment result.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the geographic entity feature duplication detection method according to any one of claims 1 to 8.