Method, system and computer readable storage medium for generating a thematic chart
Patent Information
- Application Number
- CN202511775241.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2045-11-28
AI Technical Summary
宗地的界址点按照顺时针从左上角排序,宗海的界址点按照逆时针从左下角开始排序,编号顺序不同,难以通用
(1)本发明实现宗海图的智能化生成,解决了现有依赖人工复核调整、效率低、合规性差、复杂形状适配不足的缺陷;
Smart Images

Figure CN122019676B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of geographic information system application technology, specifically relating to a method, system, and computer-readable storage medium for generating nautical charts. Background Technology
[0002] As the basic spatial unit for the management of sea area use, the precise definition and standardized recording of the boundary points and boundary lines of a sea area are the core basis for sea area rights confirmation, area calculation, and ownership management. According to the "Technical Specifications for Compiling Sea Area Maps," sea area boundary points are inflection points used to define the scope and boundaries of a sea area and its internal units, and boundary lines are lines formed by connecting the boundary points in sequence. Within a sea area, internal units are divided according to different sea use methods. Sea areas with the same sea use method but whose scopes are not contiguous should be divided into different internal units. The outermost boundary of an internal unit defines the scope of the sea area.
[0003] In principle, the boundary points of each sea area should be marked starting from the lower left corner of each sea area unit. The boundary point numbers should uniformly use Arabic numerals, numbered consecutively counterclockwise from 1. The boundary point numbers of different sea area units should be arranged according to the second-level category order of "Sea Area Use Methods" (HY / T 123). The boundary points of the sea area units should be connected sequentially with straight lines in a counterclockwise direction to form a closed boundary line. For internal units with a large number of boundary points, the consecutive numbering can be omitted in the middle for ease of writing.
[0004] Research on the generation and sorting of boundary points for land parcels and sea areas, as well as methods for generating internal units and boundary lines for land parcels and sea areas, is relatively limited. Existing methods that come closest include "A Method for Identifying and Optimizing the Sorting of Land Parcel Boundary Points Based on Arcpy" and "A Method for Automatically Extracting Boundary Points and Generating Boundary Point Numbers for Natural Resource Ownership Confirmation." These methods primarily generate boundary points for land parcels and sea boundaries. However, due to different regulatory requirements, the sorting requirements and methods for boundary points in land parcels and sea areas differ, and neither method mentions methods for generating boundary lines. Unlike land parcels, land parcels and sea areas typically contain internal units with different sea-use methods. In addition to identifying the boundary lines of internal units, it is also necessary to identify the boundary lines of the entire land parcel and sea area, making the process more complex.
[0005] Furthermore, existing technologies are mainly geared towards land parcel or general natural resource ownership confirmation scenarios. Land parcel boundary points are sorted clockwise from the top left corner, while sea boundary points need to be sorted counterclockwise from the bottom left corner. The significant difference in numbering order makes it difficult to directly transfer existing land parcel processing technologies to sea parcel scenarios. At the same time, existing technologies do not consider the priority of sea use methods, special geometric shape processing, boundary line text simplification, and sea parcel-internal unit data linkage, etc., which are specific requirements of sea parcels and cannot adapt to the professional processing needs of marine sea use units.
[0006] Specifically, existing technologies, due to differences in application scenarios (land parcels / general natural resources) and the requirements of marine land use regulations, cannot meet the specialized needs of marine land use unit processing. The specific shortcomings are as follows: (1) The order of the boundary points of the land parcel and the sea parcel is different; The boundary points of land parcels are arranged clockwise from the top left corner, while the boundary points of sea parcels are arranged counterclockwise from the bottom left corner. The different numbering orders make them difficult to use interchangeably.
[0007] (2) The priority handling of sea use methods is missing, which does not comply with the sea use regulations; According to the "Technical Specifications for Compiling and Mapping Marine Parcel Charts," different marine use units within a marine parcel must be arranged according to the second-level category order in the "Marine Use Methods" (HY / T123), and the boundary points of high-priority units must be numbered first to avoid duplication with low-priority units. However, the existing land parcel boundary point technology only sorts according to spatial location and does not consider the priority of marine use methods, resulting in conflicts between the generated boundary point numbers and the marine parcel specifications.
[0008] (3) Insufficient ability to handle special geometric shapes and poor adaptability; Marine units used for marine purposes often include special shapes such as annular (e.g., annular units formed by artificial island revetments or inland waterways) and circular (e.g., wind turbines). For ring-shaped units, existing technologies cannot distinguish between "outer ring" and "inner ring", which can easily lead to misidentification of inner ring vertices as outer ring boundary points, resulting in incorrect boundary line contours. For circular units, the circular feature of "center + radius" cannot be identified, which does not meet the recording requirements of the "Technical Specifications for Compiling and Drawing Nautical Charts". The circular parameters need to be manually supplemented, which reduces the processing efficiency by 50%.
[0009] (4) The simplified text of the boundary line is missing, resulting in data redundancy; The "Technical Specifications for Compiling and Drawing Marine Maps" requires that "for internal units with a large number of boundary points, consecutive numbered sections can be omitted in the middle for ease of writing," in order to reduce the length of boundary line text and improve readability. When the marine unit is a polygon (with more than 10 boundary points), the generated boundary line text has high redundancy and needs to be manually simplified.
[0010] (5) Insufficient data linkage between Zonghai and internal units, resulting in poor consistency; The marine land use data needs to generate both "internal unit boundary lines" and "overall marine land use boundary lines" simultaneously, and both must be based on the same set of boundary point numbers (to avoid numbering conflicts). Existing technology can only process a single unit (such as a land parcel or an internal marine land use unit) and cannot achieve linked functions such as "shared numbering of boundary points for multiple units under the same marine land use parcel" and "automatic extraction of external vertices from the overall marine land use boundary line." This results in inconsistencies between the generated "internal unit boundary lines" and "marine land use boundary lines," requiring manual verification and correction one by one.
[0011] In summary, existing technologies suffer from poor compliance and low efficiency due to their inability to adapt to the specific regulatory requirements of marine boundary sea use units, failing to meet the large-scale, standardized data processing needs in marine resource management. In the marine field, current processing methods largely rely on the basic functions of general GIS software such as QGIS and ArcGIS, including manually drawing boundary points using "editing tools" and manually entering boundary line text using "field calculators." There is currently no specialized, automated processing technology specifically designed for marine boundary sea use units. Summary of the Invention
[0012] Based on the aforementioned shortcomings and deficiencies in the prior art, one of the objectives of this invention is to at least solve one or more of the aforementioned problems in the prior art. In other words, one of the objectives of this invention is to provide a method, system, and computer-readable storage medium for generating nautical charts that meets one or more of the aforementioned requirements.
[0013] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: A method for generating a nautical chart includes the following steps: S1. Input the sea area unit vector file and define the projected coordinate system; the sea area unit vector file includes the following fields: sea area name (zonghai), sea area use method (method), sea area use content (content), and area (area); S2. Extract the unique value of the zonghai field to classify the zonghai, and process them one by one. For the same zonghai, sort the sea use units according to the priority of the method field. S3. Based on priority, identify the geometry of the sea use units and generate boundary point and boundary line text; among them, the geometry of the sea use units is identified as ring, circle or polygon. Assign the boundary line text to the boundary line field of the sea use unit update layer; the sea use unit update layer also includes the following fields: sea name (zonghai), sea use method (method), sea use content (content), and area (area); Convert the coordinates of the boundary points from the input projected coordinate system to the geographic coordinate system, then convert the decimal latitude and longitude coordinates of the geographic coordinate system to degrees, minutes, and seconds format, and assign them to the longitude and latitude fields of the boundary point layer; the boundary point layer also includes the following fields: Zonghai name and number. S4. Merge all sea use units of the same sea area to obtain the geometric shape and area of the sea area, and assign the area to the area field of the sea area layer; the sea area layer also includes the following fields: sea area name zonghai, sea area boundary line field; Generate the boundary line text of Zonghai based on the geometric shape of Zonghai and assign it to the line field of Zonghai boundary line; S5. Draw a sea map based on the boundary point layer, sea area layer, and sea use unit update layer.
[0014] As a preferred embodiment, the ring identification method is as follows: The NumInteriorRings function is used to determine whether the geometry of the marine unit contains an inner ring. If the NumInteriorRings function value is greater than 0, it contains an inner ring and is identified as a ring. If the NumInteriorRings function value is not greater than 0, then continue to identify whether it is a circle.
[0015] As a preferred embodiment, the method for identifying the circle is as follows: Determine whether the following three objective conditions are met: (I) The number of vertices of the outer ring of the geometry of the sea unit is ≥12; (II) The ratio of the standard deviation to the mean of the distance from the vertex to the geometric centroid is <5%; (III) The average distance from the vertex to the geometric centroid is >1e-6 meters; If yes, it is identified as a circle; otherwise, it is identified as a polygon.
[0016] As a preferred approach, if the geometry of the sea element is identified as a polygon, the process of generating boundary point and boundary line text includes: Extract the vertices of the geometry of the marine unit, and remove duplicates by retaining a preset target number of decimal places for the coordinate values of the vertices, generating a list of boundary points without repetition; Obtain an interior point within the polygonal enclosed area, calculate the azimuth angle between each boundary point in the boundary point list and the interior point, and find the boundary point with the smallest angle difference from the target angle at the lower left corner, and use it as the starting boundary point. Starting from the initial boundary point, sort the boundary points counterclockwise and assign their sequence numbers to the number field; if a boundary point already has a number field assigned, then use its sequence number. Connect the boundary point numbers sequentially with connectors, and connect the starting boundary point number at the end with a connector to generate the boundary line text.
[0017] As a preferred approach, after generating the boundary line text, the boundary line text is further simplified: If the boundary line text contains a sequence of consecutive increments of 1 or consecutive decrements of 1 with a length ≥ 4, then ellipses are used to replace the 3rd to the 4th sequence. N -1 is the sequence number part; where, NThe length of the sequence number segment; Assign the simplified boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit and adding them to the sea use unit update layer.
[0018] As a preferred approach, if the geometry of the sea cell is identified as circular, the process of generating boundary point and boundary line text includes: Obtain the centroid of the circle as the center, calculate the average distance Y from all vertices of the geometric shape of the sea element to the center as the radius, and record the center as the boundary point; Assign a number X to the boundary point and generate boundary line text with a preset target format of boundary point X (radius = Y meters); Assign the boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit and adding them to the sea use unit update layer.
[0019] As a preferred approach, if the geometry of the sea cell is identified as a ring, the process of generating boundary point and boundary line text includes: Extract the outer ring of the geometric shape of the sea unit, and generate the boundary points and boundary line text of the outer ring according to the process of generating boundary points and boundary line text of polygons. Extract the inner ring of the geometry of the sea use unit. Determine whether it is a processed sea use unit by performing a fuzzy match between the area of the symmetric difference set (SymDifference area < preset area tolerance) or the Hausdorff distance (Hausdorff Distance < preset distance tolerance). If it is, reuse its boundary line text. If not, generate the boundary points and boundary line text of the inner ring according to the process of generating boundary points and boundary line text for polygons or circles. Merge the boundary line text of the outer ring with the boundary line text of the inner ring to generate the target boundary line text with the preset target format of "outer ring text + removed + inner ring text"; Assign the target boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit and adding them to the sea use unit update layer.
[0020] As a preferred embodiment, step S4, generating the boundary line text of the Zonghai sea area based on the geometric shape of the Zonghai sea area, includes: Traverse all sea use units under the current sea area and determine whether they include circular or annular sea use units; If so, retrieve the content field of all sea-use units, remove duplicates, sort them alphabetically, and connect them with a connector symbol to serve as the value of the line field of the sea boundary line. If not, extract the vertices of the Zonghai geometric shape, match the current Zonghai boundary points based on a distance < 0.00005 meters, and generate a boundary point list from the matched vertices; obtain an internal point within the area enclosed by the Zonghai geometric shape, calculate the azimuth angle between each boundary point in the boundary point list and the internal point, find the boundary point with the smallest angle difference from the target angle at the lower left corner, and use it as the starting boundary point; sort the boundary points counterclockwise starting from the starting boundary point and assign them the value number; if a boundary point has already been assigned the value number, use its number; connect the boundary point numbers sequentially with connecting lines, and connect the starting boundary point's number at the end with a connecting line to generate the boundary line text and assign it to the Zonghai boundary line field of the Zonghai layer.
[0021] This invention also provides a system for generating nautical charts, which applies the nautical chart generation method described above. The generation system includes: The input module is used to input the sea use unit vector file and define the projected coordinate system; the sea use unit vector file includes the following fields: sea area name (zonghai), sea use method (method), sea use content (content), and area (area); The classification module is used to extract the unique value of the zonghai field for zonghai classification; The sorting module is used to process individual sea parcels one by one, and sort the sea use units of the same sea parcel according to the priority of the method field. The identification module is used to identify the geometry of the sea use units in order of priority; wherein the geometry of the sea use units is identified as ring, circle or polygon. The generation module is used to generate boundary point and boundary line text; The assignment module is used to assign the boundary line text to the boundary line field of the sea use unit update layer; the sea use unit update layer also includes the following fields: sea name (zonghai), sea use method (method), sea use content (content), and area (area); The conversion module is used to convert the coordinates of the boundary points from the input projected coordinate system to the geographic coordinate system, and then convert the decimal latitude and longitude coordinates of the geographic coordinate system to degrees, minutes and seconds format. The values are then assigned to the longitude and latitude fields of the boundary point layer through the assignment module. The boundary point layer also includes the following fields: Zonghai name and number. The merging module is used to merge all sea use units of the same sea area to obtain the geometric shape and area of the sea area, and to assign the area to the area field of the sea area layer through the assignment module. The sea area layer also includes the following fields: sea area name (zonghai) and sea area boundary line (line). The generation module is also used to generate the boundary line text of the Zonghai according to the geometric shape of Zonghai, and assign the value to the line field of Zonghai boundary line through the assignment module. The drawing module is used to draw a marine map based on the boundary point layer, the marine area layer, and the marine use unit update layer.
[0022] The present invention also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method for generating a nautical chart as described in any of the preceding embodiments.
[0023] Compared with the prior art, the beneficial effects of this invention are: (1) This invention realizes the intelligent generation of nautical charts, which solves the defects of existing charts that rely on manual review and adjustment, are inefficient, have poor compliance, and are not suitable for complex shapes. (2) Existing technologies confuse the sorting rules of land parcels and sea parcels (land parcels are sorted clockwise from the upper left corner, and sea parcels are sorted counterclockwise from the lower left corner), requiring manual resorting. This invention determines the starting boundary point by matching the internal point with the target angle of the lower left corner (e.g., 225° azimuth) and sorts them counterclockwise. After testing with 100 sets of sea use units of different shapes (rectangles, polygons, irregular shapes), the boundary point sorting fully complies with the requirements of the "Technical Specifications for Compiling Sea Parcel Maps". No manual adjustment is required, and the compliance is significantly improved compared with existing technologies. (3) In view of the problem that the existing technology cannot identify ring and circular marine units, the present invention identifies rings by “inner ring existence determination” and circles by “vertex distance standard deviation + quantity threshold”, and realizes separate processing of inner and outer rings and automatic extraction of the center radius of circles; taking a marine project containing 5 ring units (floating wind turbines), 125 circular units (offshore wind turbines) and 150 rectangular units (submarine cables) as an example, the existing technology requires manual supplementation of parameters and takes about 2 hours, while the present invention only takes 10 seconds, improving the processing efficiency by 720%, and the accuracy meets the requirements of marine surveying standards; (4) The boundary line text of the present invention is simplified and automated, and the redundancy is reduced; the boundary line text generated by the prior art is a complete number sequence (such as 1-2-3-4-5-6-7-8-1), which has high redundancy. The present invention shortens the text length of more than 10 boundary points by 60% (such as 1-2-…-8-1) through the logic of "continuous increment / decrement determination + intermediate omission"; after testing with 50 sets of multi-vertex sea units (10-20 boundary points), the average number of characters in the text is reduced from 45 characters to 18 characters, and there are no omission errors; (5) The consistency of the data between the land area and the internal units of the present invention is significantly improved. Due to the lack of a data linkage mechanism, the existing technology has a conflict rate of up to 20% between the boundary point numbers of the internal units and the land area, which requires manual verification one by one. The present invention realizes the sharing of boundary point numbers of multiple units under the same land area through the "land area-level boundary point dictionary" and generates the land area boundary line by "land area external contour vertex filtering + existing number matching". After testing 30 groups of land area projects containing 3-8 internal units, the boundary point numbers of the internal units and the land area are completely consistent and there is no conflict. The consistency is 100% higher than that of the existing technology. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method for generating a nautical chart according to an embodiment of the present invention; Figure 2 This is a flowchart of the process for identifying the geometry of marine units and generating boundary points and boundary lines according to an embodiment of the present invention; Figure 3 This is a flowchart of the process for generating the boundary line text of the sea area according to an embodiment of the present invention. Detailed Implementation
[0025] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0026] To address the shortcomings of existing technologies, such as conflicting order of land parcel and sea boundary points, lack of priority processing for sea use methods, poor adaptability to special geometric shapes, redundant boundary line text, and insufficient data linkage between land parcels / sea areas and internal units, which lead to poor compliance, low efficiency, and reliance on extensive manual review and adjustment in the processing of land parcel / sea use units, this invention provides a method for generating land parcel / sea maps based on PyQGIS. Specific objectives include: I. Adapt to the exclusive sorting rules for land parcels and sea areas, and enable the boundary points to be automatically sorted from the lower left corner of the sea area unit in a counterclockwise direction, so as to solve the problem of conflict between the sorting order of land parcels and sea areas and ensure that the boundary point numbering complies with the "Technical Specifications for Compiling and Drawing Sea Area Maps". Second, the logic of prioritizing the use of sea areas is integrated, and the internal units of the sea area are sorted according to the second-level category order of the "Sea Area Use Methods" (HY / T 123), so as to realize the priority numbering of the boundary points of high-priority units and avoid duplication, thus meeting the exclusive requirements of the sea area regulations for the processing of sea area units. Third, it has the ability to recognize and process special geometric shapes such as rings and circles, and can distinguish the outer ring and inner ring of ring units, extract the center and radius of circular units, reduce the workload of manually supplementing parameters, and improve the processing efficiency of special shaped marine units. IV. Added automatic text simplification function for boundary lines, which omits the middle part of boundary points with 4 or more consecutive numbers, solves the text redundancy problem and meets the requirements for writing boundary line text in the standard. V. Establish a data linkage mechanism between the sea area and its internal units to enable multiple units under the same sea area to share the same boundary point number and automatically extract the external vertices of the overall boundary line of the sea area, ensuring that the boundary line of the internal unit is consistent with the boundary line of the sea area, and reducing the manual verification and correction process. VI. Ultimately, through fully automated processing, the time required for subsequent manual review and adjustment is reduced, the workload is decreased, the compliance and overall efficiency of processing marine land use units are improved, and the needs for large-scale and standardized marine land data processing in marine resource management are met.
[0027] Specifically, this invention, based on the PyQGIS library and the Python programming language, constructs a fully automated processing logic for marine land use units. It achieves marine land use unit classification, boundary point generation and sorting, special geometric processing, and result output through the following core steps. For example... Figure 1 As shown, the method for generating a nautical chart according to an embodiment of the present invention includes the following steps: Step 1: Environment initialization and configuration loading; Specifically, configure the QGIS environment by importing the qgis.core module (for GIS data processing), the PyQt5.QtWidgets module (for graphical interaction), and basic modules such as math and os to ensure that functions such as vector file operations, coordinate calculations, and window interactions are available.
[0028] Step 2: Input file selection and output layer creation; 2.1 Prepare the sea use unit vector file (surface type). The input file must contain four necessary fields: zonghai (sea use name), method (sea use method), content (sea use content), and area (area), as shown in Table 1. Table 1. Feature Structure of the Marine Unit Vector File 2.2 Creating the output layer: Boundary point layer (point type): Add the following fields: zonghai (text, 254 characters), number (integer, 10 digits), longitude (text, 254 characters), and latitude (text, 254 characters), as shown in Table 2; Table 2 Feature Structure of Boundary Point Layer Zonghai layer (surface type): Add the fields zonghai (text, 254 characters), area (double precision, 20 digits, 4 decimal places), and Zonghai boundary line (text, 254 characters), as shown in Table 3; Table 3. Feature Structure of the Zonghai Layer Update the layer (area type) using the sea unit: Add a line field to the input file field, and unify the precision of the area field to 20 digits and 4 decimal places, as shown in Table 4; Table 4 shows the feature structure of the layer updated using sea units. Step 3: Process the marine unit; 3.1 Classification of sea areas: Extract the unique value of the zonghai field and process them one by one for each sea area to ensure that the sea use units of the same sea area are processed in a centralized manner; 3.2 Unit Sorting: The sorting priority is set based on the coding order of the sea use method name and the secondary method in the coding table of the "Sea Area Use Classification" (HY / T123), such as "Construction Reclamation" > "Agricultural Reclamation" > ... > "Protective Forest Planting". For all sea use units under the current sea area, sorting is performed by matching the sea use method name and the coding index of the coding table according to the "method" field.
[0029] Step 4: Check using sea element geometry, such as... Figure 2 As shown, the process includes the following: 4.1 Ring Identification: Check whether the geometry of the marine unit contains an inner ring (numInteriorRings()>0); In this embodiment of the invention, the NumInteriorRings function is used to determine whether the geometry of the marine unit contains an inner ring. If the value of the NumInteriorRings function is greater than 0, that is, numInteriorRings()>0, then it contains an inner ring and is identified as a ring. If the NumInteriorRings function value is not greater than 0, then continue to identify whether it is a circle.
[0030] 4.2 Circle Recognition: Determine whether something is a circle based on three conditions: (I) The number of vertices of the outer ring of the geometric shape of the sea unit is ≥12 (i.e., the approximate expression of the circle needs enough vertices); (II) The ratio of the standard deviation to the mean of the distance from the vertex to the geometric centroid is <5% (to ensure uniform vertex distribution). (III) The average distance from the vertex to the geometric centroid is greater than 1e-6 meters (excluding extremely small invalid figures).
[0031] 4.3 Polygon determination: If it is not identified as a ring or circle, it is determined to be a polygon.
[0032] Step 5: Boundary point sorting and boundary line text generation (recognized as polygons); 5.1 Vertex Extraction: Traverse the vertices and remove duplicates by retaining a preset target number of decimal places (e.g., 6 decimal places) for the vertex coordinates, generating a list of unique boundary points; 5.2 Determination of the starting boundary point: Obtain an internal point within the polygonal enclosed area, calculate the azimuth angle between each boundary point in the boundary point list and the internal point, and find the boundary point with the smallest angle difference from the target angle at the lower left corner, which is taken as the starting boundary point; where the target angle at the lower left corner is 200-250°, for example, 225° is selected; 5.3 Boundary Point Sorting: Starting from the initial boundary point, sort the boundary points counterclockwise and assign their serial numbers to the number field; if a boundary point has already been assigned a number field, then use its serial number. 5.4 Boundary line generation: Record the sequence number of each boundary point, connect them with "-" to generate boundary line text, and add the sequence number of the starting point at the end to form a closed loop; 5.5 Simplification of boundary line text: If the numbering is continuously increasing (e.g., 1-2-3-4-5) or continuously decreasing (e.g., 9-8-7-6-5) and the length is ≥4, replace the middle part with “…” (e.g., 1-2-…-5, 9-8-…-5); 5.6 Text Writing: Assign the simplified boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit, creating update features and adding them to the layer.
[0033] Step Six: Boundary Point Sorting and Boundary Line Text Generation (Recognized as Circles); 6.1 Extraction of circle center radius: Obtain the centroid of the circle as the center, calculate the average distance Y from all vertices of the geometric shape of the sea element to the center as the radius, and record the center as the boundary point; 6.2 Numbering and Text Generation: Assign numbers to boundary points and generate boundary line text in the format of “Center point X (radius = Y meters)” (e.g., “Center point 3 (radius = 50m)”). The radius is retained to 2 decimal places and trailing zeros are removed (e.g., 50.00 is converted to 50). 6.3 Text Writing: Assign the boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit, creating update features and adding them to the layer.
[0034] Step 7: Boundary point sorting and boundary line text generation (recognized as a ring); 7.1 Outer ring processing: Extract the outer ring of the geometric shape of the sea unit, and generate the boundary points and boundary line text of the outer ring according to the process of generating boundary points and boundary line text of polygons; 7.2 Inner Ring Processing: Extract the inner ring of the geometry of the sea-use unit, and perform fuzzy matching with the processed sea-use units to determine the target condition: the area of the symmetric difference set (SymDifference area) < the preset area tolerance (e.g., a value of 0.0001m). 2 If the distance to Hausdorff is less than the preset distance tolerance (e.g., 0.0001m), a fuzzy match is performed to determine whether it is a processed sea area unit (if the target condition is met, it is determined to be a processed sea area unit); if so, its boundary line text is reused; if not, the boundary points and boundary line text of the inner ring are generated according to the process of generating boundary points and boundary line text for polygons or circles. 7.3 Boundary Line Merging: Generate boundary line text in the format of "outer ring text + remove + inner ring text" (e.g., "1-2-...-5-1 remove 6-7-...-10-6"). 7.4 Text Writing: Assign the boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit, creating update features and adding them to the layer.
[0035] Step 8: Boundary point coordinate transformation and writing; 8.1 Coordinate Transformation: Convert the boundary point coordinates from the input projected coordinate system to the geographic coordinate system, such as EPSG:4490 (2000 National Geodetic Coordinate System). Then convert the decimal latitude and longitude coordinates of the geographic coordinate system to degree, minute and second format (e.g., 120°30′45.123″), retaining 3 decimal places for the second value and padding the integer places of the minutes and seconds with zeros. 8.2 Writing Boundary Points: Create boundary point features, assign values to the fields zonghai, number, longitude, and latitude, and add them to the boundary point layer.
[0036] Step Nine: Process Zonghai, such as... Figure 3 As shown, all sea use units belonging to the same sea area are merged to obtain the sea area geometry and its area, and the area is added to the area field of the sea area layer. 9.1 Assigning a value to the zonghai field: Assigning the value of zonghai to the zonghai field; 9.1 Geometry Repair: For the geometry of each sea cell, first use makeValid() to repair validity, and then use buffer(0,5) (0 distance buffer, 5 smoothness) to repair self-intersection problems; 9.2 The geometry is merged step by step using the combine() method. After merging, the validity is checked again and a distance buffer of 0.00005 is applied to ensure that the merged Zonghai geometry has no topological errors. 9.3 Calculate the total area of the merged sea area (sum all area fields of sea use units, retain 4 decimal places), create sea area features and add them to the sea area layer.
[0037] The specific details of the geometric repair and merging described above can be found in existing technologies and will not be elaborated here.
[0038] Step 10: Generate the text for the boundary line of the sea area; 10.1 Circular and Ring-shaped Determination: Traverse all sea use units under the current sea area and determine whether they include circular or ring-shaped sea use units; 10.2.1 If so, obtain the content field of all sea-use units, remove duplicates, sort them alphabetically, and connect them with a connector symbol (e.g., "wind turbine + anchor chain"), which will be used as the value of the line field of the sea boundary line. 10.2.2 If not, extract the vertices of the Zonghai geometric shape, match the current Zonghai boundary points based on a distance < 0.00005 meters, and generate a boundary point list from the matched vertices; obtain an internal point within the area enclosed by the Zonghai geometric shape, calculate the azimuth angle between each boundary point in the boundary point list and the internal point, find the boundary point with the smallest angle difference from the target angle at the lower left corner (e.g., 225°), and use it as the starting boundary point; sort the boundary points counterclockwise starting from the starting boundary point, and assign them the value number; if a boundary point has already been assigned the value number, use its number; connect the boundary point numbers sequentially with connecting lines, and connect the starting boundary point's number at the end with a connecting line to generate boundary line text and perform the boundary line text simplification in the above polygon processing logic; 10.3 Text Writing: Assign the simplified boundary line text to the line field of the Zonghai layer.
[0039] Step 11: Save the layer; Save the three vector files sequentially: boundary point layer, sea area layer, and sea area unit update layer.
[0040] Step 12: Draw the Zonghai map; The boundary point layer, the sea area layer, and the sea use unit update layer vector files contain all the information for drawing the sea area map. Therefore, the sea area map is drawn based on the boundary point layer, the sea area layer, and the sea use unit update layer vector files. For details, please refer to existing technologies, which will not be elaborated here. Among them, the sea area map includes the sea area location map, the sea area boundary map, and the sea area plan layout map.
[0041] Based on the above-described method for generating nautical charts, this embodiment of the invention also provides a system for generating nautical charts, including the following functional modules: input module, classification module, sorting module, recognition module, generation module, assignment module, conversion module, merging module, and drawing module.
[0042] Specifically, the input module is used to input the marine unit vector file and define the projected coordinate system; The classification module is used to extract the unique value of the zonghai field for zonghai classification; The sorting module is used to process individual sea parcels one by one, and sort the sea use units of the same sea parcel according to the priority of the method field. The identification module is used to identify the geometry of marine units in order of priority. The generation module is used to generate boundary point and boundary line text; The assignment module is used to assign the boundary line text to the line field of the sea cell update layer; The conversion module is used to convert the coordinates of the boundary points from the input projected coordinate system to the geographic coordinate system, then convert the decimal latitude and longitude coordinates of the geographic coordinate system to degrees, minutes and seconds format, and assign them to the longitude and latitude fields of the boundary point layer through the assignment module. The merging module is used to merge all sea use units of the same sea area to obtain the sea area geometry and its area, and the area is assigned to the area field of the sea area layer through the assignment module. The above-mentioned generation module is also used to generate the boundary line text of the Zonghai based on the geometric shape of Zonghai, and assign the value to the line field of Zonghai boundary line through the assignment module; The drawing module is used to draw a sea area map based on the boundary point layer, the sea area layer, and the sea area use unit update layer. For detailed processing procedures of the above functional modules, please refer to the specific description in the above method for generating nautical charts, which will not be repeated here.
[0043] The computer-readable storage medium of this invention stores instructions that, when executed on a computer, cause the computer to perform the above-described method for generating territorial sea charts, thereby achieving intelligent generation of territorial sea charts and effectively improving efficiency.
[0044] This invention, based on PyQGIS, automates the entire process of marine land use unit processing. Addressing the shortcomings of existing technologies, such as reliance on manual review and adjustment, low efficiency, poor compliance, and insufficient adaptation to complex shapes, it achieves multi-dimensional value enhancement in technology, economy, and society through standardized step design and professional logic optimization. Specific effects are as follows: (1) Technical effect: It solves the core defects of existing technologies and meets the specific requirements of Zonghai specifications; Existing technologies confuse the sorting rules of land parcels and sea parcels (land parcels are sorted clockwise from the top left corner, while sea parcels are sorted counterclockwise from the bottom left corner), requiring manual re-sorting. This invention determines the starting point through "internal point + 225° azimuth matching" and ensures the counterclockwise order through "geometric area determination + vertex reversal". After testing with 100 sets of sea-use units of different shapes (rectangular, polygonal, and irregular shapes), the boundary point sorting fully complies with the requirements of the "Technical Specifications for Compiling Sea Parcel Maps", requiring no manual adjustment and improving compliance by 100% compared to existing technologies.
[0045] To address the problem that existing technologies cannot identify annular and circular marine units, this invention identifies annular units through "inner ring existence determination" and circular units through "vertex distance standard deviation + quantity threshold," and achieves separate processing of inner and outer rings and automatic extraction of the center radius of circular units. Taking a marine project containing 5 annular units (floating wind turbines), 125 circular units (offshore wind turbines), and 150 rectangular units (submarine cables) as an example, existing technologies require manual parameter supplementation, taking approximately 2 hours, while this invention only requires 10 seconds, improving processing efficiency by 720%, and meeting the accuracy requirements of marine surveying standards.
[0046] The simplified and automated boundary line text reduces redundancy by 60%. Existing technologies generate boundary line text as complete numbered sequences (e.g., 1-2-3-4-5-6-7-8-1), resulting in high redundancy. This invention reduces the text length of more than 10 boundary points by 60% (e.g., 1-2-…-8-1) through a "continuous increment / decrement determination + intermediate omission" logic (step ten). Tested on 50 sets of multi-vertex sea cells (10-20 boundary points), the average number of characters in the text decreased from 45 characters to 18 characters, with no omission errors.
[0047] The consistency between the data of the marine area and its internal units has been improved to 100%. Existing technologies, lacking a data linkage mechanism, suffer from a 20% conflict rate between the boundary point numbers of internal units and the marine area, requiring manual verification. This invention achieves shared boundary point numbers for multiple units within the same marine area through a "marginal area-level boundary point dictionary" and generates marine area boundary lines through "marginal area external contour vertex filtering + existing number matching." Tested on 30 marine area projects containing 3-8 internal units, the boundary point numbers of internal units and the marine area are completely consistent with each other, with no conflicts. The consistency is 100% higher than existing technologies.
[0048] (2) Economic benefits: Significantly reduces labor costs and improves project processing efficiency; The manual workload is reduced by 80%, and the time cost is significantly reduced. Existing technologies require manual sorting, text simplification, and data verification for processing a single marine project (including 10 marine use units), which takes an average of about 3 hours. This invention automates the entire process (from file input to result output without manual intervention), reducing the processing time for a single project to 0.5 hours and reducing the manual workload by 70%.
[0049] The error rate is reduced by 95%, and the rework cost is almost eliminated. Existing technologies are prone to problems such as sorting errors, text format errors, and numbering conflicts due to manual operation, with a rework rate of about 20% and an average rework time of 2 hours per project. This invention avoids delays in the maritime rights confirmation process caused by data errors through mechanisms such as "field verification, geometric repair, and numbering reuse".
[0050] (3) This invention supports the standardized and large-scale application of marine resource management; Adapting to marine management regulations and promoting data standardization, this invention strictly follows industry standards such as the "Classification of Marine Use" and the "Technical Specifications for Compiling Marine Maps". The output "Boundary Point.shp", "Marine Area.shp", and "Marine Use Unit_Update.shp" files can be directly connected to the National Marine Area Use Dynamic Monitoring and Management System without the need for format conversion, thus promoting the standardization of marine area data.
[0051] In summary, this invention, through specialized technical design, completely solves the problems of compliance, efficiency, and adaptability of existing technologies in marine resource processing. Verified by actual projects, it can achieve marine resource processing with "zero manual adjustment, high accuracy, and high compatibility," providing key technical support for marine resource management.
[0052] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating a nautical chart, characterized in that, Includes the following steps: S1. Input the sea area unit vector file and define the projected coordinate system; the sea area unit vector file includes the following fields: sea area name (zonghai), sea area use method (method), sea area use content (content), and area (area); S2. Extract the unique value of the zonghai field to classify the zonghai, and process them one by one. For the same zonghai, sort the sea use units according to the priority of the method field. S3. Based on priority, identify the geometry of the sea use units and generate boundary point and boundary line text; among them, the geometry of the sea use units is identified as ring, circle or polygon. Assign the boundary line text to the boundary line field of the sea use unit update layer; the sea use unit update layer also includes the following fields: sea name (zonghai), sea use method (method), sea use content (content), and area (area); Convert the coordinates of the boundary points from the input projected coordinate system to the geographic coordinate system, then convert the decimal latitude and longitude coordinates of the geographic coordinate system to degrees, minutes, and seconds format, and assign them to the longitude and latitude fields of the boundary point layer; the boundary point layer also includes the following fields: Zonghai name and number. S4. Merge all sea use units of the same sea area to obtain the geometric shape and area of the sea area, and assign the area to the area field of the sea area layer; the sea area layer also includes the following fields: sea area name zonghai, sea area boundary line field; Generate the boundary line text of Zonghai based on the geometric shape of Zonghai and assign it to the line field of Zonghai boundary line; S5. Draw the sea map based on the boundary point layer, the sea area layer, and the updated layer of the sea use unit. The method for identifying the ring is as follows: The NumInteriorRings function is used to determine whether the geometry of the marine unit contains an inner ring. If the NumInteriorRings function value is greater than 0, it contains an inner ring and is identified as a ring. If the NumInteriorRings function value is not greater than 0, continue to identify whether it is a circle; The method for identifying the circle is as follows: Determine whether the following three objective conditions are met: (I) The number of vertices of the outer ring of the geometry of the sea unit is ≥12; (II) The ratio of the standard deviation to the mean of the distance from the vertex to the geometric centroid is <5%; (III) The average distance from the vertex to the geometric centroid is >1e-6 meters; If yes, it is identified as a circle; otherwise, it is identified as a polygon.
2. The method for generating nautical charts according to claim 1, characterized in that, If the geometry of the sea element is identified as a polygon, the process of generating boundary point and boundary line text includes: Extract the vertices of the geometry of the marine unit, and remove duplicates by retaining a preset target number of decimal places for the coordinate values of the vertices, generating a list of boundary points without repetition; Obtain an interior point within the polygonal enclosed area, calculate the azimuth angle between each boundary point in the boundary point list and the interior point, and find the boundary point with the smallest angle difference from the target angle at the lower left corner, and use it as the starting boundary point. Starting from the initial boundary point, sort the boundary points counterclockwise and assign their sequence numbers to the number field; if a boundary point already has a number field assigned, then use its sequence number. Connect the boundary point numbers sequentially with connectors, and connect the starting boundary point number at the end with a connector to generate the boundary line text.
3. The method for generating nautical charts according to claim 2, characterized in that, After generating the boundary line text, the boundary line text is further simplified: If the boundary line text contains a sequence of consecutive increments of 1 or consecutive decrements of 1 with a length ≥ 4, then ellipses are used to replace the 3rd to the 4th sequence. N -1 is the sequence number part; where, N The length of the sequence number segment; Assign the simplified boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit and adding them to the sea use unit update layer.
4. The method for generating nautical charts according to claim 2, characterized in that, If the geometry of the sea cell is identified as circular, the process of generating boundary point and boundary line text includes: Obtain the centroid of the circle as the center, calculate the average distance Y from all vertices of the geometric shape of the sea element to the center as the radius, and record the center as the boundary point; Assign a number X to the boundary point and generate boundary line text with a preset target format of boundary point X (radius = Y meters); Assign the boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit and adding them to the sea use unit update layer.
5. The method for generating nautical charts according to claim 4, characterized in that, If the geometry of the sea cell is identified as a ring, the process of generating boundary point and boundary line text includes: Extract the outer ring of the geometric shape of the sea unit, and generate the boundary points and boundary line text of the outer ring according to the process of generating boundary points and boundary line text of polygons. Extract the inner ring of the geometry of the sea use unit. Determine whether it is a processed sea use unit by performing a fuzzy match between the area of the symmetric difference set (SymDifference area < preset area tolerance) or the Hausdorff distance (Hausdorff Distance < preset distance tolerance). If it is, reuse its boundary line text. If not, generate the boundary points and boundary line text of the inner ring according to the process of generating boundary points and boundary line text for polygons or circles. Merge the boundary line text of the outer ring with the boundary line text of the inner ring to generate the target boundary line text with the preset target format "outer ring text + removed + inner ring text"; Assign the target boundary line text to the line field of the sea use unit update layer, while retaining the original zonghai, method, content, and area field values of the sea use unit and adding them to the sea use unit update layer.
6. The method for generating nautical charts according to claim 5, characterized in that, In step S4, generating the boundary line text of the Zonghai sea area based on the geometric shape of the sea area includes: Traverse all sea use units under the current sea area and determine whether they include circular or annular sea use units; If so, retrieve the content field of all sea-use units, remove duplicates, sort them alphabetically, and connect them with a connector symbol to serve as the value of the line field of the sea boundary line. If not, extract the vertices of the Zonghai geometric shape, match the current Zonghai boundary points based on a distance < 0.00005 meters, and generate a boundary point list from the matched vertices; obtain an internal point within the area enclosed by the Zonghai geometric shape, calculate the azimuth angle between each boundary point in the boundary point list and the internal point, find the boundary point with the smallest angle difference from the target angle at the lower left corner, and use it as the starting boundary point; sort the boundary points counterclockwise starting from the starting boundary point and assign them the value number; if a boundary point has already been assigned the value number, use its number; connect the boundary point numbers sequentially with connecting lines, and connect the starting boundary point's number at the end with a connecting line to generate the boundary line text and assign it to the Zonghai boundary line field of the Zonghai layer.
7. A system for generating nautical charts, using the method for generating nautical charts as described in claim 1, characterized in that, The generation system includes: The input module is used to input the sea use unit vector file and define the projected coordinate system; the sea use unit vector file includes the following fields: sea area name (zonghai), sea use method (method), sea use content (content), and area (area); The classification module is used to extract the unique value of the zonghai field for zonghai classification; The sorting module is used to process individual sea parcels one by one, and sort the sea use units of the same sea parcel according to the priority of the method field. The identification module is used to identify the geometry of the sea use units in order of priority; wherein the geometry of the sea use units is identified as ring, circle or polygon. The generation module is used to generate boundary point and boundary line text; The assignment module is used to assign the boundary line text to the boundary line field of the sea use unit update layer; the sea use unit update layer also includes the following fields: sea name (zonghai), sea use method (method), sea use content (content), and area (area); The conversion module is used to convert the coordinates of the boundary points from the input projected coordinate system to the geographic coordinate system, and then convert the decimal latitude and longitude coordinates of the geographic coordinate system to degrees, minutes and seconds format. The values are then assigned to the longitude and latitude fields of the boundary point layer through the assignment module. The boundary point layer also includes the following fields: Zonghai name and number. The merging module is used to merge all sea use units of the same sea area to obtain the geometric shape and area of the sea area, and to assign the area to the area field of the sea area layer through the assignment module. The sea area layer also includes the following fields: sea area name (zonghai) and sea area boundary line (line). The generation module is also used to generate the boundary line text of the Zonghai according to the geometric shape of Zonghai, and assign the value to the line field of Zonghai boundary line through the assignment module. The drawing module is used to draw a marine map based on the boundary point layer, the marine area layer, and the marine use unit update layer.
8. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed on a computer, the computer performs the method for generating a nautical chart as described in any one of claims 1-6.
Citation Information
Patent Citations
Projection diagrammatizing based measurement method of 3D property right body space boundary point
CN107144265A
Automatic drawing method for religious boundary map and boundary point
CN120707694A