CN101359337A - Method for interactively editing GIS topological data set - Google Patents

Method for interactively editing GIS topological data set Download PDF

Info

Publication number
CN101359337A
CN101359337A CNA2008101430514A CN200810143051A CN101359337A CN 101359337 A CN101359337 A CN 101359337A CN A2008101430514 A CNA2008101430514 A CN A2008101430514A CN 200810143051 A CN200810143051 A CN 200810143051A CN 101359337 A CN101359337 A CN 101359337A
Authority
CN
China
Prior art keywords
node
line segment
editorial services
data set
topological data
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.)
Granted
Application number
CNA2008101430514A
Other languages
Chinese (zh)
Other versions
CN101359337B (en
Inventor
邱永红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN2008101430514A priority Critical patent/CN101359337B/en
Publication of CN101359337A publication Critical patent/CN101359337A/en
Application granted granted Critical
Publication of CN101359337B publication Critical patent/CN101359337B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed is a method for realizing the interactively editing of the GIS topological dataset; the method appends the topological object to the GIS topological dataset to create the topological dataset through the form that the coordinate points are inputted interactively to generate line segments; the method also modifies the topological dataset through moving the arc segments or nodes interactively and realizes the cancellation and recovery operations through adding the transaction mechanism; the cancellation and recovery operations are used for canceling the previous editing operation or recovering the previous cancelled editing operation when the editing result is inconsistent with the expectation or the editing result needs to be rolled back to the previous data state during the editing and processing process of the topological data so that the purposes of improving the safety, interactivity and the work efficiency in editing the GIS topological dataset are realized.

Description

The method that is used for interactively editing GIS topological data set
Affiliated technical field
The present invention relates to GIS vector data editing technique, particularly a kind of method that is used for interactively editing GIS topological data set.
Background technology
Geographic Information System (Geographic Information System, GIS) vector data model comprises two types, i.e. Spaghetti data model and topology data model (statement Peng etc.: Geographic Information System introduction, Science Press, 2000, P31-43).In the Spaghetti model, spatial point represents that with a volume coordinate line is made up of a string coordinate (being called node), and face is the closed polygon that is formed of a wire.The basic object type of topological model comprises node, segmental arc and zone, and segmental arc is formed by connecting by series of points (claiming node again), and it starts from start node, stops node finally; Node is the point that segmental arc intersects or stops; A zone is by an outer shroud and zero or a plurality of interior closed scope of forming of encircling, and a ring is formed by connecting by one or more segmental arc.In the Spaghetti model, geometric object (point, line, surface etc.) is directly corresponding with coordinate data, does not store topological relation each other.In topological structure, except the storing coordinate data, also write down topology information, as the related segmental arc of node, the initial sum of segmental arc stop node, about the zone, the segmental arc of compositing area etc.
Topology data model has lot of advantages, as: do not need to come the interpretation topological relation, brought convenience for space querying, analyzing and processing by coordinate Calculation; Polygonal data boundary can significantly compress the data volume of graph data with the segmental arc network storage; In the process that generates topological structure, find out the mistake of data input easily; Can conveniently handle " island " nested in the polygon and carry out polygon and merge processing etc.In view of above reason, many GIS softwares are all supported the application based on topology data model, as ARC/INFO, MapGIS, GeoStar etc.
Though present GIS software is supported the application based on topology data model, but do not support that directly topological data set being carried out interactive editing handles, comprise interactively establishment or mobile topology objects and indispensable cancelling (Undo) in editing process, recover (Redo) operation.At present,, good interactive the establishment or amending method arranged, but, must utilize described non-topological data set to carry out topology constructing again and realize by creating non-topological data set earlier for the establishment of topological data set for the vector data of non-topological structure; For the modification of topological data set, also must the more concentrated total data of described non-topological data be carried out topology reconstruction and realize by revising and the corresponding non-topological data set of described topological data set.Though these classic methods can guarantee the correctness and the integrality of data topology relation, but because it is not realized by directly topological data set being operated, its operating process is complicated, operating result neither be directly visible, be not easy in editing process, find in real time and correct topological mistake, reduce security, interactivity and the work efficiency of topological data set editing and processing, limited the application of topology data model.
Summary of the invention
Create in order to overcome the traditional GIS topological data, the deficiency of amending method, the invention provides a kind of be used to realize establishment of GIS topological data set and the interactive editing method of revising, this method not only can be concentrated to the GIS topological data in the mode of interactively input coordinate dot generation line segment and append topology objects and create topological data set, also can realize moving segmental arc or node is revised topological data set by interactively, in addition, the present invention is also by adding affair mechanism, realized cancelling, recover to handle operation, be used for when the data mode before topological data editing and processing process discovery edited result is not inconsistent with expection or needs playback, the editing operation of cancelling previous editing operation or recovering before to have cancelled is to reach the security that improves GIS topological data set editor, the purpose of interaction and work efficiency.
In order to achieve the above object, the technical solution used in the present invention comprises:
1, a kind of method of interactively editing GIS topological data set, described topological data are concentrated and are comprised zero or a plurality of topology objects, and the type of described topology objects comprises node, segmental arc and zone; Described method realizes that on computers described topological data set is loaded and is presented on the described computing machine; The method of described interactively editing GIS topological data set may further comprise the steps:
(1.1) set up spatial index for described topological data set;
(1.2) create a task manager;
(1.3) select an edit mode, and adopt the described topological data set of described edit mode editor;
(1.4) input is ceased and desisted order to stop to edit described topological data set; Perhaps, return step (1.3) and continue the described topological data set of editor.
2, preferred, as 1 described method, wherein said edit mode comprises creation operation, and the step of described creation operation comprises:
(2.1) create a line segment;
(2.2) input one coordinate moves on to this coordinate with the starting point and the terminal point of described line segment;
(2.3) the end of input order is to finish current creation operation; Perhaps, import a coordinate, and the terminal point of described line segment is moved on to this coordinate;
(2.4), then return step (2.3) and continue if the starting point of described line segment and terminal point overlap;
(2.5) beginning one editorial services;
(2.6) upgrade described topological data set with described line segment, and generate described editorial services;
(2.7) described editorial services are added described task manager;
(2.8) starting point of described line segment is moved on to the terminal point of described line segment;
(2.9) returning step (2.2) continues.
3, preferred, as 2 described methods, wherein said step with line segment renewal topological data set comprises:
(3.1) definition one ode table;
(3.2) interrupt the crossing segmental arc that described GIS topological data is concentrated this line segment with described line segment, and the node at all intersection point places is added described ode table;
(3.3), sort from small to large by distance to described line segment starting point to the node in the described ode table;
(3.4) the described ode table of uniqueization;
(3.5) check described ode table, if described ode table is empty, then the step of further handling comprises:
(3.5.1) whether first node of the described ode table of inspection overlaps with the starting point of described line segment, if do not overlap, then creates a node at the start position of described line segment, and this node is inserted the heading of described ode table;
(3.5.2) whether last node of the described ode table of inspection overlaps with the terminal point of described line segment, if do not overlap, then creates a node in the final position of described line segment, and this node is inserted the table tail of described ode table;
(3.6) otherwise, if described ode table is not empty, then creates a node respectively, and they inserted described ode table in the starting point and the final position of described line segment;
(3.7) right for each the front and back node in the described ode table, the node that connects is wherein created a segmental arc, and the left and right regions of the described segmental arc of reconstruct.
4, preferred, as 1 described method, wherein said edit mode also comprises mobile topology objects, and the step of described mobile topology objects comprises:
(4.1) direction and the distance of input one vector to represent to move;
(4.2) described topology objects are moved a segment distance along described vector direction, the length of this segment distance equates with described vector length;
(4.3) carry out topology and check, if the left and right regions of the related segmental arc of described topology objects with move preceding differently or topological mistake occurred, then described target is returned to the original position, and termination;
(4.4) beginning one editorial services;
(4.5) will be saved in described editorial services about the data of description that the renewal of described topology objects is operated;
(4.6) described editorial services are added described task manager.
5, preferred, as 2 described methods, the method of wherein said generation editorial services is: arrive after described editorial services begin before the end, there are topology objects to be updated if described topological data is concentrated, then will be saved in described editorial services about the data of description that the renewal of described topology objects is operated.
6, preferred, as 4 or 5 described methods, the wherein said method that will be saved in editorial services about the data of description that the renewal of topology objects is operated comprises:
(6.1) create a update event, described update event comprises an object type sign, an object ID, a renewal action type sign and a structure that is used to preserve service data;
(6.2) fill described update event according to type, ID and the renewal action type of described topology objects;
(6.3) described update event is joined in the described editorial services.
7, preferred, as 1 described method, wherein said edit mode also comprises cancels operation, and the described method of operating of cancelling comprises:
(7.1) from wherein said task manager, obtain previous editorial services;
(7.2) if described editorial services exist, then the step of further handling comprises:
(7.2.1) the current insertion position with described task manager moves forward one;
(7.2.2) the described editorial services of rollback.
8, preferred, as 1 described method, wherein said edit methods also comprises recovery operation, and the method for described recovery operation comprises:
(8.1) from wherein said task manager, obtain back editorial services;
(8.2) if described editorial services exist, then the step of further handling comprises:
(8.2.1) move one behind the current insertion position with described task manager;
(8.2.2) the described editorial services of rollback.
9, preferred, as 7 or 8 described methods, the step of wherein said rollback editorial services comprises:
(9.1) create a counter, and its initial value is made as the incident number of described editorial services;
(9.2) update event on the value relevant position of taking-up and described counter from described editorial services;
(9.3) if described update event exists, then the step of further handling comprises:
(9.3.1) object type according to described update event identifies and object ID, concentrates from topological data and searches corresponding topology objects;
If (9.3.2) described topology objects do not exist, then create described topology objects, its type is consistent with the object type sign and the object ID of described update event with ID;
(9.3.3) the renewal action type that identifies by described update event, utilize the service data of described update event record, oppositely upgrade described topology objects, and refill described update event according to type, ID and the described reverse renewal action type of described topology objects;
(9.3.4) value with described first counter subtracts 1;
(9.3.5) returning step (9.2) continues;
(9.4) with the list of thing sorting by reversals of described editorial services.
Compared with prior art, the present invention has the following advantages:
At first, the invention provides a kind of interactively and create the method for GIS topological data set, this method is concentrated to the GIS topological data in the mode of interactively input coordinate dot generation line segment and is appended topology objects and create topological data set, overcome the defective that directly to create topological data set in the classic method by interactively input coordinate point, improve the observability of operating result, also improved the work efficiency that the GIS topological data set is created.
Secondly, the present invention also provides a kind of and has moved the method that segmental arc or node are revised the GIS topological data set by interactively, this method not only can realize the segmental arc that the GIS topological data is concentrated or the move operation of node object, simultaneously also by adding checking mechanism, before receiving the move operation result, check that earlier whether described move operation has caused the topological relation between the topology objects to change or topological mistake, has guaranteed the security of move operation.
In addition, the present invention is also by introducing transaction processing facility, realized cancelling, recovery operation, be used for when the data mode before topological data editing and processing process discovery edited result is not inconsistent with expection or needs playback, cancel the editing operation that previous editing operation or recovery had before been cancelled, improved security, interactivity and the work efficiency of GIS topological data set editing process.
At last, the present invention is when realize creating the cancelling of GIS topological data set operation, restoration methods, with the input line segment renewal unit of being treated to that described GIS topological data set carries out is generated editorial services, and as the unit response user cancel, recover order, further improved security, the interactivity of editing process.
Description of drawings
Fig. 1 shows a GIS topological data set graphic example of embodiments of the invention;
Fig. 2 shows GIS topological data set storage organization shown in Figure 1;
Fig. 3 shows according to the uml model that is used to realize the GIS topological data set in the embodiments of the invention;
Fig. 4 shows the uml model that is used to realize the editorial services manager in the embodiments of the invention;
Fig. 5 shows the method flow of interactively editing GIS topological data set according to an embodiment of the invention;
Fig. 6 shows and is used for the method flow diagram that interactively is created the GIS topological data set according to an embodiment of the invention;
Fig. 7 shows the method flow diagram that upgrades the GIS topological data set according to an embodiment of the invention with line segment;
Fig. 8 shows the front and back node that utilizes according to an embodiment of the invention in the ode table to creating the process flow of new segmental arc;
Fig. 9 shows the process flow that is used for mobile topology objects according to an embodiment of the invention;
Figure 10 shows the process flow that generates editorial services according to an embodiment of the invention;
Figure 11 shows the process flow of cancelling operation according to an embodiment of the invention;
Figure 12 shows the process flow of recovery operation according to an embodiment of the invention;
Figure 13 shows the process flow of rollback editorial services according to an embodiment of the invention.
Embodiment:
Be to a preferred embodiment of the invention below, the detailed description of carrying out in conjunction with the accompanying drawings.
This preferred embodiment is realized on computers, GIS topological data set wherein need at first be created or be loaded on the computing machine, and on display, show, described GIS topological data is concentrated and is made up of zero or a plurality of topology objects, topology objects type wherein comprises three types in node, segmental arc and zone, and node is the point that segmental arc intersects or stops; Segmental arc starts from start node, stops node finally, and it is formed by connecting by zero or a plurality of point, and these points that connect into segmental arc are called node; A zone is by an outer shroud and zero or a plurality of interior closed scope of forming of encircling, and a ring is formed by connecting by one or more segmental arc.
Fig. 1 shows a GIS topological data set graphic example 100 of embodiments of the invention.This GIS topological data set comprises 5 nodes, and they are N01, N02, N03, N04 and N05; Article 6, segmental arc, i.e. A01, A02, A03, A04, A05 and A06; 3 zone: R01, R02 and R03; V01~V11 is for forming the node of segmental arc among the figure.
Personnel for the ease of association area further understand the topological data set of GIS described in the present invention, and Fig. 2 shows GIS topological data set storage organization 200 shown in Figure 1.Comprise ode table 201, region list 202 and segmental arc table 203.Node of each line display in the ode table 201, ID is the unique identification of this node in this table; The value of segmental arc attribute is the ID of the segmental arc related with this node, and a node can have one or many related segmental arcs, wherein represents clearing end on the occasion of expression initiating terminal, negative value; The coordinate of this node of value representation of coordinate attributes, first is the x coordinate, second is the y coordinate.Segmental arc of each line display in the segmental arc table, ID is the unique identification of this segmental arc in the table; Start node, termination node property value are the node sign corresponding with ode table ID attribute; Zone, a left side, right area attribute value are and the corresponding area identification of region list ID attribute that null value wherein represents that corresponding zone does not exist; Node attribute values is the node sequence of this segmental arc, and null value wherein represents that corresponding segmental arc does not have node.Zone of each line display in the region list, the ID in the table is this regional unique identification; The segmental arc property value represents to surround this regional segmental arc tabulation, this segmental arc tabulation can be divided into many groups, ring of each group expression, form by one or more segmental arc ID, wherein the negative sign before the segmental arc ID is represented this segmental arc oppositely, and first in these rings is outer shroud, and other is interior ring, outer shroud is a counter-clockwise direction, and interior ring is a clockwise direction.
The details of core content of the present invention for convenience of description, below about mainly having adopted OO thought and class C++ grammer in the description of embodiments of the invention.Under the prerequisite that does not influence this paper core content, for making things convenient for code reading, the data structure that adopts in the following code is without optimization, and high-efficient algorithm can be used other data structure more efficiently in realizing.
Personnel for the ease of association area more clearly understand the topological data set of GIS described in the present invention, and Fig. 3 shows according to the uml model 300 that is used to realize the GIS topological data set in the embodiments of the invention.This specification of a model the data structure of GIS topological data set according to an embodiment of the invention.Topology objects classes such as node CNode class 305, segmental arc CEdge class 306 and zone C area class 307 in this model are all inherited from same base class---CTopoObject class 303, described CTopoObject class 303 has two attributes, that is: object ID and maximum outsourcing rectangle (mbr), wherein object ID is used for each topology objects of unique identification, the spatial dimension that maximum outsourcing rectangle MBR type 313 adopts four values in upper and lower, left and right to come the approximate description topology objects; CEdgeItem class 301 is used to describe the direction or the node type of segmental arc, its DIRECTION type 312 data member direction describe the direction of its member's segmental arc edge, and its value positive represents that segmental arc forward or start node, inverse represent that segmental arc oppositely or stop node; Node class CNode class 305 has also been inherited the attribute of coordinate points CPoint class 304: x coordinate and y coordinate, be used to preserve the position of node, in addition, node class CNode class 305 also comprises one or more CEdgeItem class 301 examples, being used to preserve with this node is start node or the information that stops the segmental arc of node, and CEdgeItem class 301 examples of each node sort from small to large by itself and the link line segment of described node and the angle of x axle forward; Segmental arc class CEdge class 306 has from, to, right and four data members of left, be respectively the start node that points to segmental arc, the pointer that stops node, right zone and zone, a left side, in addition, segmental arc class CEdge class 306 also comprises zero or a plurality of CPoint class 304 examples, is used to store the sequence node in this segmental arc path; Lopps CRing class 302 comprises one or more CEdgeItem class 301 examples, and the segmental arc of these CEdgeItem class 301 examples is linked in sequence and forms the ring of a closure; CArea class 307 comprises one or more lopps CRing class 302 examples, and first in these lopps examples is outer shroud, and other is interior ring, and outer shroud is a counter-clockwise direction, and interior ring is a clockwise direction.
GIS topological data set class CTopoSet class 311 comprises set of node CNodeSet class 308, segmental arc collection CEdgeSet class 309 and set of regions CAreaSet class 310 examples, be used for management node, segmental arc or section object respectively, topology objects pointer is wherein complied with its referent ID series arrangement from small to large, so that can adopt the binary chop algorithm to obtain pointer to object fast according to object ID when needed.Set of node CNodeSet class 308, segmental arc collection CEdgeSet class 309 and set of regions CAreaSet class 310 all comprise spatial index CSpatialIndex class 314 examples.CSpatialIndex class 314 is classes that are used for node, segmental arc or section object are carried out spatial index, it can be according to the space distribution of the maximum outsourcing rectangle of node, segmental arc or section object, press the pointer that certain way reorganizes topology objects, so that a large amount of topology objects beyond the particular space scope is got rid of in retrieval during topology objects rapidly, significantly improve intersect with the particular space scope or the particular space scope in the retrieval rate and the efficient of topology objects.In the present invention, utilize line segment to interrupt segmental arc, check topological relation etc., all relate in a large number based on the retrieval of spatial dimension topology objects, about disposal route will be introduced in part subsequently.Specific implementation about spatial index, the technology of existing comparative maturity, the embodiment of the invention has adopted R-tree space index technology (Antonin Guttman:R-Trees:A Dynamic IndexStructure for Spatial Searching, Proceedings 1984 ACM SIGMOD InternationalConference on Management of Data, P47-57), adopt other Spatial Data Index Technology, also can realize technique effect of the present invention as quaternary tree, graticule mesh division etc.
Understand the table of editorial services described in the present invention for the ease of those skilled in the relevant art, Fig. 4 shows the uml model 400 that is used to realize the editorial services manager in the embodiments of the invention.Wherein, CArray 401 is the array class template, and its member function push is used for an array element is inserted the end of array; Insert is used for an array element is inserted its parameter of array index appointed positions; Remove is used for from the element of its parameter of array deletion index appointment; Item is used for taking out from array the pointer of its parameter index designed element, when parameter index less than 0 or return a null pointer during more than or equal to the sum of the element in the array, the expression designed element does not exist.Editorial services table class CEditTranctionList 402 and editorial services class CTranction403 are that the binding of CArray template class 401 realizes, wherein CTranction class 403 comprises one or more CEditEvent class 404 examples, be used to be kept at affairs and begin to the topology objects data update event that takes place between tailend, these event class examples are by the priority ordering that takes place.CEditTranctionList class 402 comprises one or more CTranction class 403 examples, is used to preserve editorial services; Data update event class CEditEvent 404 is used for writing down topology objects once to be upgraded for information about, its data member comprises object type sign Ob_Type, object identity ID, updating type Op_Type and service data storage organization EVENTDATA 408 member Data, wherein, object type sign Ob_Type is an Object_Type type 406, and its value and implication see Table 1; Updating type Op_Type is an Operate_Type type 405, and its value and implication see Table 2; The content of service data storage organization member Data and object type and renewal class
Table 1
The object type sign Ob_Node Ob_Edge Ob_Area
Object type Node Segmental arc The zone
Type is relevant, sees Table 2.
Table 2
The updating type sign Updating type The applicable object type Reverse updating type The content of Data
Op_New Newly-built All Op_Delete Empty
Op_Delete Deletion All Op_New Node, segmental arc, about whole ID of affiliated partners such as zone, ring
Op_Move Move Segmental arc, node Op_Move The direction, the distance that move
Op_Ch_Area The zone Segmental arc Op_Ch_Area The ID of former left and right regions
Op_Ch_Edge Segmental arc Node Op_Ch_Edge The ID table of former segmental arc table
Op_Ch_Node Node Segmental arc Op_Ch_Node The ID of former node
Op_Ch_All All All Op_Ch_All Node, segmental arc, about whole ID of affiliated partners such as zone, ring
CTranctionMgr class 402 is that present embodiment is used to realize responding the data structure of cancelling with the recovery operation order, it comprises the CEditTranctionList class 407 member TranctionList and the member variable current who is used to indicate current insertion position that are used to store editorial services, and function member such as GetPrevTranction, GetNextTranction, Insert.Wherein, member function GetPrevTranction is used for taking out from TranctionList member the previous editorial services of current insertion position, promptly visit the member function item of TranctionList, access parameter index is made as current-1, if described previous editorial services exist, then return the pointer of these editorial services, and with one of current insertion position reach, be about to current and reduce 1, otherwise, return null pointer, represent that described previous editorial services do not exist; GetNextTranction is used for taking out editorial services on the current insertion position from TranctionList, promptly visit the member function item of TranctionList, access parameter index is made as current, if described editorial services exist, then return the pointer of these editorial services, and will move one behind the current insertion position, be about to current and increase by 1, otherwise, return null pointer, represent that described editorial services do not exist; Member function Insert is used for the editorial services t that its parameter is specified and is inserted into TranctionList, and the insertion position has current to specify, after insertion is finished dealing with, with the value increase by 1 of current; The initial value of member variable current is 0.
Fig. 5 shows the method flow 500 of interactively editing GIS topological data set according to an embodiment of the invention.The CTopoSet class 311 shown in Fig. 3 is adopted in the realization of the topological data set of GIS described in the present embodiment, CTopoSet class 311 comprises set of node NodeSet316, segmental arc collection EdgeSet317 and three members of set of regions AreaSet318, is used for management node, segmental arc or section object respectively.
Need before this method begins to carry out preliminary work (step 501) earlier, comprise establishment or load described GIS topological data set, and on display, show described GIS topological data set.
In step 502, for described GIS topological data set is set up spatial index 314, so that retrieve the topology objects that intersect with the particular space scope fast or be included in the interior topology objects of particular space scope.
In step 503, create a task manager 407, the data structure of this task manager is the CTranctionMgr class 407 shown in Fig. 4, described task manager is used for managing the editorial services of described GIS topological data set editing process, when being used for the data mode before discovery edited result and expection are not inconsistent or need playback, the response user cancels or recovery operation.
In step 504, select the described GIS topological data set of an edit mode editor.The system of selection of described edit mode can be adopted the keyboard mapping, also can pass through menu or tool button order, and perhaps other similar approach realizes.For example:, then carry out creation operation if the user supresses keyboard A key; If the user supresses keyboard M key, then carry out move operation; If the user supresses keyboard D key, then carry out deletion action; If the user supresses keyboard F5 key, then carry out and cancel operation; If the user supresses keyboard F6 key, then carry out recovery operation etc.
In step 505, if stop editor's (step 506) described GIS topological data set, then input stops edit commands; Otherwise, return step 504 and continue editor.
Fig. 6 shows and is used for the method flow diagram 600 that interactively is created the GIS topological data set according to an embodiment of the invention.This method is concentrated to the GIS topological data by the mode of interactively input coordinate dot generation line segment and is appended topology objects, and with the input line segment renewal unit of being treated to that described GIS topological data set carries out is generated editorial services.In this method,, create a line segment L earlier in step 601.Then, in step 602, import a coordinate, starting point and the terminal point of described line segment L moved on to this coordinate.In step 603, at first check the user command input, if the user has imported the end operational order, then finish current creation operation (step 604), return master routine; Otherwise, import a coordinate, the terminal point of described line segment L is moved on to this coordinate (step 605).In step 606, check the starting point of described line segment L and the coordinate of terminal point, if the coordinate of the starting point of described line segment L and terminal point is identical, then return step 603.Otherwise, handle according to the following steps: definition editorial services 403 (step 607) earlier; Execution in step 608 then, upgrade described GIS topological data set with described line segment L, and generate described editorial services (Figure 10); After described GIS topological data set renewal is finished, described editorial services are added task manager (step 609); Then, the starting point of described line segment L is moved on to the terminal point (step 610) of described line segment, return step 603 and continue.
Fig. 7 shows the method flow diagram 700 that upgrades the GIS topological data set according to an embodiment of the invention with line segment.
Wherein, in step 701, define an ode table earlier.
Then, in step 702, interrupt described GIS topology with described line segment and concentrate segmental arc with described line segment intersection, and the node at all intersection point places added described ode table, concrete grammar is: earlier concentrate the segmental arc that retrieves with described line segment intersection by spatial index from described GIS topology, calculate the intersection point of itself and described line segment one by one, for these intersection points, handle in two kinds of situation: (1) directly joins it described ode table for the intersection point on node; (2) for the intersection point on node not, then create a node, and will intersect segmental arc at this intersection point place with line segment L with this node and interrupt, simultaneously this new node is joined described ode table at this position of intersecting point.
In step 703,, sort from small to large by distance to described line segment starting point to the node in the described ode table.
In step 704, the described ode table of uniqueization for the node that repeats in the described ode table, only keeps one.
In step 705, check that earlier whether described ode table is empty, if described ode table is empty, then creates a node respectively in the starting point and the final position of described line segment, and they are inserted described ode table (step 707); Otherwise, continue to check whether first node of described ode table overlaps (step 706) with the starting point of described line segment, if do not overlap, then creates a node at the start position of described line segment, and this node is inserted the heading (step 708) of described ode table; Continue to check whether last node of described ode table overlaps (step 709) with the terminal point of described line segment, if do not overlap, then creates a node in the final position of described line segment, and this node is inserted the table tail (step 710) of described ode table.
At last, in step 711, right for each the front and back node in the described ode table, the node that connects is wherein created a segmental arc (Fig. 8), and the left and right regions of the described segmental arc of reconstruct.When the left and right regions of the described segmental arc of reconstruct, be initial segmental arc with described segmental arc earlier, search for its left and right ring, judging whether they exist, if there is no, be the region R a that comprises described segmental arc then with its left and right regions assignment; Otherwise, destroy and to comprise described region R a, be that outer shroud is rebuild this zone with described left side ring again, simultaneously described right ring is new region Rb of outer shroud establishment, again with its left and right regions respectively assignment be region R a, Rb; About being initial segmental arc, search for the method for its left and right ring, existing ripe algorithm (Qi Hua: set up the optimization and the improvement of polygon topological relation algorithm steps automatically, mapping journal, the 26th the 3rd phase of volume, 1997.08) with described segmental arc.
Fig. 8 shows the process flow 800 of front and back node to creating new segmental arc of utilizing according to an embodiment of the invention in the ode table.This disposal route starts from step 801, and the node sum of described ode table is saved in variable S, and initialization current node numbering I is 0; Then, from described ode table, take out I node N i, an I+1 node N I+1(step 802); Link node N then i, N I+1Create a new segmental arc (step 803), current node being numbered I increases by 1 again, promptly establishes I=I+1 (step 804), returns step 802 again, and so circulation is returned master routine (step 805) up to as I during more than or equal to S.
Fig. 9 shows the process flow 900 that is used for mobile topology objects according to an embodiment of the invention.This method need be carried out topology earlier and checked before mobile topology objects, guaranteeing not change after described topology objects move the topological relation between the topology objects, and guarantee that topological data concentrates the correctness of topological relation.In this disposal route, two coordinates of input are to create two vectorial P earlier 1And P 2(step 901 and step 902) generates motion vector M, wherein M=P 2-P 1(step 903) is with direction and the distance of representing to move; Then, in step 904, with direction translation one distance, d along motion vector M of described topology objects, the length of this segment distance equals the length of described motion vector, i.e. d=|M|; Then, carry out topology and check (step 905), in checking process, if find described topology objects related segmental arc left and right regions with move before different or topological mistake occurred, then described topology objects are returned to original position (step 906), forward step 910 then to and return master routine; Otherwise, proceed following processing: at first, create editorial services 403 (step 907); Then, in step 908, will be saved in described editorial services 1011 about the data of description that the renewal of described topology objects is operated; At last, described editorial services are added task manager (step 909).Topological mistake described here comprises that there is self intersection or crossing with other segmental arc in the segmental arc related with described topology objects.
Figure 10 shows the process flow 1000 that generates editorial services according to an embodiment of the invention.This processing was carried out before finishing 1003 after affairs begin 1001, before topology objects need upgrade 1008, to be saved in described editorial services 1011 about the data of description that the renewal of described topology objects is operated earlier, its method is: send upgating object message 1007 to incident generation module 1002 earlier, the incident generation module is after receiving message, create a update event 404 (step 1004), follow object type according to described topology objects, object ID and renewal action type are filled described update event (step 1005), the content that described update event is filled sees Fig. 4 for details, table 1 and table 2, after described update event filling is finished, again this update event is joined in the described editorial services (step 1006), afterwards, return update event and finish message 1010, upgrade processing 1009 and proceed.
Figure 11 shows the process flow 1100 of cancelling operation according to an embodiment of the invention.This method is used for cancelling the previous editorial services of the current insertion position of task manager.Wherein, in step 1101, from described task manager, obtain earlier the previous editorial services of current insertion position.Then, in step 1102, judge whether described editorial services exist.If described editorial services do not exist, then forward step 1105 to, directly return master routine; Otherwise,, then continue step 1103,1104 if described editorial services exist.In step 1103, with one of the current insertion position reach of described task manager.In step 1104, the described editorial services of rollback.The method that relates in this method sees Fig. 4 and associated description for details.
Figure 12 shows the process flow 1200 of recovery operation according to an embodiment of the invention.This method is used for recovering back editorial services of task manager, the editorial services on the promptly current insertion position.Wherein, in step 1201, from described task manager, obtain the editorial services on the current insertion position.Then, in step 1202, judge whether described editorial services exist.If described editorial services do not exist, then forward step 1205 to, directly return master routine; Otherwise,, then continue step 1203,1204 if described editorial services exist.In step 1203, move one behind the current insertion position with described task manager.In step 1204, the described editorial services of rollback.The method that relates in this method sees Fig. 4 and associated description for details.
Figure 13 shows the process flow 1300 of rollback editorial services according to an embodiment of the invention.Wherein,, create a counter, and its initial value is made as the incident number of described editorial services in step 1301.Then, in step 1302, the update event from described editorial services on the value relevant position of taking-up and described counter.Then, in step 1303, check earlier whether described update event exists, and if there is no, then directly goes to step 1309; Otherwise, object type according to described update event identifies and object ID earlier, from the concentrated corresponding topology objects (step 1304) of searching of topological data, check then whether described topology objects exist (step 1305), if describedly do not exist, then create described topology objects, and its type and object type sign and the object ID consistent (step 1306) of ID with described update event are set.In step 1307, renewal action type by described update event sign, utilize the service data of described update event record, oppositely upgrade described topology objects, and refill described update event according to type, ID and the described reverse updating type of described topology objects.Each reverse renewal operation of upgrading action type sees Table 2 reverse updating type.
Then, in step 1308,, return step 1302 then and continue the value minimizing 1 of described first counter.In step 1309, elder generation is reverse with the ordering of the list of thing of described editorial services, returns master routine then.The method that relates in this method sees Fig. 4 and associated description for details.
Above to detailed introduction of the present invention in, used specific case principle of the present invention and embodiment set forth, the explanation of above embodiment just is used for help understanding method of the present invention and core concept thereof.Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (9)

1, a kind of method of interactively editing GIS topological data set, described topological data are concentrated and are comprised zero or a plurality of topology objects, and the type of described topology objects comprises node, segmental arc and zone; Described method realizes that on computers described topological data set is loaded and is presented on the described computing machine; The method of described interactively editing GIS topological data set is characterized in that, it may further comprise the steps:
(1.1) set up spatial index for described topological data set;
(1.2) create a task manager;
(1.3) select an edit mode, and adopt the described topological data set of described edit mode editor;
(1.4) input is ceased and desisted order to stop to edit described topological data set; Perhaps, return step (1.3) and continue the described topological data set of editor.
2, the method for claim 1 is characterized in that, wherein said edit mode comprises creation operation, and the step of described creation operation comprises:
(2.1) create a line segment;
(2.2) input one coordinate moves on to this coordinate with the starting point and the terminal point of described line segment;
(2.3) the end of input order is to finish current creation operation; Perhaps, import a coordinate, and the terminal point of described line segment is moved on to this coordinate;
(2.4), then return step (2.3) and continue if the starting point of described line segment and terminal point overlap;
(2.5) beginning one editorial services;
(2.6) upgrade described topological data set with described line segment, and generate described editorial services;
(2.7) described editorial services are added described task manager;
(2.8) starting point of described line segment is moved on to the terminal point of described line segment;
(2.9) returning step (2.2) continues.
3, method as claimed in claim 2 is characterized in that, wherein said step with line segment renewal topological data set comprises:
(3.1) definition one ode table;
(3.2) interrupt the crossing segmental arc that described GIS topological data is concentrated this line segment with described line segment, and the node at all intersection point places is added described ode table;
(3.3), sort from small to large by distance to described line segment starting point to the node in the described ode table;
(3.4) the described ode table of uniqueization;
(3.5) check described ode table, if described ode table is empty, then the step of further handling comprises:
(3.5.1) whether first node of the described ode table of inspection overlaps with the starting point of described line segment, if do not overlap, then creates a node at the start position of described line segment, and this node is inserted the heading of described ode table;
(3.5.2) whether last node of the described ode table of inspection overlaps with the terminal point of described line segment, if do not overlap, then creates a node in the final position of described line segment, and this node is inserted the table tail of described ode table;
(3.6) otherwise, if described ode table is not empty, then creates a node respectively, and they inserted described ode table in the starting point and the final position of described line segment;
(3.7) right for each the front and back node in the described ode table, the node that connects is wherein created a segmental arc, and the left and right regions of the described segmental arc of reconstruct.
4, the method for claim 1 is characterized in that, wherein said edit mode also comprises mobile topology objects, and the step of described mobile topology objects comprises:
(4.1) direction and the distance of input one vector to represent to move;
(4.2) described topology objects are moved a segment distance along described vector direction, the length of this segment distance equates with described vector length;
(4.3) carry out topology and check, if the left and right regions of the related segmental arc of described topology objects with move preceding differently or topological mistake occurred, then described target is returned to the original position, and termination;
(4.4) beginning one editorial services;
(4.5) will be saved in described editorial services about the data of description that the renewal of described topology objects is operated;
(4.6) described editorial services are added described task manager.
5, method as claimed in claim 2, it is characterized in that, the method of wherein said generation editorial services is: arrive after described editorial services begin before the end, there are topology objects to be updated if described topological data is concentrated, then will be saved in described editorial services about the data of description that the renewal of described topology objects is operated.
As claim 4 or 5 described methods, it is characterized in that 6, the wherein said method that will be saved in editorial services about the data of description that the renewal of topology objects is operated comprises:
(6.1) create a update event, described update event comprises an object type sign, an object ID, a renewal action type sign and a structure that is used to preserve service data;
(6.2) fill described update event according to type, ID and the renewal action type of described topology objects;
(6.3) described update event is joined in the described editorial services.
7, the method for claim 1 is characterized in that, wherein said edit mode also comprises cancels operation, and the described method of operating of cancelling comprises:
(7.1) from wherein said task manager, obtain previous editorial services;
(7.2) if described editorial services exist, then the step of further handling comprises:
(7.2.1) the current insertion position with described task manager moves forward one;
(7.2.2) the described editorial services of rollback.
8, the method for claim 1 is characterized in that, wherein said edit methods also comprises recovery operation, and the method for described recovery operation comprises:
(8.1) from wherein said task manager, obtain back editorial services;
(8.2) if described editorial services exist, then the step of further handling comprises:
(8.2.1) move one behind the current insertion position with described task manager;
(8.2.2) the described editorial services of rollback.
9, as claim 7 or 8 described methods, it is characterized in that the step of wherein said rollback editorial services comprises:
(9.1) create a counter, and its initial value is made as the incident number of described editorial services;
(9.2) update event on the value relevant position of taking-up and described counter from described editorial services;
(9.3) if described update event exists, then the step of further handling comprises:
(9.3.1) object type according to described update event identifies and object ID, concentrates from topological data and searches corresponding topology objects;
If (9.3.2) described topology objects do not exist, then create described topology objects, its type is consistent with the object type sign and the object ID of described update event with ID;
(9.3.3) the renewal action type that identifies by described update event, utilize the service data of described update event record, oppositely upgrade described topology objects, and refill described update event according to type, ID and the described reverse renewal action type of described topology objects;
(9.3.4) value with described first counter subtracts 1;
(9.3.5) returning step (9.2) continues;
(9.4) ordering of the list of thing of described editorial services is reverse.
CN2008101430514A 2008-10-06 2008-10-06 Method for interactively editing GIS topological data set Expired - Fee Related CN101359337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101430514A CN101359337B (en) 2008-10-06 2008-10-06 Method for interactively editing GIS topological data set

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101430514A CN101359337B (en) 2008-10-06 2008-10-06 Method for interactively editing GIS topological data set

Publications (2)

Publication Number Publication Date
CN101359337A true CN101359337A (en) 2009-02-04
CN101359337B CN101359337B (en) 2012-10-31

Family

ID=40331787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101430514A Expired - Fee Related CN101359337B (en) 2008-10-06 2008-10-06 Method for interactively editing GIS topological data set

Country Status (1)

Country Link
CN (1) CN101359337B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819581A (en) * 2012-07-26 2012-12-12 中南大学 Method for generating polygonal chain with concentrated topology of geographic information system
CN105391637A (en) * 2014-08-27 2016-03-09 美国频顺通讯科技公司 policy-based intelligent ad-hoc network architecture
WO2016095216A1 (en) * 2014-12-19 2016-06-23 Microsoft Technology Licensing, Llc. Graph processing in database
CN110110019A (en) * 2018-01-31 2019-08-09 北京四维图新科技股份有限公司 A kind of method and device that road network topological data updates

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69939281D1 (en) * 1999-03-23 2008-09-18 Sony Deutschland Gmbh System and method for automatically managing geolocation information
CN1237468C (en) * 2002-10-10 2006-01-18 中国地质调查局发展研究中心 Method for filling digit on map utilized in regional geological survey

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819581A (en) * 2012-07-26 2012-12-12 中南大学 Method for generating polygonal chain with concentrated topology of geographic information system
CN102819581B (en) * 2012-07-26 2014-07-02 中南大学 Method for generating polygonal chain with concentrated topology of geographic information system
CN105391637A (en) * 2014-08-27 2016-03-09 美国频顺通讯科技公司 policy-based intelligent ad-hoc network architecture
CN105391637B (en) * 2014-08-27 2020-06-05 美国频顺通讯科技公司 Method for communication, network node and computer-readable storage medium
WO2016095216A1 (en) * 2014-12-19 2016-06-23 Microsoft Technology Licensing, Llc. Graph processing in database
US9870393B2 (en) 2014-12-19 2018-01-16 Microsoft Technology Licensing, Llc Graph processing in database
US10769142B2 (en) 2014-12-19 2020-09-08 Microsoft Technology Licensing, Llc Graph processing in database
CN110110019A (en) * 2018-01-31 2019-08-09 北京四维图新科技股份有限公司 A kind of method and device that road network topological data updates
CN110110019B (en) * 2018-01-31 2021-10-29 北京四维图新科技股份有限公司 Road network topology data updating method and device

Also Published As

Publication number Publication date
CN101359337B (en) 2012-10-31

Similar Documents

Publication Publication Date Title
US20200356225A1 (en) Data Preparation User Interface with Conglomerate Heterogeneous Process Flow Elements
CN104123374B (en) The method and device of aggregate query in distributed data base
US8438534B2 (en) Transformation of data between hierarchical data formats
CN107451220A (en) A kind of distributed NewSQL Database Systems
CN103559323B (en) Database implementation method
CN109977162A (en) A kind of urban and rural planning data transfer device, system and computer readable storage medium
US20110161371A1 (en) Sql generation
US20110161946A1 (en) Batch data processing
US8140894B2 (en) Transaction regions in graphical computer-implemented methods of processing data
CN104317928A (en) Service ETL (extraction-transformation-loading) method and service ETL system both based on distributed database
CN103377289A (en) Unified table query processing
CN112199086A (en) Automatic programming control system, method, device, electronic device and storage medium
CN110019287B (en) Method and device for executing Structured Query Language (SQL) instruction
CN102054217B (en) Entity morphing in metamodel-based tools
CN101727322A (en) Method and device for optimizing bill of material management interface
CN100517222C (en) Model conversion frame supporting separation of conversion engine and mapping rule and the method
CN110597821B (en) Method and device for changing database table structure
US11893026B2 (en) Advanced multiprovider optimization
CN101359337B (en) Method for interactively editing GIS topological data set
CN103019691A (en) Transformation method for extract, transform and load (ETL) operation relation graph and implementation system thereof
KR101253335B1 (en) Method for constructing database based on warehouse and database system therof
CN105335143A (en) Business processing method and apparatus
Burgueño et al. On the concurrent execution of model transformations with linda
CN105975489A (en) Metadata-based online SQL code completion method
CN110889013B (en) Data association method, device, server and storage medium based on XML

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121031

Termination date: 20151006

EXPY Termination of patent right or utility model