Tree structure-based automatic configuration method for contour notes of a marine chart
By constructing a tree-like structure of contour lines, determining the starting point of the annotation test line, and calculating the curvature of the proposed annotation location, the problem of inconsistent contour line annotation configuration in the existing technology is solved, and the effect of uniform distribution of annotations along contour lines is achieved.
Patent Information
- Application Number
- CN202211054150.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Existing automatic configuration methods for contour line annotations fail to coordinate with the topological relationships and spatial hierarchy between contour lines, making it impossible to achieve uniform distribution of annotations along the contour line trend.
A tree-based approach is used to construct the spatial relationship between contour lines. The starting point of the annotation test line is determined by the contour line tree structure. The curvature of the proposed annotation location is calculated, and the candidate scheme with the smallest average curvature is selected as the optimal configuration scheme.
This achieves coordination between the annotations and the contour lines in terms of hierarchy and spatial arrangement, ensuring that the annotations are evenly distributed along the contour lines, and improving the overall coordination and uniformity of the annotation configuration.
Smart Images

Figure CN115272522B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of marine surveying and mapping technology, and relates to an automatic configuration method for isobath annotation in nautical chart making. Background Technology
[0002] Bone contour lines are core elements on nautical charts that reflect the changing trends of seabed topography. To accurately determine the depth values represented by each isobath on a nautical chart, depth annotations are placed at appropriate locations along each isobath. Regarding the automatic configuration of isobath annotations, as a crucial step in automated chart production and automatic isobath generalization, some scholars have conducted exploratory research. Typical examples include: Imhof's proposal of two types of principles for guiding the configuration of linear feature annotations: "hard constraints" and "soft constraints"; Wolff's use of a curve with a curvature greater than a specified value to fit the buffer line of the original curve, limiting the degree of curvature at the annotation location; Wang Tengfei's proposal to configure chart line feature annotations using the relative monotonic segment method based on simplification, achieving dynamic annotations that change with scale and chart updates; and Feng Yinyin et al.'s exploration of methods for configuring chart annotations in the ArcGIS environment, improving the efficiency of annotation configuration. Similar to isobath lines, many scholars have also explored the automatic configuration of contour line annotations. Xia Jinwei and Zhao Dongbao determined the position of elevation annotations by extracting the curvature of contour lines; Lei Mingjun proposed using the monotonic segment method to extract smooth curve segments, which solved the problem of reasonable segmentation of annotation lines; Wei Meiyan proposed an automatic contour line elevation annotation algorithm, which controlled the position and number of annotations by using the annotation width.
[0003] The above studies have done a lot of work on the automatic configuration of contour or contour line annotations, but there are still two shortcomings: (1) The annotations are configured based on local feature characteristics, without paying attention to the topological relationship between contour lines, and cannot be coordinated with the overall contour line hierarchy; (2) The annotations are configured based on a single contour line, without considering the spatial distribution of groups of contour lines, and cannot meet the annotation configuration requirement that the annotations should be evenly distributed along the contour line trend. Summary of the Invention
[0004] To address the problem that existing annotation configuration methods fail to coordinate with the topological relationships and spatial hierarchy between contour lines, and do not meet the requirement that annotations should be evenly distributed along the contour line trend, this invention proposes an automatic contour line configuration method that is coordinated with the contour line hierarchy as a whole and evenly distributed along the contour line trend.
[0005] The technical solution adopted by the present invention to achieve the above objectives is as follows:
[0006] An automatic configuration method for isobath annotations on nautical charts based on a tree structure mainly includes the following steps:
[0007] a. Read the contour data of the ocean and land layer of the vector electronic nautical chart;
[0008] b. Construct a tree structure of isobaths to establish the spatial relationships between different isobaths on the nautical chart;
[0009] c. Determine the relationship between nodes in the upper and lower layers of the contour tree structure;
[0010] d. Determine a certain number of starting points for annotation test lines based on the contour tree structure;
[0011] e. Analyze the complexity of the sea area using the contour tree, and determine the test line length based on the complexity of the sea area;
[0012] f. Lay out radial test lines from the starting point of the test line;
[0013] g. The intersection point of each test line with the isobath cluster is taken as the proposed annotation position. A set of proposed annotation positions generated by test lines laid out in different directions is taken as the candidate scheme for annotation configuration in that direction.
[0014] h. For candidate schemes in different directions, calculate the curvature of the proposed annotation position in each candidate scheme, and use the average curvature of all proposed annotation positions in the candidate scheme as a quantitative index. Select the candidate scheme with the smallest average curvature at the starting point of each test line as the optimal configuration scheme.
[0015] i. The set of proposed annotation positions in the optimal configuration scheme of each test line starting point becomes the final annotation position. Read the depth values of all contour lines and the depth on both sides of the contour lines. Configure the corresponding depth value for the contour lines in the annotation layer in the direction perpendicular to the contour lines and towards the shallow area.
[0016] In step b, the method for constructing the isobath tree structure is as follows: First, the isobaths on the nautical chart are grouped and sorted according to their depth values from shallowest to deepest. Then, polygons are formed based on the isobath type: if the isobath is a closed isobath, a closed polygon is directly generated; if the isobath is a boundary isobath, it is connected to the map outline or coastline in a counter-clockwise direction to form a closed polygon; if the isobath is an incomplete isobath, i.e., multiple isobaths of the same depth are interrupted by the map outline, the polygons formed by connecting the map outline alone will overlap, so the incomplete isobaths of the same depth group need to be connected end to end in a counter-clockwise direction to form a polygon with the map outline. Finally, it is determined which isobath polygons in the next group are included in the isobath polygons with the higher ranking, and the isobaths are connected by edges as nodes to form a tree structure.
[0017] In step c, the relationships between nodes in the contour line tree structure are categorized as: one-to-one, one-to-many, and many-to-many. A one-to-one relationship means that within the contour line range of the parent node, the depth region corresponding to the contour line of the child node contains only one contour line; there are no multiple contour lines with equal depth values. A one-to-many relationship means that within the contour line range of the parent node, the depth region corresponding to the contour line of the child node contains multiple contour lines with equal depth values. A many-to-many relationship occurs when an incomplete contour line is the parent node; the polygon formed by multiple incomplete contour lines and its contained child contour lines form a many-to-many relationship.
[0018] In step d, the method for determining the starting point of the annotation test line based on the contour tree structure is as follows: extract the leaf nodes at the end of all tree structures, determine their hierarchical relationship with the parent node, retain leaf nodes with a one-to-one hierarchical relationship, and use the geometric center of the contour lines of these leaf nodes as the starting point of the test line.
[0019] In step e, the complexity of the sea area is analyzed, and the calculation method for determining the test line length based on the complexity of the sea area is as follows:
[0020]
[0021] d represents the length of the test line, range_length represents the length of the chart diagonal, length and width represent the length and width of the chart border, respectively, and the length of the chart diagonal is used to standardize dimensions and adjust the chart size. N represents the number of leaf nodes in the isobath tree structure.
[0022] In step h, the concept of curvature is: the ratio of the total length of the curve to the length of the baseline of the curve. For a curve l... i From points P1, P2, P3….P n Composition, curve length is Baseline length D i =|P1P n | Then the curvature of the curve segment is C(l) i ) = S i / D i The curvature reflects the smoothness of the curve segment. Placing contour annotations at locations with lower curvature ensures the annotations are placed where the contour lines are relatively smooth. The curvature of the proposed annotation location is calculated as follows: the curvature of the contour curve segment corresponding to the length of the annotation text on both sides of the intersection of the test line and the contour line. For candidate schemes in different directions, the average curvature of all proposed annotation locations along the test line in that direction is used as the average curvature. Using this as an indicator, the candidate scheme with the lowest average curvature at the starting point of each test line is selected as the optimal configuration.
[0023] The beneficial effects of this invention are as follows: This invention overcomes the shortcomings of current automatic configuration methods for contour line annotations, which fail to coordinate with the hierarchical relationship and spatial arrangement of contour lines, and whose annotation distribution does not consider the trend of contour lines. Existing experiments have shown that this method can configure depth annotations that are coordinated with the hierarchical relationship and spatial arrangement of contour lines and are evenly distributed along the trend of contour lines, while ensuring the readability of individual annotations. Attached Figure Description
[0024] Figure 1 This is the main flowchart of the automatic configuration of deep annotations in this invention.
[0025] Figure 2 This is a schematic diagram of polygons formed based on the type of contour lines; where (a) represents the classification of contour lines, and (b) represents polygons of different types of contour lines. Detailed Implementation
[0026] The present invention will be further described below with reference to the technical solution and accompanying drawings.
[0027] like Figure 1 As shown, the method for configuring depth annotations in hierarchical contour clusters proposed in this invention utilizes a computer to calculate the position of depth annotations and achieves automatic configuration of depth annotations, including the following steps:
[0028] Step a: Based on the vector electronic nautical chart data standard, read the isobath data of the ocean-land layer to obtain the dataset L = {l1, l2, l3…l...} of the target nautical chart. n};
[0029] Step b involves grouping and sorting all contour lines in the contour line dataset according to their depth values, from shallowest to deepest. Then, polygons are formed based on the contour line type, such as... Figure 2 If the isobath is a closed isobath, a closed polygon is directly generated. If the isobath is a boundary isobath, a closed polygon is formed by connecting the map border or coastline in a counter-clockwise direction. If the isobath is an incomplete isobath, meaning multiple isobaths of the same depth are interrupted by the map border, the polygons formed by connecting the map border separately will overlap. In this case, incomplete isobaths of the same depth group need to be connected end-to-end in a counter-clockwise direction to form a polygon with the map border. Finally, it is determined which isobath polygons in the next group are included in the isobath polygons with higher ranking, and the isobaths are connected as nodes with edges to form a tree structure.
[0030] Step c: The relationships between nodes in the contour tree structure are categorized into three types: one-to-one, one-to-many, and many-to-many. The relationships between nodes in the contour tree structure are determined, and the relationship information is recorded on each node.
[0031] Step d: Determine a certain number of annotation test line starting points based on the contour tree structure; extract the leaf nodes at the ends of all tree structures, examine their hierarchical relationship with their parent nodes, and retain leaf nodes {l′1,l′2,…l′} with a one-to-one hierarchical relationship. i ,…,l′ n}, calculate the envelope rectangle {Env1,Env2,…Env} corresponding to its contour lines. i ,…,Env n}, where Env i This represents the envelope rectangle of the i-th contour line. The envelope rectangle is defined as the minimum x-coordinate among all coordinate points along that contour line. i,min Maximum value x i,max The minimum value of the y-axis i,min Maximum value y i,max The rectangle formed by the given conditions has four corner points with coordinates (x, y, y) respectively. i,min ,y i,min ), (x i,min ,y i,max ), (x i,max ,y i,min ), (x i,max ,y i,max The geometric center point v is calculated from the coordinates of the four corner points of the envelope rectangle. i The x and y coordinates are respectively Use the geometric center point as the starting point of the corresponding test line.
[0032] Step e: Calculate the length of the chart diagonal from the length and width of the chart border. It serves to standardize dimensions and adjust the size of the drawing; then, the length of the test line d = range_length / N is calculated from the number of leaf nodes N in the contour tree structure and the length of the diagonal.
[0033] Step f, starting from the test line start point v i Initially, a total of 24 radial test lines were laid out at 15° intervals, with test line length d. i,1 ,t i,2 ,…t i,j ,…,t i,24}
[0034] Step g, calculate t for each test line. i,j The intersection of (j=1,2,…,24) with the isobath cluster is taken as the intended annotation location, and each test line t i,j This will result in a set of candidate locations for annotation, denoted as {p ij1 ,p ij2 ,…,p ijk ,…,p ijm}(k=1,2,…,m), this set of proposed annotation positions serves as candidate scheme S for annotation configuration in this direction. i,j .
[0035] Step h: Take arc segments of equal depth, equal to the length of the annotation text, to the left and right of the proposed annotation location. i {P1,P2,P3…P n} Calculate the curvature of the arc segment. For candidate schemes in different directions, calculate the average curvature of all proposed annotation locations, and use this as an indicator to select the candidate scheme with the smallest average curvature at the starting point of each test line as the optimal annotation configuration scheme.
[0036] Step i: Using the proposed annotation location in the optimal configuration scheme as the final annotation location, read the vector electronic nautical chart data of the ocean-land layer to obtain the depth values of all isobaths and the depths on both sides of the isobaths. Open the ocean-land annotation layer, and at the annotation location, annotate the isobath depth values in a direction perpendicular to the isobaths and towards the shallower areas.
[0037] This invention has been described through embodiments. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of this invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, this invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this invention.
Claims
1. A method for automatically configuring isobath annotations on nautical charts based on a tree structure, characterized in that, The method includes the following steps: a. Read the contour data of the ocean and land layer of the vector electronic nautical chart; b. Construct a tree structure of isobaths to establish the spatial relationships between different isobaths on the nautical chart; c. Determine the relationship between nodes in the upper and lower layers of the contour tree structure; d. Determine a certain number of starting points for annotation test lines based on the contour tree structure; e. Analyze the complexity of the sea area using the contour tree, and determine the test line length based on the complexity of the sea area; f. Lay out radial test lines from the starting point of the test line; g. The intersection point of each test line with the isobath cluster is taken as the proposed annotation position. A set of proposed annotation positions generated by test lines laid out in different directions is taken as the candidate scheme for annotation configuration in that direction. h. For candidate schemes in different directions, calculate the curvature of the proposed annotation position in each candidate scheme, and use the average curvature of all proposed annotation positions in the candidate scheme as a quantitative index. Select the candidate scheme with the smallest average curvature at the starting point of each test line as the optimal configuration scheme. i. The set of proposed annotation positions in the optimal configuration scheme of each test line starting point becomes the final annotation position. Read the depth values of all contour lines and the depth on both sides of the contour lines, and configure the corresponding depth value for the contour lines in the direction perpendicular to the contour lines towards the shallow area.
2. The method for automatically configuring isobath annotations on nautical charts based on a tree structure according to claim 1, characterized in that, In step b, the method for constructing the contour tree structure is as follows: First, the isobaths on the nautical chart are grouped and sorted from shallowest to deep according to their depth values. Then, polygons are formed based on the isobath type: if the isobath is a closed isobath, a closed polygon is directly generated; if the isobath is a boundary isobath, it is connected to the map border or coastline in a counterclockwise direction to form a closed polygon; if the isobath is an incomplete isobath, the incomplete isobaths in the same depth group are connected end to end in a counterclockwise direction to form a polygon with the map border. Finally, it is determined which isobath polygons in the next group are included in the isobath polygons with the higher ranking, and the isobaths are connected by edges to form a tree structure.
3. The automatic configuration method for nautical chart contour annotations based on a tree structure according to claim 1 or 2, characterized in that, In step c, the relationships between nodes in the upper and lower layers of the contour line tree structure are divided into: one-to-one, one-to-many, and many-to-many relationships. A one-to-one relationship means that within the contour line range of the parent node, the depth area corresponding to the contour line of the child node has only one contour line, and there are no multiple contour lines with the same depth value. A one-to-many relationship means that within the contour line range of the parent node, the depth area corresponding to the contour line of the child node has multiple contour lines with the same depth value. A many-to-many relationship occurs when an incomplete contour line is the parent node, and the polygon formed by multiple incomplete contour lines and its contained child contour lines form a many-to-many relationship.
4. The automatic configuration method for nautical chart contour annotations based on a tree structure according to claim 1 or 2, characterized in that, In step d, the method for determining the starting point of the annotation test line based on the contour tree structure is as follows: extract the leaf nodes at the end of all tree structures, determine their hierarchical relationship with their parent nodes, and retain leaf nodes {l′1,l′2,…l′} with a one-to-one hierarchical relationship. i ,…,l′ n }, calculate the envelope rectangle {Env1,Env2,…Env} corresponding to its contour lines. i ,…,Env n }, where Env i This represents the envelope rectangle of the i-th contour line. The envelope rectangle is defined as the minimum x-coordinate among all coordinate points along that contour line. i,min Maximum value x i,max The minimum value of the y-axis i,min Maximum value y i,max The rectangle formed by the given conditions has four corner points with coordinates (x, y, y) respectively. i,min ,y i,min ), (x i,min ,y i,max ), (x i,max ,y i,min ), (x i,max ,y i,max The geometric center point v is calculated from the coordinates of the four corner points of the envelope rectangle. i The x and y coordinates are respectively Use the geometric center point as the starting point of the corresponding test line.
5. The method for automatically configuring isobath annotations on nautical charts based on a tree structure according to claim 3, characterized in that, In step d, the method for determining the starting point of the annotation test line based on the contour tree structure is as follows: extract the leaf nodes at the end of all tree structures, determine their hierarchical relationship with their parent nodes, and retain leaf nodes {l′1,l′2,…l′} with a one-to-one hierarchical relationship. i ,…,l′ n }, calculate the envelope rectangle {Env1,Env2,…Env} corresponding to its contour lines. i ,…,Env n }, where Env i This represents the envelope rectangle of the i-th contour line. The envelope rectangle is defined as the minimum x-coordinate among all coordinate points along that contour line. i,min Maximum value x i,max The minimum value of the y-axis i,min Maximum value y i,max The rectangle formed by the given conditions has four corner points with coordinates (x, y, y) respectively. i,min ,y i,min ), (x i,min ,y i,max ), (x i,max ,y i,min ), (x i,max ,y i,max The geometric center point v is calculated from the coordinates of the four corner points of the envelope rectangle. i The x and y coordinates are respectively Use the geometric center point as the starting point of the corresponding test line.
6. The automatic configuration method for nautical chart contour annotations based on a tree structure according to claim 1, 2, or 5, characterized in that, In step e, the length of the test line is calculated as follows: Where d is the length of the test line; range_length is the length of the chart diagonal, length and width are the length and width of the chart border, respectively, and the length of the chart diagonal is used to standardize the dimensions and adjust the size of the chart; N is the number of leaf nodes in the isobath tree structure.
7. The automatic configuration method for isobath annotations on nautical charts based on a tree structure according to claim 3, characterized in that, In step e, the length of the test line is calculated as follows: Where d is the length of the test line; range_length is the length of the chart diagonal, length and width are the length and width of the chart border, respectively, and the length of the chart diagonal is used to standardize the dimensions and adjust the size of the chart; N is the number of leaf nodes in the isobath tree structure.
8. The automatic configuration method for isobath annotations on nautical charts based on a tree structure according to claim 4, characterized in that, In step e, the length of the test line is calculated as follows: Where d is the length of the test line; range_length is the length of the chart diagonal, length and width are the length and width of the chart border, respectively, and the length of the chart diagonal is used to standardize the dimensions and adjust the size of the chart; N is the number of leaf nodes in the isobath tree structure.
9. A method for automatically configuring isobath annotations on nautical charts based on a tree structure, as described in claims 1, 2, 5, 7, or 8, characterized in that, In step h, arc segments l of equal depth, equal to the length of the annotation text, are taken to the left and right of the proposed annotation position. i {P1,P2,P3…P n }, calculate the curvature C(l) of the arc segment. i ) = S i / D i The curve length is Baseline length D i =|P1P n For candidate schemes in different directions, calculate the average curvature of all proposed annotation locations, and use this as an indicator to select the candidate scheme with the smallest average curvature at the starting point of each test line as the optimal annotation configuration scheme.
10. The method for automatically configuring isobath annotations on nautical charts based on a tree structure according to claim 6, characterized in that, In step h, arc segments l of equal depth, equal to the length of the annotation text, are taken to the left and right of the proposed annotation position. i {P1,P2,P3…P n }, calculate the curvature C(l) of the arc segment. i ) = S i / D i The curve length is Baseline length D i =|P1P n For candidate schemes in different directions, calculate the average curvature of all proposed annotation locations, and use this as an indicator to select the candidate scheme with the smallest average curvature at the starting point of each test line as the optimal annotation configuration scheme.
Citation Information
Patent Citations
Method for automatically generating minimum-distance course based on electronic nautical chart
CN101806596A
Comprehensive drawing method based on vector data and graphical processing technology
CN111241228A