A method to determine whether a GDB format terrain map is continuous

By calculating the absolute path and coordinate system of the GDB format topographic map and using scanning and ray algorithms to determine the continuity of the topographic map, the problems of low efficiency and high misjudgment rate in the existing technology are solved, and efficient automatic judgment and error control are achieved.

CN120235861BActive Publication Date: 2025-09-12CHINA YOUKE COMM TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510705615.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-12
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The existing technology lacks automated means to determine whether GDB format terrain maps are continuous, resulting in low efficiency and prone to misjudgment, increasing the risk of data leakage.

Method used

By calculating the absolute path of the topographic map, obtaining the dataset handle, and performing coordinate system normalization to read the vector data, a scanning algorithm is used to calculate the minimum convex hull coordinate group, and a ray algorithm is used to determine the continuity of the topographic map, a standardized report and a 3D visualization are generated.

Benefits of technology

It improves the efficiency of topological analysis, enhances the compatibility of multi-source data and resource utilization, reduces the misjudgment rate, and has outstanding creativity and industrial application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235861B_ABST
    Figure CN120235861B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for determining whether a GDB format topographic map is continuous, comprising: for two specified topographic maps, calculating the absolute paths of the two topographic maps through a main function to obtain a first search topographic map and a second search topographic map; obtaining the first search topographic coordinate map and the minimum convex hull coordinate group through an algorithm, recorded as the first convex hull group, calculating the second convex hull group using the same method, and using a ray algorithm to determine if the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, then concluding that the two topographic maps are discontinuous. The beneficial effect of the present invention is that the invention produces significant improvements in dimensions such as topological analysis efficiency, multi-source data compatibility, and resource utilization, solving long-standing technical difficulties such as low efficiency, high error rate, and poor adaptability of traditional topographic map continuity detection methods, and having outstanding creativity and industrial application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of applied research. According to the principles and characteristics of GDB format topographic map data in the geographic surveying and mapping industry, the present invention studies a method for determining whether two topographic maps are spatially continuous based on the spatial coordinates stored in the two maps. Background Art

[0002] The GDB format is a geodatabase file format developed by Esri. It is used to store and manage geographic spatial data. It can store vector data, raster data, attribute data, etc. It is one of the main formats currently used to store topographic map data and is widely used.

[0003] Currently, there's no automated way to determine the continuity between two GDB-formatted topographic maps, requiring manual verification. This process is inefficient and prone to misjudgment, increasing the risk of data leakage. Currently, there's no effective solution on the market to this problem. Summary of the Invention

[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.

[0005] In view of the above problems and / or the problems existing in an existing method for determining whether a GDB format terrain map is continuous, the present invention is proposed.

[0006] Therefore, the problem to be solved by the present invention is how to provide a method for determining whether a topographic map in the GOB format is continuous.

[0007] To solve the above technical problems, the present invention provides the following technical solutions: a method for determining whether a GDB format topographic map is continuous, comprising:

[0008] The absolute paths of the two formulated topographic maps are calculated through the main function to obtain the first search topographic map and the second search topographic map;

[0009] Obtaining a first data set handle of a first search topographic map and a second data set handle of a second search topographic map through an algorithm;

[0010] The first element layer and the second element layer are obtained based on the first dataset handle and the second dataset handle, and the first vector data of the first search topographic map and the second vector data of the second search topographic map are read after performing coordinate system normalization processing based on the first element layer and the second element layer respectively.

[0011] The first vector data and the second vector data are placed in a coordinate system, and the irregular figures created by the first vector data and the second vector data in the coordinate system are recorded as a first search terrain coordinate map and a second search terrain coordinate map, respectively. A scanning algorithm is used to calculate the minimum convex hull coordinate groups of the first vector data and the second vector data, respectively, and recorded as a first convex hull group and a second convex hull group;

[0012] A ray algorithm is used to determine that if the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, it is concluded that the two topographic maps are discontinuous; otherwise, the two topographic maps are determined to be continuous.

[0013] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the method of calculating the minimum convex hull coordinate group of the first vector data using a scanning algorithm includes:

[0014] Select the point with the smallest y coordinate in the coordinate system as the reference point;

[0015] Calculate the polar angle of each point of the first vector data relative to the reference point and sort them in ascending order;

[0016] Filter out the vertex coordinates that constitute the convex hull through the stack structure;

[0017] Store the filtered vertex coordinates into the memory linked list in clockwise order.

[0018] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the method of using a ray algorithm to determine whether the first convex hull group is in the second search topographic coordinate map includes:

[0019] Traverse each coordinate point of the target convex hull group;

[0020] Perform ray method judgment on each coordinate point and calculate the number of intersections between the ray emitted from the point in the positive direction of the X axis and the target terrain coordinate map;

[0021] When the number of intersections is odd, it is considered an internal point; when the number of intersections is even, it is considered an external point.

[0022] The permissible error threshold ε is set, and when the ratio of the number of external points to the total number of points is less than ε, it is still considered as a containment relationship.

[0023] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the reading of the first vector data of the first search topographic map after performing coordinate system normalization processing based on the first feature layer includes:

[0024] Unify the coordinate system;

[0025] Parse the fields in the feature layer attribute table;

[0026] Filter feature layers containing field values;

[0027] The contour feature layer with the largest spatial coverage is read first;

[0028] When there are multiple feature layers that meet the criteria, the latest version is selected based on the layer creation timestamp.

[0029] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the unification of the coordinate system includes:

[0030] detecting coordinate system definition parameters of the first search topographic map and the second search topographic map;

[0031] When the coordinate systems of the two images are inconsistent, the dynamic projection conversion module is called to perform coordinate conversion based on the preset coordinate system conversion parameter table;

[0032] Normalize the elevation data according to the Z value to eliminate the differences between different datum surfaces;

[0033] Generates a metadata file containing the conversion log and stores it in an associated manner.

[0034] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the method of using a ray algorithm to determine that if the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, then concluding that the two topographic maps are discontinuous includes:

[0035] Construct the map adjacency matrix and use the convex hull group of each map as the node feature;

[0036] Perform breadth-first search on each node to establish topological network relationships;

[0037] Set the traversal termination condition to the cumulative number of discontinuous edges exceeding the threshold;

[0038] Output the largest continuous area map set and the discontinuous boundary coordinate list.

[0039] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the storing in the first memory linked list includes:

[0040] Allocate an independent memory block for each convex hull group;

[0041] Set the invalidation flag of the linked list node, and automatically trigger the memory release when the continuous judgment is completed;

[0042] Establish a ring buffer to store historical convex hull data, and the buffer depth is configurable;

[0043] Start an asynchronous garbage collection thread for data that exceeds the preset time limit.

[0044] As a preferred solution of the method for determining whether a GDB format topographic map is continuous according to the present invention, the method includes: outputting the determination result after the determination process is completed.

[0045] Generate a standardized format report, when the result is determined to be discontinuous, the standardized format report includes the coordinates of the center point of the discontinuous area, area statistics and confidence index;

[0046] Automatically create thematic layers, rendering continuous intensity with gradient colors;

[0047] Trigger the 3D visualization engine to generate a cross-section analysis diagram of the edge;

[0048] Generate a difference comparison diagram for the pair of map sheets that are determined to be discontinuous.

[0049] In a second aspect, some embodiments of the present invention provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation method of the above-mentioned first aspect.

[0050] In a third aspect, some embodiments of the present invention provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any one of the implementations of the first aspect is implemented.

[0051] The beneficial effect of the present invention is that it proposes a method for determining whether a GDB format topographic map is continuous. The invention produces significant improvements in dimensions such as topological analysis efficiency, multi-source data compatibility, and resource utilization. It solves the long-standing technical difficulties of traditional topographic map continuity detection methods, such as low efficiency, high misjudgment rate, and poor adaptability. It has outstanding creativity and industrial application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort. Among them:

[0054] Figure 1 This is a flow chart of a method for determining whether a GDB format topographic map is continuous in Example 1.

[0055] Figure 2 This is a schematic diagram of the actual structure of a method for determining whether a GDB format topographic map is continuous in Example 2. DETAILED DESCRIPTION

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

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

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

[0059] Example 1

[0060] Reference Figure 1 This is the first embodiment of the present invention, which provides a method for determining whether a GDB format terrain map is continuous, comprising:

[0061] For the two specified topographic maps, the absolute paths of the two topographic maps are calculated through the main function to obtain the first search topographic map and the second search topographic map;

[0062] Obtaining a first data set handle of a first search topographic map through an algorithm;

[0063] Obtaining a first feature layer based on the first dataset handle, performing coordinate system normalization processing on the first feature layer and then reading first vector data of a first search topographic map;

[0064] Reading the first vector data of the first search topographic map after performing coordinate system normalization processing based on the first feature layer includes:

[0065] Unify the coordinate system;

[0066] Parse the fields in the feature layer attribute table;

[0067] Filter feature layers containing field values;

[0068] The contour feature layer with the largest spatial coverage is read first;

[0069] When there are multiple feature layers that meet the criteria, the latest version is selected based on the layer creation timestamp.

[0070] The coordinate system is unified including:

[0071] detecting coordinate system definition parameters of the first search topographic map and the second search topographic map;

[0072] When the coordinate systems of the two images are inconsistent, the dynamic projection conversion module is called to perform coordinate conversion based on the preset coordinate system conversion parameter table;

[0073] Normalize the elevation data according to the Z value to eliminate the differences between different datum surfaces;

[0074] Generates a metadata file containing the conversion log and stores it in an associated manner.

[0075] The first vector data is placed in a coordinate system, an irregular graph created by the first vector data in the coordinate system is recorded as a first search terrain coordinate map, a minimum convex hull coordinate group of the first vector data is calculated using a scanning algorithm, recorded as a first convex hull group, and stored in a first memory linked list; calculating the minimum convex hull coordinate group of the first vector data using the scanning algorithm includes:

[0076] Select the point with the smallest y coordinate in the coordinate system as the reference point;

[0077] Calculate the polar angle of each point of the first vector data relative to the reference point and sort them in ascending order;

[0078] Filter out the vertex coordinates that constitute the convex hull through the stack structure;

[0079] Store the filtered vertex coordinates into the memory linked list in clockwise order.

[0080] Use the ray algorithm to determine whether the first convex hull group is included in the second search terrain coordinate map:

[0081] Traverse each coordinate point of the target convex hull group;

[0082] Perform ray method judgment on each coordinate point and calculate the number of intersections between the ray emitted from the point in the positive direction of the X axis and the target terrain coordinate map;

[0083] When the number of intersections is odd, it is considered an internal point; when the number of intersections is even, it is considered an external point.

[0084] The permissible error threshold ε is set, and when the ratio of the number of external points to the total number of points is less than ε, it is still considered as a containment relationship.

[0085] Obtaining a second data set handle of a second retrieval topographic map through an algorithm;

[0086] The second feature layer is obtained by reading based on the second dataset handle, and the first vector data of the second search topographic map is read after performing coordinate system normalization processing on the second feature layer;

[0087] The vector data of the second search topographic map is placed in a coordinate system, an irregular shape created by the second vector data in the coordinate system is recorded as a second search topographic coordinate map, and a minimum convex hull coordinate group of the second vector data is calculated using a scanning algorithm, recorded as a second convex hull group, and stored in a second memory linked list;

[0088] Use the ray algorithm to determine whether the first convex hull group is in the second search terrain coordinate map. If so, determine that the two terrain maps are continuous.

[0089] Using the ray algorithm to determine if the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, it is concluded that the two topographic maps are discontinuous, including:

[0090] Construct the map adjacency matrix and use the convex hull group of each map as the node feature;

[0091] Perform breadth-first search on each node to establish topological network relationships;

[0092] Set the traversal termination condition to the cumulative number of discontinuous edges exceeding the threshold;

[0093] Output the largest continuous area map set and the discontinuous boundary coordinate list.

[0094] Use the ray algorithm to determine whether the second convex hull group is in the first search topographic coordinate map. If so, determine that the two topographic maps are continuous.

[0095] Use the ray algorithm to determine that if the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, then conclude that the two topographic maps are discontinuous;

[0096] When the judgment process is completed, the judgment result is output.

[0097] Stored in the first memory linked list include:

[0098] Allocate an independent memory block for each convex hull group;

[0099] Set the invalidation flag of the linked list node, and automatically trigger the memory release when the continuous judgment is completed;

[0100] Establish a ring buffer to store historical convex hull data, and the buffer depth is configurable;

[0101] Start an asynchronous garbage collection thread for data that exceeds the preset time limit.

[0102] When the judgment process is completed, the judgment result is output, including:

[0103] Generate a standardized format report, when the result is determined to be discontinuous, the standardized format report includes the coordinates of the center point of the discontinuous area, area statistics and confidence index;

[0104] Automatically create thematic layers, rendering continuous intensity with gradient colors;

[0105] Trigger the 3D visualization engine to generate a cross-section analysis diagram of the edge;

[0106] Generate a difference comparison diagram for the pair of map sheets that are determined to be discontinuous.

[0107] Example 2

[0108] Reference Figure 2 The second embodiment of the present invention differs from the first embodiment in that it also includes a practical process for determining whether a GDB format topographic map is continuous:

[0109] For the specified GDB format topographic maps A and B, the method for determining whether the data of the two maps are continuous is implemented as follows:

[0110] Step 1: Write a Win32 console program that can run on Windows. In the main function of the program, parse the command line parameters passed in to obtain the absolute paths PathA and PathB of the two files A and B.

[0111] Step 2: The program calls the GDALDataset::Open method provided by the open source GDAL algorithm library to open PathA and obtain a dataset handle DatasetA of the GDALDataset type. GDAL is an open source algorithm library, and GDALDataset::Open is a special absolute path algorithm in the open source algorithm library to calculate the dataset handle.

[0112] Step 3: Loop through the GetLayer method provided by DatasetA. Dataset is an abstract class that can be used to create datasets. This method returns an OGRLayer object handle, Layer, representing a feature layer. By looping through the GetNextFeature method of Layer, all point, line, and surface features contained in the Layer are retrieved. getX and getY are methods used by the dataset to obtain X and Y coordinates. Layer is a pop-up layer component used to retrieve datasets in the GetNextFeature method. GetNextFeature is a vector calculation function. For point features, calling the getX and getY methods retrieves the x and y coordinates of that point. For line features, the x and y coordinates of every point on the line are retrieved. For surface features, the x and y coordinates of every point on all lines on the surface are retrieved. The coordinates of all these points, lines, and surface features are saved in the memory linked list LA. After saving the coordinates of all points, lines, and surface features in all feature layers, call the GDALClose method to close the open PathA. GDALClose is a method for closing an absolute path.

[0113] Step 4: Based on all the coordinate values ​​in LA, a minimum convex hull coordinate group is calculated and saved in the memory linked list TA; the algorithm for calculating the minimum convex hull coordinate group is implemented using the well-known Jarvis stepping method, where the Jarvis stepping method is a minimum convex hull coordinate group algorithm.

[0114] Step 5: Using the same process as in step 2, open PathB, read out the coordinate values ​​of all point features, line features, and surface features, and save them to the memory linked list LB; after the reading is completed, close the opened PathB.

[0115] Step 6: Based on all the coordinate values ​​in LB, a minimum convex hull coordinate group is calculated and saved in the memory linked list TB; the algorithm for calculating the minimum convex hull coordinate group is implemented using the well-known Jarvis stepping method.

[0116] Step 7: For each coordinate in TA, determine whether it is contained within the irregular polygon formed by the coordinates in TB. If a coordinate in TA is contained within the irregular polygon formed by the coordinates in TB, it indicates that topographic maps A and B are continuous, and the algorithm ends. The algorithm for determining whether a coordinate is contained within the irregular polygon uses the well-known ray method.

[0117] Step 8: For each coordinate in TB, determine whether it is contained in the irregular polygon formed by the coordinates in TA. If there is a coordinate in TB that is contained in the irregular polygon formed by the coordinates in TA, it means that the topographic maps A and B are continuous, and the algorithm ends. The algorithm for determining whether a coordinate is contained in the irregular polygon is also implemented using the well-known ray method.

[0118] Step 9: If all coordinates in TA are not contained in the irregular polygon formed by all coordinates in TB, and all coordinates in TB are not contained in the irregular polygon formed by coordinates in TA, it means that topographic maps A and B are not continuous, and the algorithm ends.

[0119] Example 3

[0120] The third embodiment of the present invention is different from the first embodiment in that: an experiment is also conducted based on the method of the present invention:

[0121] 1. Experimental preparation and implementation process

[0122] 1. Test environment construction

[0123] Hardware configuration: Intel Xeon E5-2687W v4 processor (3.0GHz, 12 cores), 128GB DDR4 memory, NVIDIA Quadro RTX 6000 graphics card.

[0124] Software platform: ArcGIS Pro 3.0 (comparison group), self-developed algorithm system (experimental group).

[0125] Test dataset: 1:10000 topographic map library provided by the National Basic Geographic Information Center, including:

[0126] Dataset A: WGS84 coordinate system;

[0127] Dataset B: CGCS2000 coordinate system, an updated version of the topographic map covering the same geographical area.

[0128] Artificially construct abnormal data:

[0129] The coordinate system is not aligned with the map (EPSG:32651 and EPSG:4547 are mixed).

[0130] Elevation datum difference map, the standards are the 1985 National Elevation Datum and the Yellow Sea Elevation Datum.

[0131] 2. Implementation steps

[0132] (1) Data preprocessing stage:

[0133] Load 20 test map pairs, each containing 2 adjacent map pairs, where:

[0134] 10 groups are normal continuous maps, with actual edge overlap ≥ 200 meters;

[0135] Six groups are artificially created discontinuous maps with seams displaced by 50-300 meters;

[0136] Group 4 is for special scenarios including cross-coordinate system and elevation benchmark differences.

[0137] Perform coordinate system normalization preprocessing:

[0138] Coordinate system differences were detected in 8 sets of maps, including WGS84 and CGCS2000.

[0139] Call the dynamic projection conversion module;

[0140] Perform EGM2008 model correction on the elevation data to eliminate datum differences.

[0141] (2) Core algorithm execution:

[0142] Perform a bivector convex hull calculation on each set of tiles:

[0143] The improved Graham scanning algorithm is used, and the elevation mutation threshold Δh=5 meters is set;

[0144] Generate convex hull vertex data and store it in a dynamic memory linked list to record memory usage.

[0145] Perform bidirectional space inclusion judgment:

[0146] Apply the ray method to each convex hull vertex with a tolerance of ε = 0.5 meters;

[0147] Enables Bentley-Ottmann acceleration for complex polygons.

[0148] (3) Result output and verification

[0149] Generate an XML format inspection report, marking the coordinates and confidence levels of discontinuous areas;

[0150] The determination results were verified on site by a manual surveying and mapping review team;

[0151] Compare the time consumption and accuracy of the traditional ArcGIS manual edge checking method.

[0152] 2. Experimental Data Record Sheet

[0153] Table 1 Comparison of coordinate system conversion time (unit: ms)

[0154]

[0155] Table 2 Analysis of convex hull calculation efficiency

[0156]

[0157] Table 3 Continuity judgment accuracy

[0158]

[0159] Table 4 Comparison of resource consumption

[0160]

[0161] Table 5 Special scenario processing capabilities

[0162]

[0163] Table 6 Comprehensive benefit indicators

[0164]

[0165] 3. Data Analysis and Conclusion

[0166] 1. Verification of efficiency advantages

[0167] As shown in Table 1, this method demonstrates significant performance improvements over traditional ArcGIS tools in the coordinate system conversion phase. When processing 10 map sheets, the time required was reduced from 2567ms to 203ms, a 92.1% decrease. This is due to the precompiled parameter loading mechanism of the dynamic projection conversion module, which avoids the parameter retrieval overhead of traditional methods during each conversion. Table 4 further shows that this method's CPU utilization is only one-third of that of traditional methods, and memory consumption is reduced by 56.6%, validating the effectiveness of the dynamic memory management strategy.

[0168] 2. Accuracy breakthrough analysis

[0169] The data in Table 3 shows that our method achieved 100% accuracy in all test scenarios, while the accuracy of traditional methods plummeted to 25% in cross-coordinate system scenarios. This demonstrates the core value of coordinate system standardization preprocessing: through automated datum conversion and elevation correction, it overcomes the fundamental limitation of existing technologies in processing multi-source heterogeneous data. In particular, our method still achieved accurate recognition in the artificially constructed 50-meter misalignment scenario (row 2 of Table 3), demonstrating that the introduced ε tolerance mechanism effectively avoids misjudgments caused by minor errors.

[0170] 3. Technological innovation

[0171] The data in Table 5 reveals a breakthrough in exception handling achieved by this method: the success rate for handling scenarios with misaligned coordinate systems increased from 0% to 100%, attributed to the intelligent coordinate recognition system. Furthermore, the improved Graham algorithm in Table 2 achieved an 85.1% vertex compression rate while reducing computational time to 41% of the traditional method, confirming the technical necessity of the elevation filtering mechanism. By excluding sudden changes with Δh greater than 5 meters, it maintains terrain characteristics while improving computational efficiency.

[0172] 4. Evidence of industrial application value

[0173] The comprehensive scores in Table 6 show that our method scored 9.7 in exception handling (compared to 3.2 for traditional methods), directly reflecting the engineering value of the topology network construction algorithm. Experimental measurements show a 100% success rate for processing gigabyte-scale maps (row 4 in Table 5), while traditional methods have a failure rate of up to 68% due to memory overflow.

[0174] Conclusion: This embodiment confirms through 18 groups of comparative experimental data in 6 categories that the invention has produced significant technological breakthroughs in dimensions such as topological analysis efficiency (increased by 3-5 times), multi-source data compatibility (accuracy increased by 75%), and resource utilization (memory consumption reduced by 56.6%). It solves the long-standing technical difficulties of traditional topographic map continuity detection methods, such as low efficiency, high misjudgment rate, and poor adaptability, and has outstanding creativity and industrial application value.

[0175] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or components referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention; the terms "first", "second", and "third" are only used for descriptive purposes and should not be understood as indicating or implying relative importance. In addition, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, an indirect connection through an intermediate medium, or it can be internal communication between two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for determining whether a GDB format topographic map is continuous, characterized in that: include: Write a console program that runs on a Windows system. In the main function of the program, parse the incoming command line parameters to obtain the absolute paths PathA and PathB of two files A and B; The program calls the GDALDataset::Open method provided by the open source GDAL algorithm library, opens PathA, and obtains a dataset handle DatasetA of the GDALDataset type; The absolute paths of the two formulated topographic maps are calculated through the main function to obtain the first search topographic map and the second search topographic map; Obtaining a first data set handle of a first search topographic map and a second data set handle of a second search topographic map through an algorithm; Loop through the GetLayer method provided by DatasetA to get an object handle of type OGRLayer. Loop through the GetNextFeature method of Layer to get all the points, lines, and surface features contained in the Layer. Layer is a pop-up layer component. GetNextFeature is a vector calculation function algorithm. For point features, call the getX and getY methods to get the x and y coordinate values ​​of the point. For line features, get the x and y coordinate values ​​of each point on the line. For surface features, get the x and y coordinate values ​​of each point on all lines on the surface. Save the coordinate values ​​of all the above points, lines, and surface features to the memory linked list LA. After saving the coordinates of all points, lines, and surface features in all feature layers, call the GDALClose method to close the opened PathA. The first element layer and the second element layer are obtained based on the first dataset handle and the second dataset handle, and the first vector data of the first search topographic map and the second vector data of the second search topographic map are read after performing coordinate system normalization processing based on the first element layer and the second element layer respectively. The first vector data and the second vector data are placed in a coordinate system, and the irregular figures created by the first vector data and the second vector data in the coordinate system are recorded as a first search terrain coordinate map and a second search terrain coordinate map, respectively. A scanning algorithm is used to calculate the minimum convex hull coordinate groups of the first vector data and the second vector data, respectively, and recorded as a first convex hull group and a second convex hull group; Calculating the minimum convex hull coordinate set of the first vector data and the second vector data using the scanning algorithm includes: Select the point with the smallest y coordinate in the coordinate system as the reference point; Calculate the polar angle of each point of the first vector data relative to the reference point and sort them in ascending order; Filter out the vertex coordinates that constitute the convex hull through the stack structure; Store the filtered vertex coordinates into the memory linked list in clockwise order; Using the ray algorithm to determine, if the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, the two topographic maps are discontinuous; otherwise, the two topographic maps are continuous; The method of using a ray algorithm to determine whether the first convex hull group is not in the second search terrain coordinate map includes: Traverse each coordinate point of the target convex hull group; Perform ray method judgment on each coordinate point and calculate the number of intersections between the ray emitted from the point in the positive direction of the X axis and the target terrain coordinate map; When the number of intersections is odd, it is considered an internal point; when the number of intersections is even, it is considered an external point. The permissible error threshold ε is set, and when the ratio of the number of external points to the total number of points is less than ε, it is still considered as a containment relationship.

2. The method for determining whether a GDB format topographic map is continuous according to claim 1, characterized in that: After performing coordinate system normalization processing based on the first element layer and the second element layer, reading the first vector data of the first search topographic map and the second vector data of the second search topographic map includes: Unify the coordinate system; Parse the fields in the feature layer attribute table; Filter feature layers containing field values; The contour feature layer with the largest spatial coverage is read first; When there are multiple feature layers that meet the criteria, the latest version is selected based on the layer creation timestamp.

3. The method for determining whether a GDB format topographic map is continuous according to claim 1, characterized in that: The coordinate system unification process includes: detecting coordinate system definition parameters of the first search topographic map and the second search topographic map; When the coordinate systems of the two images are inconsistent, the dynamic projection conversion module is called to perform coordinate conversion based on the preset coordinate system conversion parameter table; Normalize the elevation data according to the Z value to eliminate the differences between different datum surfaces; Generates a metadata file containing the conversion log and stores it in an associated manner.

4. The method for determining whether a GDB format topographic map is continuous according to claim 1, characterized in that: The use of the ray algorithm to determine that the first convex hull group is not in the second search topographic coordinate map and the second convex hull group is not in the first search topographic coordinate map, and then concluding that the two topographic maps are discontinuous includes: Construct the map adjacency matrix and use the convex hull group of each map as the node feature; Perform breadth-first search on each node to establish topological network relationships; Set the traversal termination condition to the cumulative number of discontinuous edges exceeding the threshold; Output the largest continuous area map set and the discontinuous boundary coordinate list.

5. The method for determining whether a GDB format topographic map is continuous according to claim 1, characterized in that: The step of storing the filtered vertex coordinates into a memory linked list in clockwise order includes: Allocate an independent memory block for each convex hull group; Set the invalidation flag of the linked list node, and automatically trigger the memory release when the continuous judgment is completed; Establish a ring buffer to store historical convex hull data, and the buffer depth is configurable; Start an asynchronous garbage collection thread for data that exceeds the preset time limit.

6. The method for determining whether a GDB format topographic map is continuous according to claim 1, characterized in that: The two topographic maps are discontinuous. Otherwise, determining that the two topographic maps are continuous includes: Generate a standardized format report, when the result is determined to be discontinuous, the standardized format report includes the coordinates of the center point of the discontinuous area, area statistics and confidence index; Automatically create thematic layers, rendering continuous intensity with gradient colors; Trigger the 3D visualization engine to generate a cross-section analysis diagram of the edge; Generate a difference comparison diagram for the pair of map sheets that are determined to be discontinuous.

7. An electronic device, characterized in that include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

8. A computer-readable storage medium having executable instructions stored thereon, characterized in that When the instruction is executed by a processor, the processor implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Geographic information processing method and device, equipment and storage medium

    CN119379940A