Cooperative editing method and system of planar geographic elements and associated linear center lines

CN122597584APending Publication Date: 2026-08-18WUDA GEOINFORMATICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611052363.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004](1)操作繁琐,效率低下:每次面要素编辑后,操作人员需要手动切换图层、定位对应中心线并重新描绘,大量重复性操作(据实际项目作业统计)占据了数据生产总时间的30%以上;

Benefits of technology

[0044]This invention provides a collaborative editing method and system for polygonal geographic features and associated linear centerlines. When polygonal features are edited, the system automatically identifies the associated line features through the same coding field and automatically derives the centerline, reducing the time for a single collaborative editing operation from several minutes in the traditional two-layer manual process to seconds, significantly improving operational efficiency in large-scale data production scenarios. The atomic undo encapsulation scheme for polygonal feature geometric updates and line feature geometric updates ensures that the two are strictly synchronized during undo/redo. No matter how many steps the operator undoes, the geometric state of the polygonal features and the centerline always remains topologically consistent, eliminating the data inconsistency risk of "polygons have been rolled back but centerlines have not" in traditional solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597584A_ABST
    Figure CN122597584A_ABST
Patent Text Reader

Abstract

The application provides a planar geographic element and associated linear center line collaborative editing method and system. When the planar element is edited, the linear element associated with the planar element is automatically recognized through the same coding field, and the center line is automatically derived. The single collaborative editing operation time is shortened from several minutes of the traditional double-layer manual process to seconds of automatic completion, and the operation efficiency is greatly improved in the mass data production scene. The atomic undo packaging scheme of the planar element geometry update and the linear element geometry update ensures that the planar element and the center line are strictly synchronized during the undo / redone operation. No matter how many steps the operator undoes, the geometric state of the planar element and the center line always maintains topological consistency, eliminating the data inconsistency risk of "the planar element has been rolled back and the center line has not been rolled back" in the traditional scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information system (GIS) data production technology, and more specifically, to a method and system for collaborative editing of areal geographic features and associated linear centerlines. Background Technology

[0002] In the process of producing Geographic Information System (GIS) data, linear geographic entities such as roads, rivers, and green belts typically exist in the database simultaneously in two forms: one is a polygonal feature describing the entity's area (such as a road surface), and the other is a linear centerline feature describing the entity's orientation (such as a road centerline). The geometry of these two features should maintain strict topological consistency—that is, the centerline must always be located at the geometric center of the corresponding polygon.

[0003] In actual production operations, when it is necessary to edit the boundary nodes of a road surface feature (e.g., moving nodes due to road widening), operators must: ① first edit the nodes of the road surface feature; ② then switch to the centerline layer and manually update the geometry of the corresponding centerline; ③ ensure that the two are topologically consistent. This dual-operation process has the following prominent problems:

[0004] (1) Cumbersome operation and low efficiency: After each surface feature is edited, the operator needs to manually switch layers, locate the corresponding center line and redraw it. A large number of repetitive operations (according to statistics of actual project operations) account for more than 30% of the total data production time.

[0005] (2) Consistency is difficult to guarantee: Manual redrawing of the center line is subject to human error, making it difficult to guarantee that the center line is always accurately located at the geometric center of the surface feature, resulting in a high topology error rate;

[0006] (3) Risk of omission: After batch editing multiple face features, operators may miss the synchronous update of some center lines, resulting in data inconsistency. Summary of the Invention

[0007] This invention addresses the technical problems existing in the prior art by providing a collaborative editing method and system for areal geographic features and associated linear centerlines.

[0008] According to a first aspect of the present invention, a method for collaborative editing of areal geographic features and associated linear centerlines is provided, comprising:

[0009] Step 1: In response to the user's node editing operation on the target surface feature in the map view, obtain the first geometric data of the target surface feature after editing;

[0010] Step 2: Based on the preset same entity identifier field, filter out the associated line features that carry the same entity identifier code as the target polygon feature from at least one line layer of the map view;

[0011] Step 3: Based on the first geometric data, automatically deduce the centerline geometry of the target surface feature to obtain the second geometric data, and update the geometry of the associated line feature based on the second geometric data;

[0012] Step 4: Encapsulate the geometric change operation of the target polygon feature and the geometric change operation of the associated line feature into a single composite undo operation unit and submit it to the undo stack of the map context, so that the geometric state of the target polygon feature and the associated line feature is strictly synchronized when undoing or re-editing.

[0013] Based on the above technical solution, the present invention can also be improved as follows.

[0014] Optionally, the node editing operation in step 1 includes one of node movement, node addition, or node deletion; step 1, in response to the user's node editing operation on the target polygon feature in the map view, obtains the first geometric data of the target polygon feature after editing, including:

[0015] When the node editing operation is node movement, in response to the user pressing the mouse within the tolerance range of the target node of the target surface feature, the system enters the aiming state; when the mouse movement distance exceeds the preset drag judgment threshold, the system enters the dragging state and updates the coordinates of the target node in real time; when the mouse is released and the system is in the dragging state, the system submits geometric changes and obtains the first geometric data of the target surface feature after editing based on the updated coordinates of the target node.

[0016] When the node editing operation is to add a node, in response to the user pressing the mouse near the boundary of the target surface feature, the system searches for the projection point closest to the click position and the corresponding target edge in the edge set of the target surface feature, inserts a new node at the projection point, and immediately enters a draggable preview state so that the user can adjust the position of the new node before releasing the mouse. Based on the position coordinates of the new node, the system obtains the first geometric data of the target surface feature after editing.

[0017] When the node editing operation is node deletion, in response to the user pressing and releasing the mouse within the tolerance range of the target node, a topology constraint check is performed to verify whether the boundary ring of the target surface feature still retains at least three non-repeating nodes after the target node is deleted. If the condition is not met, the deletion operation is rejected and a prompt is displayed. If the condition is met, the deletion is performed and geometric changes are submitted.

[0018] Optionally, step 2, based on a preset same entity identifier field, filters out associated line features from at least one line layer of the map view that carry the same entity identifier code as the target polygon feature, including:

[0019] Read the entity identifier code value from the entity identifier field of the target surface feature;

[0020] A buffer zone with a preset spatial neighborhood range is constructed, centered on the geometry of the target surface features before editing;

[0021] Traverse all line layers in the current map view, find line features in the buffer of the target polygon feature that match the entity identifier code value of the target polygon feature, filter to obtain the associated line features of the target polygon feature, and construct a set of associated line features.

[0022] If there is only one associated line element in the associated line element set, then the associated line element is used as the target line element and recorded in the historical mapping cache.

[0023] Optionally, if the set of associated line features includes multiple associated line features, it also includes:

[0024] If the cached line element in the historical mapping cache exists in the current round of the association line element set, the cached line element is directly reused as the target association line element.

[0025] If the historical mapping cache does not exist or has expired, a candidate selection dialog box will pop up, and the user will select the target relational line element for this editing from the relational line element set, and the target relational line element will be recorded in the historical mapping cache.

[0026] Optionally, step 3, based on the first geometric data, automatically derives the centerline geometry of the target surface feature to obtain the second geometric data, including:

[0027] The polygon geometry of the target polygon feature after editing is normalized, and then the polygon skeleton line extraction algorithm is called to calculate the centerline geometry inside the polygon in a deterministic manner, and normalization is performed to obtain the final centerline geometry.

[0028] Optionally, the invocation of the polygon skeleton line extraction algorithm to deterministically calculate the centerline geometry inside the polygon includes:

[0029] Obtain the area and perimeter of the polygon geometry of the target surface feature, and calculate the feature half-width estimate based on the area and perimeter. The feature half-width estimate is used to control the boundary sampling step size and the pruning judgment threshold.

[0030] Uniform sampling is performed along the boundary of the polygon with the estimated feature half-width as the step size;

[0031] Construct a constrained Delaunay triangulation using the sampling point sequence as constraint edges;

[0032] Extract the Voronoi diagram from the dual structure of the constrained Delaunay triangulation, retaining only the Voronoi edges that are completely inside the polygon.

[0033] The retained Voronoi edges are organized into a topological graph, and pruning is performed on the topological graph based on the pruning judgment threshold.

[0034] The suspended endpoint of the pruned centerline segment is extended toward the boundary of the polygonal surface, and the centerline geometry is obtained after smoothing and simplification.

[0035] Optionally, pruning is performed on the topology graph, including:

[0036] For the dangling edge connected to the endpoint node with a degree of 1 in the topology graph, if the length of the dangling edge is shorter than the pruning judgment threshold, it shall be deleted;

[0037] For a branch node with a degree of 3 in the topology graph, if the two edges connected to the branch node are each dangling short edges, and the ratio of the distance from the third edge to the polygon boundary to the length of the two dangling short edges exceeds a preset threshold, the two dangling short edges are deleted.

[0038] Optionally, the surface element is a road surface or a river surface, and the centerline geometry is a road centerline or a river centerline.

[0039] According to a second aspect of the present invention, a collaborative editing system for areal geographic features and associated linear centerlines is provided, comprising:

[0040] The acquisition module is used to acquire the first geometric data of the target surface feature after editing in response to the user's node editing operation on the target surface feature in the map view;

[0041] The filtering module is used to filter out associated line features that carry the same entity identifier code as the target polygon feature from at least one line layer of the map view based on a preset same entity identifier field.

[0042] The derivation module is used to automatically derive the centerline geometry of the target surface feature based on the first geometric data, obtain the second geometric data, and update the geometry of the associated line feature based on the second geometric data;

[0043] The submission module is used to encapsulate the geometric change operation of the target polygon feature and the geometric change operation of the associated line feature into a single composite undo operation unit and submit it to the undo stack of the map context, so that the geometric state of the target polygon feature and the associated line feature is strictly synchronized when undoing or re-editing.

[0044] This invention provides a collaborative editing method and system for polygonal geographic features and associated linear centerlines. When polygonal features are edited, the system automatically identifies the associated line features through the same coding field and automatically derives the centerline, reducing the time for a single collaborative editing operation from several minutes in the traditional two-layer manual process to seconds, significantly improving operational efficiency in large-scale data production scenarios. The atomic undo encapsulation scheme for polygonal feature geometric updates and line feature geometric updates ensures that the two are strictly synchronized during undo / redo. No matter how many steps the operator undoes, the geometric state of the polygonal features and the centerline always remains topologically consistent, eliminating the data inconsistency risk of "polygons have been rolled back but centerlines have not" in traditional solutions. Attached Figure Description

[0045] Figure 1 A flowchart illustrating a collaborative editing method for areal geographic features and associated linear centerlines, provided in one embodiment of the present invention;

[0046] Figure 2-1 This is a schematic diagram of node movement operations according to an embodiment of the present invention;

[0047] Figure 2-2 A schematic diagram illustrating the operation of adding nodes in an embodiment of the present invention;

[0048] Figure 2-3 This is a schematic diagram of a node deletion operation according to an embodiment of the present invention;

[0049] Figure 3 This is a flowchart illustrating the automatic filtering process of the associated line elements of the target surface elements in an embodiment of the present invention.

[0050] Figure 4 This is a flowchart illustrating the polygon skeleton line extraction algorithm for extracting the centerline geometry inside a polygon in an embodiment of the present invention.

[0051] Figure 5 This is a flowchart illustrating the atomic undo operation for geometric modification of surface features and geometric modification of line features according to an embodiment of the present invention.

[0052] Figure 6 This is a structural block diagram of a collaborative editing system for areal geographic features and associated linear centerlines, according to an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined with each other to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0054] Existing collaborative editing schemes for areal geographic features and associated linear centerlines have the following drawbacks:

[0055] Disadvantage 1: Identification of associated features relies on manual intervention. Existing GIS editing tools require operators to manually determine which centerline corresponds to the currently edited polygon feature. In large-scale projects with many layers, manual identification is prone to errors and is significantly time-consuming. This results in low data production efficiency, and the association error rate increases linearly with layer complexity.

[0056] Disadvantage 2: The quality of centerline redrawing depends on manual skill. When manually drawing centerlines, whether the centerline is exactly at the geometric center of the surface depends entirely on the operator's drawing accuracy, which cannot be quantified and guaranteed. This leads to a systematic error of the centerline offset from the surface center, which is common in large batches of data and affects the accuracy of subsequent analysis.

[0057] Disadvantage 3: Facet-line changes cannot be atomically rolled back. In existing tools, facet changes and centerline changes are two independent editing operations, each entering the undo stack. When a user performs an undo, they can only roll back one by one, easily resulting in a "partial undo" state where faces have been rolled back but centerlines haven't, causing inconsistencies in the new data. This forces operators to manually align the undo steps, increasing cognitive burden and the risk of errors.

[0058] Disadvantage 4: Repeated selection of candidate center lines disrupts the operation rhythm. When a face feature has multiple candidate center lines (such as an intersection area), a selection box needs to pop up after each node edit, frequently interrupting the operation rhythm and seriously affecting the efficiency of batch editing.

[0059] In view of the numerous shortcomings in the prior art, the main objectives of this invention include the following aspects:

[0060] (1) Automatic association and identification of the same code field: Based on the same entity identifier field (GUIDField) configured by the user, all line layers are automatically scanned to find the centerline features that carry the same identifier code as the current surface features, eliminating the cost of manual search;

[0061] (2) Automatic derivation of geometric center line: After editing the face feature node, the system automatically calculates the center line geometry (CenterLine algorithm) from the updated face polygon geometry to ensure the precise center position in a mathematical sense;

[0062] (3) Surface-line atomic undo operation: The geometric changes of surface features and centerline geometric changes are encapsulated into the same composite undo operation unit. When undoing / redoing, the two are strictly synchronized, which fundamentally eliminates the "half-undo" problem.

[0063] (4) Session-level history memory mechanism: Introducing "current face-line mapping cache", the center line selected last time is automatically reused for multiple consecutive node edits of the same face feature, and the selection dialog box is only popped up again when the candidate line set changes;

[0064] (5) Real-time preview and topology constraints: Real-time rendering of the surface geometry preview during node dragging; Before deleting a node, a topology constraint check is performed (at least 3 unique nodes are retained for a ring) to prevent invalid geometry from being generated.

[0065] Figure 1 The following is a flowchart illustrating a collaborative editing method for areal geographic features and associated linear centerlines according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0066] Step 1: In response to the user's node editing operation on the target surface feature in the map view, obtain the first geometric data of the target surface feature after editing.

[0067] Understandably, the collaborative editing method of the present invention is implemented by a collaborative editing tool (QgsMapToolGeometryCoEdit). First, when the collaborative editing tool is activated, the system first verifies whether the currently active layer is an editable polygon layer. If the geometry type of the features in the currently active layer is polygon and the currently active layer is in editing mode, it indicates that the currently active layer is an editable polygon layer.

[0068] Once the verification is successful, a dialog box will pop up to select three modes: Move, Add, and Delete, corresponding to three node editing operations. Each mode has its own independent mouse event handling logic.

[0069] When a user clicks on a target polygon feature in the current map view, the system performs precise feature picking: Using the clicked location as the center and a preset multiplier (default 5, configurable) as the tolerance radius for the current map resolution, an envelope rectangle is constructed, and a spatial intersection query is performed. Then, for each hit feature, a precise geometric judgment is performed (point containment / connection / intersection), locking the final target feature and caching its pre-edit geometry (m_ptrBeforeEditGeometry). In other words, the relationship between the clicked coordinates and the actual geometry of the feature is determined. Possible scenarios include: the point is inside the polygon (containment), the point is exactly on the polygon's boundary (connection), and the point lies on a line segment (intersection). Only features that pass these precise judgments are ultimately locked as the target feature.

[0070] See each Figure 2-1 , Figure 2-2 and Figure 2-3 The diagram illustrates the process of three node editing operations. Each node editing operation will be explained in detail below.

[0071] See Figure 2-1 For the Move operation mode, when the mouse is pressed, a nearest neighbor search is performed on the node set of the current polygon geometry with a tolerance of a preset multiple of the current map resolution (default 5 times, configurable). The node with the smallest distance to the mouse click position is the hit node, and then the "Armed" state is entered. When the mouse movement exceeds the preset drag judgment threshold (default 4 pixels Manhattan distance, configurable), it is judged as a drag operation and enters the "Dragging" state. During the dragging of the target node, the coordinates of the target node are updated in real time and the preview geometry in the screen drawing layer (semi-transparent red outline + dashed boundary) is refreshed. When the mouse is released, if the drag state is active, the coordinates of the original target node are updated and the geometric changes are submitted; otherwise, it is regarded as a click operation and the polygon feature reselection process is initiated.

[0072] See Figure 2-2For the "Add" operation mode, this mode is used to add a new vertex on an edge of a polygon feature, thereby adding an editable control point. Specifically, when the user presses the mouse on the map, the system first determines whether the click location hits another editable polygon feature. If it hits and is not the currently locked target polygon, the target is switched first, and the editable object is changed to the new polygon feature. If the click location is still within the current target polygon, the system begins processing the "Add Node" logic. In this process, all edges of the polygon geometry (line segments between adjacent nodes) are traversed, and the nearest projection point of the mouse click location is found on each edge segment. The system records the coordinates of the projection point and the corresponding edge segment number. At the nearest projection point, a new node is automatically inserted. After insertion, it immediately enters preview mode, and the new node is draggable. The user can directly drag this new node without releasing the mouse to adjust it to a more precise position. This design is very clever, avoiding the two-step operation of "inserting first and then moving". After the user adjusts the position of the new node, they release the mouse.

[0073] See Figure 2-3 For the Delete operation mode, which removes an existing node from a polygon feature, this mode is used to delete a node on the boundary of a polygon feature. After the mouse is pressed to hit a node (similar to the node movement mode), it enters the "targeted" state; when the mouse is released, a topology constraint check (canDeleteVertex) is first performed: verifying whether the current loop still retains at least 3 unique nodes after deleting the node. If the condition is not met, the deletion is rejected and a prompt is displayed; if the condition is met, the deletion is performed and the geometric changes are committed.

[0074] After editing the target surface features using three node editing operations, the first geometric data of the edited target surface features is obtained.

[0075] Step 2: Based on the preset same entity identifier field, filter out the associated line features that carry the same entity identifier code as the target polygon feature from at least one line layer of the map view.

[0076] Understandably, before submitting each edit of a polygon feature node, the system automatically performs a filtering of related line features, as follows: Figure 3 As shown:

[0077] (1) Read GUID Field configuration: Read the same entity identifier field name (such as "ENTITY_CODE") from the user configuration file. This field exists in both polygon and line layers and stores the unified identifier code of the same geographic entity.

[0078] (2) Read the GUID value (entity identification code value) of the target face feature: Read the entity identification code value (e.g., "RD_2024_001") from the corresponding field of the currently locked face feature;

[0079] (3) Construct a combined spatial and attribute query condition: Use the buffer of the preset spatial neighborhood range (default 10 meters, which can be configured according to the data precision) generated by editing the previous geometry as the spatial filter condition, and "ENTITY_CODE = 'RD_2024_001'" as the attribute filter condition to construct a composite spatial query filter.

[0080] (4) Full layer line feature scan: Traverse all line layers (polylines / lines / paths) in the current map view, check whether they contain the GUIDField field, perform a compound query on the line layers containing the field (first query the editing buffer, and last query the storage layer), collect the identifiers of the associated line features that are hit, and construct a candidate line feature set.

[0081] When there are multiple line features in the candidate line feature set, a "historical memory priority" strategy is adopted to reduce user interruptions, specifically reflected in:

[0082] (1) Check the historical cache: Check whether there is a historical mapping cache between the target surface feature and the previously selected line feature; if the line feature in the historical mapping cache still exists in the set of related line features selected in this round, the line feature in the historical mapping cache is directly reused as the target related line feature for this editing, without the need to pop up a selection box.

[0083] (2) If there is only one related line element in the set of related line elements, then the related line element shall be used as the target related line element for this editing and recorded in the historical mapping cache;

[0084] (3) If the historical mapping cache does not exist or has expired, and the set of related line elements includes multiple related line elements, a candidate selection dialog box will pop up, allowing the user to select the target related line element for this editing from the multiple related line elements, and the target related line element will be recorded in the historical mapping cache.

[0085] The historical cache expires when the user actively switches the selection set on the map (onSelectionChanged), and the cache is automatically cleared to prevent incorrect reuse across targets.

[0086] Step 3: Based on the first geometric data, automatically deduce the centerline geometry of the target surface feature to obtain the second geometric data, and update the geometry of the associated line feature based on the second geometric data.

[0087] Understandably, after editing the target surface feature, the first geometric data of the edited target surface feature is obtained. Based on the first geometric data of the edited target surface feature, the centerline geometry of the target surface feature is automatically derived to obtain the second geometric data.

[0088] See Figure 4 The centerline geometry of the edited target polygon features is automatically derived: Normalize the edited polygon geometry, then call the polygon skeleton line extraction algorithm (GsPolygon::CenterLine()) to calculate the centerline geometry inside the polygon in a deterministic manner, and Normalize the result again to obtain the final centerline geometry (buildAssociatedCenterLineGeometry).

[0089] The `GsPolygon::CenterLine()` function employs a Voronoi skeleton line extraction method based on constrained Delaunay triangulation. It combines the Voronoi diagram of the polygon boundary with graph pruning to automatically generate a centerline located on the geometric axis of the polygon. The specific steps of this algorithm are as follows:

[0090] ① Feature half-width estimation: Calculate the area A and perimeter L of the polygon, and take r = A / (2L) as the feature half-width estimate (equivalent half-width) of the polygon. Set a lower limit r ≥ L / 10000 to prevent extremely thin and long face features from causing the sampling interval to be too small. The parameter r controls both the boundary sampling step size and the subsequent pruning judgment threshold, and is an approximate measure of the local width of the polygon by the algorithm.

[0091] ② Uniform boundary sampling: Using r as the sampling step size, sampling points are uniformly interpolated along the boundaries of each ring (including the outer ring and the inner hole ring) of the polygon, preserving the boundary orientation information. After uniform sampling, a sequence of sampling points is obtained, enabling subsequent triangulation to uniformly perceive the local geometry of the polygon boundary.

[0092] ③ Constrained Delaunay Triangulation (CDT): Using the sequence of sampling points as constraint lines, constrained Delaunay triangulation is constructed for the target polygon features, "cutting" the entire polygon into closely arranged triangles. The constraint edges are aligned with the polygon boundaries to ensure that the triangulation accurately reflects the internal geometry of the polygon and prevents triangles from crossing the boundaries.

[0093] ④ Voronoi Graph Extraction and Interior Filtering: Extract the Voronoi graph edge set from the CDT dual structure; perform spatial inclusion detection on each Voronoi edge, retaining only edges that are completely inside the polygon. Each point on the Voronoi edge is equidistant from the two adjacent boundary sampling points, and their set geometrically approximates the medial axis of the polygon.

[0094] ⑤ Topology graph construction: The filtered internal Voronoi edges are organized in the form of an adjacency dictionary of "endpoint → associated edge set" to construct a lightweight topology graph that supports subsequent pruning operations based on node degree.

[0095] ⑥ Iteration degree-1 pruning (dangling branch elimination): Iteratively detect endpoint nodes with a degree of 1 (connecting only one edge) in the adjacency dictionary; delete dangling edges that meet the condition of "non-closed cycle and length less than 5 times r (number of nodes less than 11)"; after deletion, perform edge merging on the newly formed degree-2 nodes (merging two adjacent edges into one) to reduce redundant internal nodes; iterate until there are no more dangling edges that can be deleted, eliminating burrs and short branches caused by local micro-bumps at the boundary.

[0096] ⑦ Pruning of bifurcation nodes with a degree of 3: For bifurcation nodes with a degree of 3, check if there are 2 hanging short edges among the 3 edges connected to them (the opposite endpoints have a degree of 1); if the distance extended from the bifurcation node along the 3rd edge towards the polygon boundary is much greater than the length of these 2 hanging edges (length greater than the threshold of 0.25), then these 2 hanging edges are determined to be noise branches caused by local width changes and are deleted to eliminate T-shaped or Y-shaped misjudged bifurcations.

[0097] ⑧ Extend the suspended endpoints to the polygon boundary: For each segment of the retained centerline, identify the endpoints that are still suspended (degrees - 1); emit rays with the adjacent nodes as directional references, find the nearest intersection point with the polygon boundary, move the endpoint coordinates to the intersection point, so that both ends of the centerline extend to the polygon boundary, ensuring coverage of the complete surface geometry.

[0098] ⑨ Coordinate smoothing and Douglas-Peucker simplification: Take the average of the coordinates of the intermediate nodes of each centerline segment (adjacent averaging) to eliminate the small jagged edges introduced by triangulation; then execute the Douglas-Peucker polyline simplification algorithm with a tolerance of 0.1×r to remove redundant nodes and output a smooth and simplified centerline geometry.

[0099] ⑩ Result Assembly: Combine all simplified centerline segments into a MultiLineString geometric object, which serves as the final centerline geometry output for the polygon.

[0100] Based on the centerline geometry derived from the combined data of the edited target surface features, the geometry of the associated line features selected in step 2 is updated.

[0101] It should be noted that, compared with existing skeleton line extraction methods based on GIS platform tools (such as ArcGIS Thiessen Polygon tool), the CenterLine() algorithm of this invention uses constrained Delaunay triangulation to ensure boundary consistency, adaptively determines the sampling interval with A / (2L), and achieves high-quality automatic derivation of polygon centerlines without relying on any commercial platform through a two-layer strategy of "degree-1 iterative pruning + degree-3 bifurcation pruning" and dangling endpoint boundary extension. It can be directly embedded into the collaborative editing engine for real-time invocation.

[0102] Step 4: Encapsulate the geometric change operation of the target polygon feature and the geometric change operation of the associated line feature into a single composite undo operation unit and submit it to the undo stack of the map context, so that the geometric state of the target polygon feature and the associated line feature is strictly rolled back when undoing or redoing.

[0103] Understandably, see Figure 5 For geometric change operations on target polygon features and related line features, construct a composite undo operation: create a polygon feature geometric change operation (GsChangeGeometryUndoOperation, carrying a polygon feature identifier → mapping to the new polygon geometry) as the main operation; create a centerline geometric change operation (GsChangeGeometryUndoOperation, carrying a line feature identifier → mapping to the new centerline geometry); add the centerline change operation as a sub-operation to the composite undo unit (GsVectorLayerUndoOperation) of the polygon change operation;

[0104] (3) Atomic push: The composite undo unit is submitted as a whole to the undo stack of the map context (mapContext()->addUndoOperation()) to ensure that the surface geometry and centerline geometry are strictly synchronized when undoing / redoing;

[0105] (4) Session synchronization: After the undo / redo operation is completed, the session synchronization (syncSessionAfterUndoRedo) is triggered by the signal (afterUndo / afterRedo), the latest geometric state of the target face feature is reloaded from the storage layer, the node overlay display is refreshed, and the editor state is consistent with the data state.

[0106] Anomaly Handling: If the centerline geometry derivation result is empty or invalid geometry (such as skeleton line degradation caused by extremely slender polygons) based on the geometry of the new target face feature after editing, the system retains the geometric changes of the face feature and skips the centerline update. At the same time, a warning prompt is issued to the operator, who then manually confirms the face-line topology relationship. This anomaly is also included in the atomic undo stack to ensure that the face geometry state is synchronously rolled back when undoing.

[0107] See Figure 6 The present invention also provides a collaborative editing system for areal geographic features and associated linear centerlines, comprising:

[0108] The acquisition module 601 is used to acquire the first geometric data of the target surface feature after editing in response to the user's node editing operation on the target surface feature in the map view;

[0109] The filtering module 602 is used to filter out associated line features that carry the same entity identifier code as the target polygon feature from at least one line layer of the map view based on a preset same entity identifier field.

[0110] The derivation module 603 is used to automatically derive the centerline geometry of the target surface feature based on the first geometric data, obtain the second geometric data, and update the geometry of the associated line feature based on the second geometric data;

[0111] The submission module 604 is used to encapsulate the geometric change operation of the target polygon feature and the geometric change operation of the associated line feature into a single composite undo operation unit and submit it to the undo stack of the map context, so that the geometric state of the target polygon feature and the associated line feature is strictly synchronized when undoing or redoing.

[0112] It is understood that the collaborative editing system for isometric geographic features and associated linear centerlines provided by this invention corresponds to the collaborative editing methods for isometric geographic features and associated linear centerlines provided in the foregoing embodiments. The relevant technical features of the collaborative editing system for isometric geographic features and associated linear centerlines can be referred to the relevant technical features of the collaborative editing methods for isometric geographic features and associated linear centerlines, and will not be repeated here.

[0113] The collaborative editing method and system for areal geographic features and associated linear centerlines provided in this invention have the following beneficial effects:

[0114] (1) Eliminate the repetitive work of manually switching layers: In the traditional process, after each polygon feature is edited, it is necessary to manually switch layers, locate the center line and redraw it. This invention automatically identifies the same coding field and automatically derives the center line, reducing the time of a single collaborative editing operation from several minutes in the traditional two-layer manual process (polygon editing → switching layers → manually redrawing the center line) to seconds, which greatly improves the efficiency of operation in the scenario of large-scale data production.

[0115] (2) Ensure the mathematical accuracy of the center line: Manually redrawing the center line cannot guarantee that it is located at the precise center of the surface geometry. This invention automatically derives the center line through the GsPolygon::CenterLine() algorithm, ensuring that the center line results of repeated derivations on the same surface geometry are completely consistent (algorithm determinism), eliminating the random offset error introduced by the individual differences of operators in manual redrawing, and significantly improving the repeatability and standardization of the data.

[0116] (3) Fundamentally eliminate the data inconsistency of "semi-reversal": The surface-line atomic reversal encapsulation scheme ensures that the two are strictly synchronized when reversing / redoing. No matter how many steps the operator reverses, the geometric state of the surface features and the center line always remains topologically consistent, eliminating the data inconsistency risk of "the surface has been reversed but the center line has not been reversed" in the traditional scheme.

[0117] (4) The historical memory mechanism optimizes the batch editing experience: For multiple consecutive node edits of the same face element (such as adjusting the road boundary node by node), the historical selection is automatically reused, eliminating the need for confirmation in each pop-up window, greatly improving the smoothness of operation, and is especially suitable for high-density data production scenarios.

[0118] (5) Topological constraints protect data integrity: Before a node is deleted, the number of nodes is checked (at least 3 unique nodes) to prevent users from accidentally creating invalid surface geometry and reduce the cost of data repair later.

[0119] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0120] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0121] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0122] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0123] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0124] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0125] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for collaborative editing of areal geographic features and associated linear centerlines, characterized in that, include: Step 1: In response to the user's node editing operation on the target surface feature in the map view, obtain the first geometric data of the target surface feature after editing; Step 2: Based on the preset same entity identifier field, filter out the associated line features that carry the same entity identifier code as the target polygon feature from at least one line layer of the map view; Step 3: Based on the first geometric data, automatically deduce the centerline geometry of the target surface feature to obtain the second geometric data, and update the geometry of the associated line feature based on the second geometric data; Step 4: Encapsulate the geometric change operation of the target polygon feature and the geometric change operation of the associated line feature into a single composite undo operation unit and submit it to the undo stack of the map context, so that the geometric state of the target polygon feature and the associated line feature is strictly synchronized when undoing or re-editing.

2. The method according to claim 1, characterized in that, The node editing operation in step 1 includes one of node movement, node addition, or node deletion; step 1, in response to the user's node editing operation on the target polygon feature in the map view, obtains the first geometric data of the target polygon feature after editing, including: When the node editing operation is node movement, in response to the user pressing the mouse within the tolerance range of the target node of the target surface feature, the system enters the aiming state; when the mouse movement distance exceeds the preset drag judgment threshold, the system enters the dragging state and updates the coordinates of the target node in real time; when the mouse is released and the system is in the dragging state, the system submits geometric changes and obtains the first geometric data of the target surface feature after editing based on the updated coordinates of the target node. When the node editing operation is to add a node, in response to the user pressing the mouse near the boundary of the target surface feature, the system searches for the projection point closest to the click position and the corresponding target edge in the edge set of the target surface feature, inserts a new node at the projection point, and immediately enters a draggable preview state so that the user can adjust the position of the new node before releasing the mouse. Based on the position coordinates of the new node, the system obtains the first geometric data of the target surface feature after editing. When the node editing operation is node deletion, in response to the user pressing and releasing the mouse within the tolerance range of the target node, a topology constraint check is performed to verify whether the boundary ring of the target surface feature still retains at least three non-repeating nodes after the target node is deleted. If the condition is not met, the deletion operation is rejected and a prompt is displayed. If the condition is met, the deletion is performed and geometric changes are submitted.

3. The method according to claim 1, characterized in that, Step 2, based on a preset "same entity identifier field," filters out associated line features from at least one line layer of the map view that carry the same entity identifier code as the target polygon feature, including: Read the entity identifier code value from the entity identifier field of the target surface feature; A buffer zone with a preset spatial neighborhood range is constructed, centered on the geometry of the target surface features before editing; Traverse all line layers in the current map view, find line features in the buffer of the target polygon feature that match the entity identifier code value of the target polygon feature, filter to obtain the associated line features of the target polygon feature, and construct a set of associated line features. If there is only one associated line element in the associated line element set, then the associated line element is used as the target line element and recorded in the historical mapping cache.

4. The method according to claim 3, characterized in that, If the set of associated line features includes multiple associated line features, it also includes: If the cached line element in the historical mapping cache exists in the current round of the association line element set, the cached line element is directly reused as the target association line element. If the historical mapping cache does not exist or has expired, a candidate selection dialog box will pop up, and the user will select the target relational line element for this editing from the relational line element set, and the target relational line element will be recorded in the historical mapping cache.

5. The method according to claim 1, characterized in that, Step 3, based on the first geometric data, automatically derives the centerline geometry of the target surface feature to obtain the second geometric data, including: The polygon geometry of the target polygon feature after editing is normalized, and then the polygon skeleton line extraction algorithm is called to calculate the centerline geometry inside the polygon in a deterministic manner, and normalization is performed to obtain the final centerline geometry.

6. The method according to claim 5, characterized in that, The method of calling the polygon skeleton line extraction algorithm to calculate the centerline geometry inside the polygon in a deterministic manner includes: Obtain the area and perimeter of the polygon geometry of the target surface feature, and calculate the feature half-width estimate based on the area and perimeter. The feature half-width estimate is used to control the boundary sampling step size and the pruning judgment threshold. Uniform sampling is performed along the boundary of the polygon with the estimated feature half-width as the step size; Construct a constrained Delaunay triangulation using the sampling point sequence as constraint edges; Extract the Voronoi diagram from the dual structure of the constrained Delaunay triangulation, retaining only the Voronoi edges that are completely inside the polygon. The retained Voronoi edges are organized into a topological graph, and pruning is performed on the topological graph based on the pruning judgment threshold. The suspended endpoint of the pruned centerline segment is extended toward the boundary of the polygonal surface, and the centerline geometry is obtained after smoothing and simplification.

7. The method according to claim 6, characterized in that, Pruning the topology graph includes: For the dangling edge connected to the endpoint node with a degree of 1 in the topology graph, if the length of the dangling edge is shorter than the pruning judgment threshold, it shall be deleted; For a branch node with a degree of 3 in the topology graph, if the two edges connected to the branch node are each dangling short edges, and the ratio of the distance from the third edge to the polygon boundary to the length of the two dangling short edges exceeds a preset threshold, the two dangling short edges are deleted.

8. The method according to any one of claims 1 to 7, characterized in that, The surface element is a road surface or a river surface, and the centerline geometry is a road centerline or a river centerline.

9. A collaborative editing system for areal geographic features and associated linear centerlines, characterized in that, include: The acquisition module is used to acquire the first geometric data of the target surface feature after editing in response to the user's node editing operation on the target surface feature in the map view; The filtering module is used to filter out associated line features that carry the same entity identifier code as the target polygon feature from at least one line layer of the map view based on a preset same entity identifier field. The derivation module is used to automatically derive the centerline geometry of the target surface feature based on the first geometric data, obtain the second geometric data, and update the geometry of the associated line feature based on the second geometric data; The submission module is used to encapsulate the geometric change operation of the target polygon feature and the geometric change operation of the associated line feature into a single composite undo operation unit and submit it to the undo stack of the map context, so that the geometric state of the target polygon feature and the associated line feature is strictly synchronized when undoing or re-editing.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 8.