CN112100300B - Method for quickly constructing space topological relation of vector earth surface coverage pattern spot and storage medium - Google Patents
Method for quickly constructing space topological relation of vector earth surface coverage pattern spot and storage medium Download PDFInfo
- Publication number
- CN112100300B CN112100300B CN202010852684.3A CN202010852684A CN112100300B CN 112100300 B CN112100300 B CN 112100300B CN 202010852684 A CN202010852684 A CN 202010852684A CN 112100300 B CN112100300 B CN 112100300B
- Authority
- CN
- China
- Prior art keywords
- associated object
- arc segment
- task
- object list
- arc
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Fuzzy Systems (AREA)
- Remote Sensing (AREA)
- Processing Or Creating Images (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method for quickly constructing the topological relation between vector earth surface coverage pattern spots includes constructing the edge topological relation network of task connection diagram, extracting the construction and edge relation of topological relation in task region, connecting edges and storing the topological relation between task regions. The invention utilizes a data structure based on a hash table structure to construct a topological relation between a mapping table and a task area, and the key code value is mapped to one position in the table to access the record so as to accelerate the searching speed. Thousands of subtasks are constructed according to the index structure of the spatial graphic data, namely a task partition connection chart, and can be driven in parallel by using multiple machines and multiple processors, so that accelerated processing is realized, and the time consumption of tasks is reduced.
Description
Technical Field
The invention relates to the field of geographic information, in particular to a method for quickly constructing a spatial topological relation of a vector earth surface coverage pattern spot and a storage medium.
Background
The topological relation refers to the mutual relation among all spatial data meeting the topological geometry principle. I.e., adjacency, association, containment and connectivity relationships between entities represented by nodes, arc segments and polygons. Such as: the relationship of the dots to the adjacent dots, the relationship of the dots to the surface, the relationship of the lines to the surface, the relationship of the surfaces to the surface, and the like. The adjacency relation and the association relation are basic spatial relations which are widely used and are the most time-consuming in the construction process. With the wide application of spatial data in different fields, the requirements of two-dimensional and three-dimensional browsing application focusing on the spatial data are gradually wide, and the requirements do not need to use topological relations. Compared with a spatial data model of self-contained topological relation, the data organization without the topological structure has certain redundancy, but the data access is simpler, and the data storage is not a technical bottleneck under a 64-bit operating system. Today's widely used objectification storage model adopts non-topology information storage, has simple format, is convenient for exchange, is convenient for data updating and maintenance, and is generally adopted in graphic systems, such as Shape files of ESRI, FileGDB files, dxf files of AutoCAD, and some mainstream space database systems and the like.
The topological adjacency relation of the spatial data has important significance on data processing and spatial analysis:
(1) according to the topological relation, the position relation of one space entity relative to another space entity can be determined without using coordinates or distances. The topological relation can clearly reflect the logical structure relation between the entities, has stronger stability than the aggregate data and does not change along with the projection of the map.
(2) According to the topological relation, the query of the space elements can be assisted, for example, the query of which regions a certain railway passes through, the query of which regions a certain county is adjacent to, the query of river flow or radiation regions, the query of land types around lakes and ecological evaluation can be carried out, and the like.
(3) According to the topological relation, the geographic entity can be reconstructed. For example, the same type of pattern spots are constructed according to the shared arc segments, the planar road network extraction, the planar forest pattern spot screening and the like are realized, and the high time cost of large-scale data fusion is avoided.
For an analysis algorithm depending on a spatial topological relation, when large-scale vector surface pattern data is handled, an efficient topological relation rapid construction method must be designed to meet the real-time input requirement of an objective model on topological information. At present, the topological relation construction method comprises a polygon search algorithm, a planar speckle topological relation construction method based on an irregular triangular network, a coordinate chain gridding method and the like, and mainly has the following two problems:
(1) the topological relation construction process is too complex, and common operators are difficult to master quickly
The existing topological relation construction method generally needs to combine multiple professional technologies or algorithms to assist in extracting the shared edge relation between the image spots. For example, searching for nearby polygons using a spatial index, determining shared edges using rasterization techniques, or establishing a topological relationship between nodes and arc segments using an irregular triangulation network, etc. The technologies are beyond the technical level of common operators, and the topological relation extraction, storage organization and application analysis are difficult to complete on complex image spot data in sequence.
(2) The topological adjacency list provided by the mainstream software has low calculation function efficiency and does not support distributed deployment
When large-scale vector image spot data are handled, conventional computing software cannot provide task dividing and treating capacity. In other words, the partition processing results cannot achieve uniform splicing and management. The ArcGIS software of the ESRI company provides a topology adjacency list generation function, but the performance is remarkably reduced with the increase of the data size. When dealing with vector patches of hundred million scale, although parallel modules can be developed on the basis of ArcGIS software to perform parallel processing of independent partitions, the area patches at the edges of the partitions cannot be identified and processed by connecting edges uniformly.
The normalized natural resource monitoring can produce full-coverage vector planar pattern spot data covering the territorial scope of the land area of China every year according to the requirements of work tasks, such as three-tone of the territorial, geographic national condition monitoring and the like. The data size for a single year will be between 1 and 10 billion. The spot size may exceed 10 billion, allowing for the superposition of grade, elevation, and terrain type data. Data sharing and computing service requirements from natural resources
Therefore, how to solve the problem of generating the topological relation of the large-range vector surface-shaped image spots, the construction of the topological relation of the image spots in hundred million scale and the distributed storage management are established; the computing efficiency of topological adjacency is improved, distributed deployment can be further supported, and the technical problem which needs to be solved in the prior art is formed.
Disclosure of Invention
The invention aims to provide a method for quickly constructing a spatial topological relation of a vector earth surface coverage pattern spot and a storage medium, which can realize large-scale vector area pattern spots based on hundred million scale by utilizing a divide-and-conquer processing method of a large data set, seamless splicing of topological relation, calculation and updating of consistency of topological relation and the like, quickly construct spatial topological relation and support topological query and statistical application service.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for quickly constructing a spatial topological relation of a vector earth surface coverage pattern spot is characterized by comprising the following steps:
an edge topological relation network construction step S110 of the task connection graph:
traversing each image spot in the task graph, and executing image spot operation on each image spot, wherein the image spot specifically comprises:
traversing the arc segments of each pattern spot, storing the coordinates of two ends of each arc segment and the unique codes corresponding to the pattern spots into a hash table in a binary structure (Key, Value) form, and forming a connected graph-arc segment-associated object list, wherein the Key in the connected graph-arc segment-associated object list is a Key word of the coordinates of the arc segments, the Key word of the coordinates of the arc segments is the coordinates of two end points of the arc segments, and the Value is the unique code of the polygon pattern spots taking the coordinates of the arc segments as constituent edges; extracting the associated information of the pattern spots in the 'connection diagram-arc segment-associated object list', storing the associated information in a form of binary structure < Key, Value > in a hash table to form a 'connection diagram-object-associated object list', wherein Key in the 'connection diagram-object-associated object list' is the unique code of the current pattern spot, and Value is all associated pattern spots of the current pattern spot;
the step S120 of constructing a topological relation in the task area and extracting an edge relation:
1) extracting all arcs according to a task area image spot where the image spot set is located to form a task area-edge arc list, wherein the arc list corresponds to all edge arcs of a polygon of a connection chart;
2) traversing arc segments in a graph spot set in a task area, searching from a task area-edge arc segment list when traversing each arc segment, if yes, organizing in a form of a binary structure < Key, Value >, storing into a hash table, wherein Key is an arc segment coordinate keyword of an edge arc segment, Value is an associated object identifier of the current edge arc segment at the inner side of the task area, and storing the result into the task area-edge arc segment-associated object list;
3) performing arc segment traversal on a pattern spot set in a task area, extracting pattern spot associated information in a 'task area-arc segment-associated object list', organizing the arc segments and associated objects in a form of binary structure < Key, Value >, storing the arc segments and the associated objects in a hash table to form a 'task area-arc segment-associated object list', wherein Key is a coordinate Key word of the arc segment, and Value is an associated object identifier of the current arc segment in the task area and is stored in the 'task area-object-associated object list';
4) respectively storing a task area-edge arc segment-associated object list and a task area-object-associated object list;
the step S130 of connecting and storing the topological relation among the task areas:
and obtaining a corresponding task area according to the connection chart-object-associated object list obtained in the step S110, performing 'pair-by-pair' edge connection processing on adjacent task areas by using the 'task area-arc-associated object list' and the 'task area-object-associated object list' of the adjacent task areas, and completing the topological adjacency relation construction and edge connection processing of all vector patches in the connection chart range after all objects update results.
Optionally, in each of the above steps, before the arc segment is traversed, the arc segment coordinate data needs to be preprocessed, so that the arc segment coordinate data is stored in the same direction.
3. The method for rapidly constructing the spatial topological relation of the vector surface coverage pattern spots according to claim 1 or 2, wherein:
for each list in the above steps, storing in a serialized mode during storage;
at the time of invocation, the stored file is first deserialized.
Optionally, in step S110, the forming process of the "graph-arc segment-associated object list" specifically includes:
first according to "X1,Y1,X2,Y2Is connected in opposite directionGraph-arc-associated object list, if not, then "X" will be1,Y1,X2,Y2"and the unique code of the graph spot are respectively taken as Key and Value to be included together in a" graph connection table-arc segment-associated object list "; if the object exists, the object is supplemented to the Value of the associated object list;
for the forming process of the connection graph table, the arc segment and the associated object list, the record with the associated object list size equal to 2 in the connection graph table, the arc segment and the associated object list can be read, two unique codes are read, and a Key item and a Value item are respectively made once and are included in the connection graph table, the arc segment and the associated object list to achieve symmetry.
Optionally, in step S120, the operation processes of different task areas are completely independent, and parallel processing can be implemented by a multithreading or multiprocessing technique, so that a large task is decomposed into a plurality of independent subtasks, and parallel driving is performed by using multiple machines and multiple processors, thereby implementing accelerated processing and reducing the time consumption of the task.
Optionally, in step S130, the performing of "pair-by-pair" edge joining processing on the adjacent task areas specifically includes:
traversing the 'task area-arc segment-associated object list' of two adjacent task areas, searching whether the two adjacent task areas have corresponding edge arc segments, if so, updating the 'task area-arc segment-associated object list' and the 'task area-object-associated object list', and incorporating the corresponding associated object identifier into the associated object identifier of the other task area.
A statistical calculation of minimum map spot threshold limit is characterized in that a topological proximity relation is constructed by utilizing the vector earth surface coverage map spot space topological relation rapid construction method, and adjacent map spots with the same earth class attribute are obtained through adjacent search of earth class map spots, so that area calculation is carried out.
A topological proximity relation is constructed by utilizing the vector earth surface coverage pattern spot space topological relation rapid construction method, and other pattern spots having an adjacent relation with a specific pattern spot identification are inquired on the basis of the specific pattern spot identification.
The invention also discloses a storage medium for storing computer executable instructions, which is characterized in that:
the computer executable instruction is executed by a processor to execute the vector surface coverage map spot topological relation rapid construction method.
The invention utilizes a data structure based on a hash table structure to construct a topological relation between a mapping table and a task area, and the key code value is mapped to one position in the table to access the record so as to accelerate the searching speed. Thousands of subtasks are constructed according to the index structure of the spatial graphic data, namely a task partition connection chart, and can be driven in parallel by using multiple machines and multiple processors, so that accelerated processing is realized, and the time consumption of tasks is reduced.
Drawings
FIG. 1 is a flowchart of a method for rapidly constructing a spatial topological relation of a vector earth surface coverage map spot according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the relationship between a task graph and a set of vector patches;
FIG. 3 is an example of a process for constructing an edge topology relationship network of task connection graphs according to an embodiment of the present invention;
FIG. 4 is an example of a process of constructing a topological relation in a task area and extracting an edge relation according to an embodiment of the present invention;
FIG. 5 is an example of a process for edge joining of topological relations between task areas according to an embodiment of the present invention;
FIG. 6 is an example of a statistical calculation of minimum speckle threshold limits in accordance with a specific embodiment of the present invention;
FIG. 7 is an example of infrastructure proximity analysis in accordance with a specific embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The invention is characterized in that: the topological relation between the table and the task area is constructed by utilizing a data structure based on a hash table structure, and the records are accessed by mapping key code values to one position in the table so as to accelerate the searching speed. Thousands of subtasks are constructed according to the index structure of the spatial graphic data, namely a task partition connection chart, and can be driven in parallel by using multiple machines and multiple processors, so that accelerated processing is realized, and the time consumption of tasks is reduced.
The hash table-based data structure has basically the same construction and search processes, which means that the query process can be completed in a constant time. The data structure based on the hash table can quickly identify and mark the arc segments of the subtask edges and the corresponding pattern spots, and the topological adjacency relation among the pattern spots crossing the task area can be directly established by comparing the arc segments with the sequence of the arc segments connected with the pattern. And thousands of subtasks can be constructed, so that the large-scale vector surface-shaped image spots can be processed by a proper dividing and treating strategy, and the high-time-consumption large tasks can be divided into a plurality of independent subtasks.
Specifically, referring to fig. 1, a flowchart of a method for quickly constructing a spatial topological relation of a vector surface coverage map spot according to an embodiment of the present invention is shown, including the following steps:
an edge topological relation network construction step S110 of the task connection graph:
the step is used for constructing a topological relation of a task chart, wherein the task chart is an external contour line of a vector chart spot set and is used for limiting working ranges of different operation teams when production tasks are implemented. The vector pattern spot set does not exceed the range of the map table, the pattern spots at the edge have a collinear relationship with the edge line of the map table, namely an adjacent relationship in the topological relationship, and the rest pattern spots are contained relationships, and the forming relationship is shown in fig. 2.
Traversing each image spot in the task graph, and executing image spot operation on each image spot, wherein the image spot specifically comprises:
traversing the arc segments of each pattern spot, storing the coordinates of two ends of each arc segment and the unique codes corresponding to the pattern spots into a hash table (also called a hash table) in a form of a binary structure (Key and Value), and forming a connected graph, the arc segments and associated object list, wherein the Key in the connected graph, the arc segments and associated object list is an arc segment coordinate Key word, the arc segment coordinate Key word is the coordinates of two end points of the arc segments, and the Value is the unique code of a polygon pattern spot with the arc segment coordinates as a composition edge; and then, extracting the associated information of the graph patches in the connected graph-arc segment-associated object list, storing the design result in a hash table (also called a hash table) in a form of a binary structure < Key, Value >, and forming the connected graph-object-associated object list, wherein the Key in the connected graph-object-associated object list is the unique code of the current graph patches, and the Value is all associated graph patches of the current graph patches.
Illustratively, table 1 shows a hash table structure stored in "graph-arc segment-associated object list", where Key is a string type and Value is a list of string types.
TABLE 1 Hash Table storage Structure of graph-arc segment-associated object List
Serial number | Name of | Operation rule | |
1 | Key | The key word of arc segment is according to' X1,Y1,X2,Y2By "organizing in |
|
2 | Value | Associated object list in "X1,Y1,X2,Y2"arc segments are unique codes for polygon patches constituting an edge, each arc segment having at least 1 associated patch and at most two associated patches |
Specifically, during the storage process, firstly, according to' X1,Y1,X2,Y2"search for" graph-arc-associated object list ", if not, then" X "will be1,Y1,X2,Y2"and the unique code of the graph spot are respectively taken as Key and Value to be included together in a" graph connection table-arc segment-associated object list "; if the object exists, the object is supplemented into the associated object list Value.
Because the same arc segment may be located at the edge, the corresponding Value includes the unique code of a polygon image spot; it is also possible that the same arc segment is located at the boundary position of two polygon patches, and in this case, the corresponding Value includes the unique codes of the two polygon patches.
For the forming process of the table connection table-object-associated object list, the record with the associated object list size equal to 2 in the table connection table-arc segment-associated object list can be read, two unique codes are read, and a Key item and a Value item are respectively made once and are included in the table connection table-object-associated object list to achieve symmetry. In addition, in the process of incorporation, repeated check should be performed to avoid repeated recording of key value pairs.
Illustratively, table 2 shows a hash table storage structure of "graph-object-associated object list".
TABLE 2 Hash Table storage Structure of "Chart-object-associated object List
Serial number | Name of fieldBalance | Remarks for |
1 | Key | Unique code of pattern spot, identification key word of |
2 | Value | List of associated objects, all associated blobs of the current blob |
Illustratively, an example of the process of constructing the edge topological relational network of the task-to-graph table is shown in fig. 3. Taking the arc segment of each pattern spot in the task connection diagram as Key, extracting the association relation of different connection diagram objects, storing as Value, and forming a connection diagram-arc segment-association object list; on the basis, the unique identifier of each object in the graph connection table is used as a Key, and other multiple associated objects of each object are obtained by inquiring the associated object list in the 'graph connection table-arc segment-associated object list', so that a 'graph connection table-object-associated object list' is formed.
Since the task map is the outer contour of the set of vector patches, this step is equivalent to forming the total data for the entire vector patch. The step has low calculation amount and is not required to be completed through parallel calculation.
The step S120 of constructing a topological relation in the task area and extracting an edge relation:
the vector image spot set in the task area is a main body for constructing a topological relation, and the data scale determines the overall time consumption.
1) And extracting all arc segments according to the image spot of the task area where the image spot set is located to form a 'task area-edge arc segment list', wherein the arc segment list corresponds to all edge arc segments of a polygon of a connection chart. Such as the outer edge arc of the plateau region. The list may include coordinate positions of the front and back endpoints of the arc segment.
2) Performing arc segment traversal in the set of the patches in the task area. When each arc segment is traversed, searching is performed from a task area-edge arc segment list, if the arc segment exists, the arc segment is organized in a form of a binary structure < Key, Value >, and is stored into a hash table (also called hash table), the Key is an arc segment coordinate Key of the edge arc segment, the Value is an associated object identifier of the current edge arc segment inside the task area, such as a spot number in the task area, and the result is stored into the task area-edge arc segment-associated object list.
For example, the following: the object id is determined by "task area code + blob sequence number", for example, "110106 _ 1571" represents the 1571 st blob in 110106 county. A list of associated objects may store a plurality of object identifications.
3) The arc segment traversal is carried out in the spot set in the task area, the arc segment and the associated objects are organized in the form of a binary structure (Key and Value), the two are stored in a hash table (also called hash table), a 'task area-arc segment-associated object list' is formed, the Key is a coordinate Key word of the arc segment, the Value is an associated object identifier of the current arc segment in the task area, the spot associated information in the 'task area-arc segment-associated object list' is extracted, other multiple associated objects of each object are extracted, and the 'task area-object-associated object list' is formed by storage.
4) The "task area-edge arc segment-associated object list" and the "task area-object-associated object list" are stored separately.
For example, the text file is stored in a serialized manner, stored as a text file, and stored in a certain format in the text file. Accordingly, it can be deserialized at the time of invocation.
Illustratively, the file structure of the "task region-edge arc-associated object list" is "arc string # associated object list" (# is a separator, in the associated object list, different associated objects are divided according to "in" and "are stored row by row", and the file name is according to "task region encoding _ edge. txt", for example, "110106 _ edge. txt". The file structure of the task area-object-associated object list is current object identification, associated object 1 identification, associated object 2 identification, …. The object identification is determined by adopting a mode of 'task area coding + image spot sequence number'.
The process is shown in figure 4. Taking a graph-connected object as an example, the arc segments of the graph-connected object are extracted and stored into a task area-edge arc segment list. Traversing all the image spot sets in the chart object, identifying the edge arc segment by judging whether the arc segment is in a task area-edge arc segment list, and recording the corresponding image spot object to form a task area-edge arc segment-associated object list. And traversing all the chart spot sets in the chart object, recording the associated objects of all the arc segments, and forming a task area-arc segment-associated object list. Finally, similar to step S110, other multiple associated objects of each object are extracted to form a "task area-object-associated object list".
In the step, the operation processes of different task areas are completely independent, and parallel processing is very easy to realize through a multithreading or multiprocessing technology. According to actual tests, parallel topological relations can be easily established under a multi-computer environment, and independent serialized storage files are respectively formed. As the vector image spot set in the task area is the main body of the topological relation construction, the data scale determines the whole time consumption. Therefore, the high-time-consumption large task can be decomposed into a plurality of independent subtasks through the step S120, preconditions for parallel processing of multiprocessing resources are provided, thousands of subtasks are constructed according to the index structure of the spatial graphic data, namely the task partition connection diagram, and the multi-machine and multi-processor can be used for parallel driving, so that accelerated processing is realized, and the time consumption of the task is reduced.
The step S130 of connecting and storing the topological relation among the task areas:
and obtaining a corresponding task area according to the connection chart-object-associated object list obtained in the step S110, performing 'pair-by-pair' edge connection processing on adjacent task areas by using the 'task area-arc-associated object list' and the 'task area-object-associated object list' of the adjacent task areas, and completing the topological adjacency relation construction and edge connection processing of all vector patches in the connection chart range after all objects update results.
Specifically, the method comprises the following steps: traversing the 'task area-arc segment-associated object list' of two adjacent task areas, searching whether the two adjacent task areas have corresponding edge arc segments, if so, updating the 'task area-arc segment-associated object list' and the 'task area-object-associated object list', and incorporating the corresponding associated object identifier into the associated object identifier of the other task area.
Taking the adjacent task areas a and B as examples:
1) the "task area-edge arc segment-associated object list" is deserialized from the task area storage files, respectively, to form, for example, a _ map _ border and B _ map _ border, and the "task area-object-associated object list" is deserialized from the task area storage files, respectively, to form a _ map _ objects and B _ map _ objects.
2) The traversal searches whether the corresponding edge arc segment in the A _ map _ border is in the B _ map _ border, and if so, updates the A _ map _ border and the B _ map _ border, and respectively updates the A _ map _ objects and the B _ map _ objects.
The specific updating process is as follows: firstly, according to the edge arc segment Key in the A _ map _ border, searching and positioning are carried out on the B _ map _ border, then the associated object identification (for example: AID) in the A _ map _ border is included into the associated object list of the B _ map _ border, and meanwhile, the associated object identification (for example: BID) in the B _ map _ border is included into the associated object list of the A _ map _ border; the BID is then incorporated into the A _ map _ objects with the AID as Key, and the AID is incorporated into < AID, BID > and B _ map _ objects with the BID as Key.
3) After the update is completed, the a _ map _ border, the a _ map _ objects, the B _ map _ border, and the B _ map _ objects are serialized into corresponding storage files, and the process is the same as the process in step S120.
Illustratively, fig. 5 shows an example of the edge-joining process of the topological relation between task areas according to the specific embodiment of the present invention.
Further, for the same inclusion (X)1,Y1B) and (X)2,Y2) Arc segment of (2), the coordinate storage of which may be in "X1,Y1,X2,Y2"form, also possible is" X2,Y2,X1,Y1"although in the same arc segment, may be expressed in a different data structure. Thus, to avoid false arcs being identified as different arcs, the arc coordinate data needs to be pre-processed before the arc traversal so that they are stored in the same orientation.
In an alternative embodiment, the coordinates "X" of the two ends may be recorded in sequence so that they are stored in the same direction1,Y1,X2,Y2", such as X1> X2Then exchange "X1,Y1And X2,Y2"sequence, e.g. X1=X2And Y is1>Y2The order is also exchanged.
Of course, one skilled in the art will appreciate that the coordinates of two points of the arc segment may be stored in the reverse manner.
In the invention, before all traversals of the arc segment, the arc segment coordinate data is preprocessed, so that the arc segment coordinate data is stored according to the same direction.
The construction of the topological adjacency of the national hundred million level vector surface coverage map spot through the above steps has wide application in the application of the geographic information system by way of example.
Example 1: statistical calculation of minimum speckle threshold limits
In implementing spatial statistics, the size of the pattern spot involved in the area calculation is typically limited. However, data production is performed according to different partitions (chart connections), so that real plots which are located at the edge connections and belong to the same ground class are divided into different task areas. During area calculation, the edge pattern spots are generated due to division of the chart connecting chart or the administrative unit boundary, and then calculation is omitted, so that the overall statistical result is small. The general processing system mostly adopts a space Union (Union) method to perform the image spot fusion on the same land class, but the process is very time-consuming, and the mainstream ArcGIS software is difficult to support the image spot fusion processing with the scale of more than a million. According to the method, the original real plot spots of the land can be restored for calculation only by inquiring the associated object list of each spot without spatial fusion.
Referring to fig. 6, on the basis that the topological adjacency relationship has been constructed, through the adjacency search of the geographical class patches, it can be known that the patches A, C, D, E are adjacent and have the same geographical class attribute (the geographical class attribute is obtained from the original data), and further, the area accounting is performed according to the same geographical block. When the forest coverage rate of the area is counted, the constraint that the area of the continuous pattern spot is more than 0.5 hectare exists. When the sum of the areas of the ACDE is more than 0.5 hectare, the patch is regarded as a complete forest statistical patch.
Example 2: infrastructure proximity analysis
In a full-coverage surface element, it is often necessary to count the proximity of patches of arable land, woodland, pasture to rivers or roads. That is, which plots can be directly adjacent to a river or road network serves as an important parameter for measuring and evaluating the quality and location conditions of the plots.
After the topological adjacency relation is established based on the method, other image spots with the adjacency relation can be inquired directly on the basis of the image spot identification of the river network and the road network. As shown in FIG. 7, there is B, C, G plots in the farmland directly adjacent to river K, which belongs to the high-quality farmland, while J is far away from each other and cannot be directly irrigated.
The invention also discloses a storage medium for storing computer executable instructions, which is characterized in that:
the computer executable instruction is executed by a processor to execute the vector surface coverage map spot topological relation rapid construction method.
Aiming at the requirement of quickly constructing the topological relation of the hundred million-scale vector earth surface form pattern spots, the invention designs and solves the following technical problems:
(1) solves the difficult problem of generating the topological relation of the large-range vector surface pattern spot
The traditional ArcGIS software is difficult to complete the generation of adjacency relation of map spots of tens of millions and more scales, and practical tests are carried out by taking a plurality of map spot sets of city scale scales as an example, and more than 70 percent of calculation results cannot be returned. Based on the hash key value pair structure of the hash table, an accurate matching relation can be established for vector image spots of the shared arc segment. Aiming at a joint chart and a task area pattern, a two-stage topological relation maintenance mechanism is constructed, on one hand, the marginal adjacent relation between pattern spot sets can be established according to the joint chart, on the other hand, a topological adjacent relation extraction and storage method of the pattern spot sets in the joint chart is provided, and finally, the construction and distributed storage management of the large-range and hundred million-scale pattern spot topological relation are completed through edge joint processing of edge pattern spots.
(2) The problem of the calculation efficiency of the topological relation of the vector geographic pattern spots is solved
The vector graphic spot topological relation construction has higher time complexity, and the traditional processing method is difficult to carry out division construction on the topological relation of the large-scale vector area graphic spots by fully utilizing distributed computing resources. Firstly, a joint chart is used as a task division basis, a high-time-consumption large task is decomposed into a plurality of independent subtasks, and a precondition for parallel processing of multiprocessing resources is provided. And then, the one-dimensional arc segment keywords are stored by a hash table structure, the searching complexity is reduced to be constant scale on the basis of lower memory utilization rate, and the high cost of realizing accurate judgment by traditional indirect methods such as spatial index and rasterization is avoided.
The invention provides a feasible technical method system for solving the topological adjacency construction of the hundred million-level vector surface pattern spots, effectively disassembles the complex statistical service flow structure and has the following advantages:
the invention can obviously improve the calculation efficiency of the large-scale vector surface-shaped image spot topological adjacency construction. Conventional construction methods, such as irregular triangulation networks, are often too complicated to rapidly process millions or even tens of millions of data, and cannot effectively support topological relation splicing of distributed data sets. As for the method, actual tests show that the time consumed for processing the topological adjacency relation construction of all planar patches (218368) in a certain county by using the method is 121 seconds under the single-computer single CPU environment, and the method is obviously superior to other technical methods searched through academic channels; under the environment of three high-performance computing nodes (60 CPU cores), when about 3.3 million image spot data of three adjacent provinces are processed, about 679 seconds are consumed to complete the parallel construction of the internal topological relation of the multitasking region and the serial splicing of the edge image spot topological relation.
The invention is applicable to statistical analysis applications that implement constraints on the minimum area of the pattern patch. For example, when calculating the forest coverage of the area, there is a constraint that the area of the continuous patches is greater than 0.5 hectare, and the forest area patches are divided into a plurality of independent patches due to the influence of various administrative boundaries and natural boundaries, so that a lot of time is consumed to perform patch fusion operation. According to the invention, by constructing the topological relation in advance, adjacent pattern spots of the same type can be extracted more easily to carry out continuous area constraint check, and the data fusion operation before calculation is avoided. The invention has been applied to forest coverage calculation at present.
The method can be applied to the correlation query of the space elements, for example, the directly adjacent or affected map spots of the land type along the highway (topological adjacency query) in Kyoto and Australia; the strength of association of the polluted river with the population residence (topological association query), and the like.
It will be apparent to those skilled in the art that the various elements or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device, or alternatively, they may be implemented using program code that is executable by a computing device, such that they may be stored in a memory device and executed by a computing device, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
While the invention has been described in further detail with reference to specific preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (9)
1. A method for quickly constructing a spatial topological relation of a vector earth surface coverage pattern spot is characterized by comprising the following steps:
an edge topological relation network construction step S110 of the task connection graph:
traversing each image spot in the task graph, and executing image spot operation on each image spot, wherein the image spot specifically comprises:
traversing the arc segments of each pattern spot, storing the coordinates of two ends of each arc segment and the unique codes corresponding to the pattern spots into a hash table in a binary structure (Key, Value) form, and forming a connected graph-arc segment-associated object list, wherein the Key in the connected graph-arc segment-associated object list is a Key word of the coordinates of the arc segments, the Key word of the coordinates of the arc segments is the coordinates of two end points of the arc segments, and the Value is the unique code of the polygon pattern spots taking the coordinates of the arc segments as constituent edges; extracting the associated information of the pattern spots in the 'connection diagram-arc segment-associated object list', storing the associated information in a form of binary structure < Key, Value > in a hash table to form a 'connection diagram-object-associated object list', wherein Key in the 'connection diagram-object-associated object list' is the unique code of the current pattern spot, and Value is all associated pattern spots of the current pattern spot;
the step S120 of constructing a topological relation in the task area and extracting an edge relation:
1) extracting all arcs according to a task area image spot where the image spot set is located to form a task area-edge arc list, wherein the arc list corresponds to all edge arcs of a polygon of a connection chart;
2) traversing arc segments in a graph spot set in a task area, searching from a task area-edge arc segment list when traversing each arc segment, if yes, organizing in a form of a binary structure < Key, Value >, storing into a hash table, wherein Key is an arc segment coordinate keyword of an edge arc segment, Value is an associated object identifier of the current edge arc segment at the inner side of the task area, and storing the result into the task area-edge arc segment-associated object list;
3) performing arc segment traversal on a pattern spot set in a task area, organizing an arc segment and an associated object in a binary structure (Key and Value), storing the arc segment and the associated object into a hash table to form a 'task area-arc segment-associated object list', wherein the Key is a coordinate Key word of the arc segment, the Value is an associated object identifier of the current arc segment in the task area, extracting pattern spot associated information in the 'task area-arc segment-associated object list', and storing to form a 'task area-object-associated object list';
4) respectively storing a task area-edge arc segment-associated object list and a task area-object-associated object list;
the step S130 of connecting and storing the topological relation among the task areas:
and obtaining a corresponding task area according to the connection chart-object-associated object list obtained in the step S110, performing 'pair-by-pair' edge connection processing on adjacent task areas by using the 'task area-arc-associated object list' and the 'task area-object-associated object list' of the adjacent task areas, and completing the topological adjacency relation construction and edge connection processing of all vector patches in the connection chart range after all objects update results.
2. The method for rapidly constructing the spatial topological relation of the vector surface coverage pattern spots according to claim 1, is characterized in that:
in each of the above steps, the arc segment coordinate data needs to be preprocessed before the arc segment is traversed, so that the arc segment coordinate data is stored in the same direction.
3. The method for rapidly constructing the spatial topological relation of the vector surface coverage pattern spots according to claim 1 or 2, wherein:
for each list in the above steps, storing in a serialized mode during storage;
at the time of invocation, the stored file is first deserialized.
4. The method for rapidly constructing the spatial topological relation of the vector surface coverage pattern spots according to claim 2 or 3, wherein:
in step S110, the forming process of the "graph-arc segment-associated object list" specifically includes:
first according to "X1,Y1,X2,Y2"search for" graph-arc-associated object list ", if not, then" X "will be1,Y1,X2,Y2"and the unique code of the graph spot are respectively taken as Key and Value to be included together in a" graph connection table-arc segment-associated object list "; if the object exists, the object is supplemented to the Value of the associated object list;
for the forming process of the connection graph table, the arc segment and the associated object list, the record with the associated object list size equal to 2 in the connection graph table, the arc segment and the associated object list can be read, two unique codes are read, and a Key item and a Value item are respectively made once and are included in the connection graph table, the arc segment and the associated object list to achieve symmetry.
5. The method for rapidly constructing the spatial topological relation of the vector surface coverage pattern spots according to claim 2, is characterized in that:
in step S120, the operation processes in different task areas are completely independent, and parallel processing can be implemented by a multithreading or multiprocessing technique, so that a large task is decomposed into a plurality of independent subtasks, and parallel driving is performed by using multiple machines and multiple processors, thereby implementing accelerated processing and reducing the time consumption of the task.
6. The method for rapidly constructing the spatial topological relation of the vector surface coverage pattern spots according to claim 2, is characterized in that:
in step S130, the "pair-by-pair" edge joining processing performed on the adjacent task areas specifically includes:
traversing the 'task area-arc segment-associated object list' of two adjacent task areas, searching whether the two adjacent task areas have corresponding edge arc segments, if so, updating the 'task area-arc segment-associated object list' and the 'task area-object-associated object list', and incorporating the corresponding associated object identifier into the associated object identifier of the other task area.
7. A statistical calculation method for minimum speckle threshold definition, characterized by:
the method for quickly constructing the space topological relation of the vector surface coverage pattern spots is used for constructing the topological adjacent relation, adjacent pattern spots with the same geographical attributes are obtained through the adjacent search of the geographical pattern spots, and therefore area accounting is conducted.
8. An infrastructure proximity analysis method, comprising:
the method for quickly constructing the spatial topological relation of the vector surface coverage pattern spots is used for constructing the topological proximity relation, and other pattern spots with the adjacency relation are inquired on the basis of the specific pattern spot identification.
9. A storage medium for storing computer-executable instructions, characterized in that:
the computer-executable instructions, when executed by a processor, perform the method for rapidly constructing the topological relation of the vector surface coverage map spot according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010852684.3A CN112100300B (en) | 2020-08-22 | 2020-08-22 | Method for quickly constructing space topological relation of vector earth surface coverage pattern spot and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010852684.3A CN112100300B (en) | 2020-08-22 | 2020-08-22 | Method for quickly constructing space topological relation of vector earth surface coverage pattern spot and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112100300A CN112100300A (en) | 2020-12-18 |
CN112100300B true CN112100300B (en) | 2022-02-18 |
Family
ID=73753167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010852684.3A Active CN112100300B (en) | 2020-08-22 | 2020-08-22 | Method for quickly constructing space topological relation of vector earth surface coverage pattern spot and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112100300B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112948518B (en) * | 2021-03-05 | 2024-05-14 | 苍穹数码技术股份有限公司 | Object processing method, device, electronic equipment and computer storage medium |
CN113032404B (en) * | 2021-05-20 | 2021-09-14 | 中国测绘科学研究院 | Method and system for extracting pattern spot change track facing earth surface coverage data |
CN113268544B (en) * | 2021-05-31 | 2023-06-27 | 新华三技术有限公司 | Data processing method and device |
CN114244595B (en) * | 2021-12-10 | 2024-03-12 | 北京达佳互联信息技术有限公司 | Authority information acquisition method and device, computer equipment and storage medium |
CN115359149B (en) * | 2022-08-24 | 2023-04-07 | 中国测绘科学研究院 | Continuous pattern spot simplification method under constraint of generalized topological structure |
CN115564672B (en) * | 2022-09-22 | 2023-04-18 | 中国测绘科学研究院 | Method for restoring entity of strip-shaped surface element data |
CN116416340B (en) * | 2023-03-16 | 2023-09-26 | 中国测绘科学研究院 | Topology rapid construction algorithm for continuously overlaying data |
CN118525736A (en) * | 2024-05-14 | 2024-08-23 | 中国水利水电科学研究院 | Automatic coding and opening and closing adjusting method for intelligent channel water transmission and distribution gate control engineering system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101251929A (en) * | 2008-02-29 | 2008-08-27 | 浙江大学 | Method for building area topological relation based on Delaunay triangular mesh technology |
CN103412863A (en) * | 2013-06-05 | 2013-11-27 | 东南大学 | Embedded-device-oriented method for achieving rapid visualization of high-capacity vector map |
CN104298734A (en) * | 2014-09-30 | 2015-01-21 | 东南大学 | Mobile updating method for change pattern spots in land use status change survey |
CN106649777A (en) * | 2016-12-27 | 2017-05-10 | 中科宇图科技股份有限公司 | Method for constructing topological relation of intersection in panoramic vector data |
CN107103061A (en) * | 2017-04-14 | 2017-08-29 | 中国科学院遥感与数字地球研究所 | A kind of construction method and device of the dynamic adjacency matrix of interior space unit |
CN108985309A (en) * | 2017-05-31 | 2018-12-11 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130238649A1 (en) * | 2011-07-08 | 2013-09-12 | Annie Shum | Visual and context-oriented curation and knowledge/insight discovery platform |
-
2020
- 2020-08-22 CN CN202010852684.3A patent/CN112100300B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101251929A (en) * | 2008-02-29 | 2008-08-27 | 浙江大学 | Method for building area topological relation based on Delaunay triangular mesh technology |
CN103412863A (en) * | 2013-06-05 | 2013-11-27 | 东南大学 | Embedded-device-oriented method for achieving rapid visualization of high-capacity vector map |
CN104298734A (en) * | 2014-09-30 | 2015-01-21 | 东南大学 | Mobile updating method for change pattern spots in land use status change survey |
CN106649777A (en) * | 2016-12-27 | 2017-05-10 | 中科宇图科技股份有限公司 | Method for constructing topological relation of intersection in panoramic vector data |
CN107103061A (en) * | 2017-04-14 | 2017-08-29 | 中国科学院遥感与数字地球研究所 | A kind of construction method and device of the dynamic adjacency matrix of interior space unit |
CN108985309A (en) * | 2017-05-31 | 2018-12-11 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device |
Non-Patent Citations (1)
Title |
---|
基于ArcEngi玳的空间分析关键技术的研究与应用;赵珂等;《南昌航空大学学报》;20141231;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112100300A (en) | 2020-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112100300B (en) | Method for quickly constructing space topological relation of vector earth surface coverage pattern spot and storage medium | |
Matai et al. | Traveling salesman problem: an overview of applications, formulations, and solution approaches | |
Ding | The Complex Network Theory‐Based Urban Land‐Use and Transport Interaction Studies | |
CN105630988A (en) | Method and system for rapidly detecting space data changes and updating data | |
CN101900565A (en) | Path determining method and device | |
Bendechache et al. | Efficient large scale clustering based on data partitioning | |
Ghosh et al. | Traj-cloud: a trajectory cloud for enabling efficient mobility services | |
Smaltschinski et al. | Clustering forest harvest stands on spatial networks for optimised harvest scheduling | |
Xiong | A three-stage computational approach to network matching | |
Pande et al. | SkyGraph: Retrieving regions of interest using skyline subgraph queries | |
CN102637227B (en) | Land resource assessment factor scope dividing method based on shortest path | |
CN115205699B (en) | Map image spot clustering fusion processing method based on CFSFDP improved algorithm | |
Bembenik et al. | Methods for mining co–location patterns with extended spatial objects | |
CN116304216A (en) | Marketing domain graph data model construction method based on graph technology | |
CN102254093A (en) | Connected domain statistical correlation algorithm based on Thiessen polygon | |
Zhang et al. | Railway wagon flow routing locus pattern intelligent recognition algorithm based on SST | |
Bahrdt et al. | Searching OSM Planet with context-aware spatial relations | |
Zhao et al. | A framework for group converging pattern mining using spatiotemporal trajectories | |
Qiao et al. | Partspan: Parallel sequence mining of trajectory patterns | |
Pendyala | Development of GIS-based conflation tools for data integration and matching | |
Santos et al. | Comparative performance evaluation of relational and NoSQL databases for spatial and mobile applications | |
Malerba et al. | Spatial clustering of structured objects | |
Yang et al. | Matching road network combining hierarchical strokes and probabilistic relaxation method | |
KR100663606B1 (en) | Method of calculating multi-conditioned optimum path using coordinates | |
Hardy | Active Objects And Dynamic Topology For Spatial Data Re-Engineering And Rich Data Modelling |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |