S-101 electronic chart parsing and drawing method, system, device and medium
By deeply analyzing S-101 electronic nautical chart data, drawing instructions compatible with S-57 are generated, solving the problems of insufficient autonomous controllability and lack of analytical depth. This enables accurate display and flexible updating of nautical chart information, reducing maritime safety risks.
Patent Information
- Application Number
- CN202511403238.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-29
AI Technical Summary
The existing S-101 electronic nautical chart analysis and drawing methods suffer from insufficient autonomy and controllability, lack of analysis depth, poor adaptability and flexibility, and lack of compatibility. This results in inconsistent chart display effects, inflexible information updates, and an inability to accurately reflect key information about the marine geographical environment, thereby increasing maritime safety risks.
By using technical means to analyze thematic nautical charts, including loading basic information from electronic nautical charts, generating drawing instructions using Lua language and graphic center points, and generating graphic drawing instructions compatible with S-101 electronic nautical charts and S-57, autonomous controllability and in-depth analysis are achieved.
The generated S-101 electronic nautical chart can accurately reflect key information about the marine geographical environment, reduce the risk of collisions and grounding, and ensure the safety and efficiency of maritime operations.
Smart Images

Figure CN120892510B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic chart, and particularly relates to an S-101 electronic chart parsing and drawing method, system, device and medium. BACKGROUND
[0002] The S-101 standard is developed by the International Hydrographic Organization (IHO) as the core specification of the new generation of electronic chart products, which is rooted in the S-100 general hydrographic data model and aims to provide highly dynamic and fully interoperable chart data services. The S-101 standard not only lays the foundation for the basic layers of electronic charts, but also provides a solid support platform for other interoperable products based on the S-100 standard. Compared with the traditional S-57 standard, S-101 introduces more complex attribute descriptions, geometric concepts, and efficient data dynamic transmission mechanisms, significantly improving user experience and data application flexibility. In addition, S-101 strictly regulates the naming specification of ENC, data size limit, and loading and visualization strategy in Electronic Chart and Information System (ECDIS), ensuring the standardization and compatibility of data. The relationship between elements, attributes and enumeration values in S-101 is defined in a single element catalog. The construction of the element catalog is based on the registration set, which defines the data content and stores it in machine-readable XML format, so it allows ECDIS to easily upgrade existing onboard systems through XML files. Under the S-100 framework, the registration content can be continuously changed, and the element and portrayal catalog of S-101 can be updated version by version without changing the XML structure of the catalog standard, which allows IHO to take advantage of dynamic registration and design all updates through standardized processes, ensuring efficiency and standardization. However, the existing electronic chart parsing and drawing method based on the S-57 standard has some shortcomings: data compatibility is insufficient, conversion between different standards and formats is difficult, and information loss or display errors may occur when cross-system applications; the symbolization rule adaptability is poor, and it cannot flexibly adapt to the symbolization rules of various geographic features, resulting in inconsistent display effects of the drawn chart; data updating is not flexible, and it cannot well combine the dynamic expansion of electronic charts to provide the latest chart information for mariners in a timely manner. Existing S-101 parsing tools mostly rely on foreign commercial components, and the core parsing logic and drawing algorithm are not open, so mariners cannot adjust the parsing rules according to the special sea area requirements. S-101 data includes FeatureCatalogue (feature definition), Portrayal_catalogue.xml (feature drawing parameters), and 000 files (feature spatial data). Most existing methods only implement the surface parsing of 000 files and do not establish the association mapping of 'feature definition-drawing parameters-spatial attributes', resulting in feature display that does not comply with the S-101 standard. Lua is the core generation tool for S-101 drawing instructions, and existing solutions do not implement real-time calling of feature spatial attributes through Lua, resulting in drawing instructions that cannot dynamically adapt to feature updates. SUMMARY
[0003] The present application aims to at least solve one of the technical problems existing in the related art. To this end, the present application provides an S-101 electronic chart parsing and drawing method, system, device and medium, which solves the problems of lack of autonomy and controllability, lack of parsing depth, poor adaptive flexibility and lack of compatibility in the current S-101 electronic chart parsing and drawing field. The S-101 electronic chart drawn can accurately reflect the key information of the marine geographical environment, such as the position of obstacles and the range of navigable waters, providing reliable decision-making reference for ship navigation, marine engineering operation and other scenarios, reducing the safety risks such as collision and grounding caused by inaccurate chart information, and ensuring the safety and efficiency of marine operations.
[0004] The present application provides an S-101 electronic chart parsing and drawing method, comprising:
[0005] S1: loading electronic chart basic information and drawing repository, obtaining graph center point and chart setting information, and generating chart drawing parameters according to the drawing repository;
[0006] S2: parsing FeatureCatalogue file definition, obtaining the type, attribute, association and symbolization rule of the elements in the electronic chart;
[0007] S3: parsing FeatureCatalogue file definition, obtaining the type, attribute, association and symbolization rule of the elements in the electronic chart;
[0008] S4: parsing S-101 corresponding FeatureCatalogue file definition, obtaining the spatial element record of the electronic chart, and extracting geographical element information and its associated information according to the spatial element record;
[0009] S5: according to the type, attribute, association and symbolization rule of the elements in the electronic chart, the symbolization rule and style of the map elements in the electronic chart, the geographical element information and its associated information, generating drawing instructions through Lua language and main program joint;
[0010] S6: parsing the drawing instructions, and drawing the S-101 electronic chart according to the chart drawing parameters, graph center point and chart setting information.
[0011] Further, the drawing repository includes a color library, an SVG library, a line shape library and a surface shape library. The color drawing parameters are generated from the color library, the point symbol drawing parameters are generated from the SVG library, the line symbol drawing parameters are generated from the line shape library, and the surface symbol drawing parameters are generated from the surface shape library.
[0012] Further, the S2 step comprises:
[0013] FeatureCatalogue file definition parsing, which includes parsing the version and scope of the file;
[0014] attribute analysis including simple attribute analysis and complex attribute analysis according to the version and the scope of application of the file;
[0015] association analysis including role analysis, information association analysis and element association analysis according to the version and the scope of application of the file;
[0016] type analysis including information type analysis and element type analysis according to the version and the scope of application of the file;
[0017] According to the attribute, association and type of the elements in the electronic chart, the symbolization rule of each element in the electronic chart is determined.
[0018] Further, the S4 step includes:
[0019] reference function analysis including analysis of dataset general information record, dataset coordinate system reference system record and information record;
[0020] spatial element record analysis including analysis of point record, multi-point record, curve record, combined curve record, surface record and element type record according to the dataset general information record, dataset coordinate system reference system record and information record;
[0021] association attribute including analysis of geographical element information and its association information including land contour, channel, lighthouse, buoy and depth point through target association according to the point record, multi-point record, curve record, combined curve record, surface record and element type record, the target association being searching for associated spatial elements from the target.
[0022] Further, the analysis of geographical element information and its association attribute through target association includes:
[0023] S41: locating the spatial element association field associated with the target and dividing the spatial element association field into associated point, associated multi-point, associated curve, associated combined curve and associated surface according to the type;
[0024] S42: associating the ring association field through the spatial element association field, searching for the curve association field through the ring association field and searching for the point association field according to the curve association field;
[0025] S43: repeating the S42 step to complete searching for all associated points, associated multi-points, associated curves, associated combined curves and associated surfaces related to the target.
[0026] Further, the S5 step includes:
[0027] The main program extracts chart core data through a main program header function, and the chart core data includes target ID, information ID, spatial correlation information of point elements, spatial correlation information of line elements and spatial correlation information of surface elements;
[0028] The main program delivers the chart core data to a Lua program, and the Lua program receives the chart core data and stores it in a stack temporarily;
[0029] The main program registers a host name interaction function to the Lua program through the main program header function according to the chart core data, and the Lua program registers a host function according to the host name interaction function and the chart core data;
[0030] The main program calls the Lua program according to the host name interaction function, and obtains a first intermediate drawing instruction;
[0031] The Lua program calls a Lua internal function, the Lua internal function calls the host function and a Lua header function, and then calls the host function again to obtain a second intermediate drawing instruction;
[0032] The first intermediate drawing instruction and the second intermediate drawing instruction are fused to obtain a drawing instruction.
[0033] Further, the symbolization rule of S-101 is generated into a vector symbol compatible with S-57, and different drawing instructions are issued according to the differences of point, line and surface elements, and the point, line and surface graphic drawing includes:
[0034] The point drawing is rendered and drawn through an SVG file;
[0035] The complex line shape is drawn by first drawing all simple line shapes in the complex line shape, and inserting a point object according to the rotation direction;
[0036] When there is less than one complete simple line shape, the length is calculated during drawing, and the drawing is stopped when the target point is reached;
[0037] The surface drawing is drawn by calculating the length and width of the surface shape, and sequentially filling points from the left to the right and the bottom edge according to the rules;
[0038] When there is less than one complete surface shape, the length and height are calculated during filling, and the point is filled to the lower right corner to stop.
[0039] The application also provides an S-101 electronic chart parsing and drawing system for executing the above-mentioned S-101 electronic chart parsing and drawing method, which comprises:
[0040] A generation module loads electronic chart basic information and a drawing resource library, obtains a graphic center point and chart setting information, and generates chart drawing parameters according to the drawing resource library;
[0041] A first parsing module parses the object mark definition file to obtain the type, attribute, association and symbolization rule of the element in the electronic chart;
[0042] A second parsing module parses the object mark drawing parameter file to obtain the symbolization rule and style of the map element in the electronic chart;
[0043] A third parsing module parses the S-101 corresponding object mark space data file to obtain the spatial element record of the electronic chart, and extracts the geographic element information and its associated information according to the spatial element record;
[0044] A drawing instruction module generates drawing instructions by combining the Lua language with the main program according to the type, attribute, association and symbolization rule of the element in the electronic chart, the symbolization rule and style of the map element in the electronic chart, and the geographic element information and its associated information.
[0045] A drawing module parses the drawing instructions and draws the S-101 electronic chart according to the chart drawing parameters, the graph center point and the chart setting information.
[0046] The application further provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the S-101 electronic chart parsing and drawing method.
[0047] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of the S-101 electronic chart parsing and drawing method.
[0048] The one or more technical solutions in the embodiments of the application have at least one of the following technical effects:
[0049] The application realizes deep analysis of S-101 electronic chart data from the bottom layer by the steps of S-101 data preloading, analyzing FeatureCatalogue file, analyzing Portrayal_catalogue.xml file, analyzing 000 file, obtaining spatial association attributes such as points, curves and surfaces associated with targets, inputting and executing through Lua and forming drawing instructions, generating S-101 and S-57 compatible drawing instructions, etc., generates S-101 electronic chart and S-57 compatible drawing instructions through Lua input and execution under full autonomous controllable conditions, completes S-101 electronic chart data standardized display and control operation, and completes chart drawing. The application specifically solves the problems of insufficient autonomous controllability, lack of analysis depth, poor adaptive flexibility and lack of compatibility in the current S-101 electronic chart analysis and drawing field, and the drawn S-101 electronic chart can accurately reflect key information of marine geographical environment, such as obstacle position and navigable water area range, thereby providing reliable decision reference for ship navigation, marine engineering operation and other scenes, reducing safety risks such as collision and grounding caused by inaccurate chart information, and ensuring safety and efficiency of marine operation.
[0050] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following description and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0052] Figure 1 is a flowchart of an S-101 electronic chart analysis and drawing method provided by the application.
[0053] Figure 2 is a structural schematic diagram of an S-101 electronic chart analysis and drawing system provided by the application.
[0054] Figure 3 is a block diagram of an electronic device provided by the application.
[0055] Reference signs:
[0056] 101, generation module; 102, first analysis module; 103, second analysis module; 104, third analysis module; 105, drawing instruction module; 106, drawing module; 201, processor; 202, communication bus; 203, communication interface; 204, memory. DETAILED DESCRIPTION
[0057] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application. The following embodiments are used to illustrate the present application, but cannot be used to limit the scope of the present application.
[0058] In the description of the present specification, the description of the terms “one embodiment”, “some embodiments”, “an example”, “a specific example” or “some examples” means that the specific features, structures, materials or characteristics described in combination with the embodiment or example are contained in at least one embodiment or example of the embodiments of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the different embodiments or examples described in the present specification and the features of the different embodiments or examples can be combined and combined by those skilled in the art without contradiction.
[0059] The technical solutions in the embodiments of the present application will be described below in combination with Figures 1 to 3 A S-101 electronic chart parsing and drawing method, system, device and medium are described.
[0060] As Figure 1 shown, a S-101 electronic chart parsing and drawing method comprises:
[0061] S1: loading electronic chart basic information and drawing resources, obtaining a graphic center point and chart setting information, and generating chart drawing parameters according to the drawing resources;
[0062] The electronic chart basic information comprises a chart graphic center point and chart configuration, and the chart configuration comprises scale, coordinate system adaptation rules and other positioning information;
[0063] The drawing resources comprise a color library, an SVG library, a line shape library and a surface shape library, color drawing parameters are generated from the color library, point symbol drawing parameters are generated from the SVG library, line symbol drawing parameters are generated from the line shape library, and surface symbol drawing parameters are generated from the surface shape library.
[0064] S2: parsing a target definition file to obtain the type, attribute, association and symbolization rules of the elements in the electronic chart;
[0065] The FeatureCatalogue file parsing includes FeatureCatalogue file definition parsing, attribute parsing, association parsing and type parsing;
[0066] The FeatureCatalogue file definition parsing includes parsing the version and scope of application of the file;
[0067] The attribute parsing includes simple attribute parsing and complex attribute parsing according to the version and scope of application of the file;
[0068] The association parsing includes role parsing, information association parsing and element association parsing according to the version and scope of application of the file;
[0069] The type parsing includes information type parsing and element type parsing according to the version and scope of application of the file;
[0070] The symbolization rules of each element in the electronic chart are determined according to the type, attribute and association of the elements in the electronic chart;
[0071] Through parsing the FeatureCatalogue file, data compatibility and consistency between different systems can be ensured.
[0072] S3: Parse the object drawing parameter file to obtain the symbolization rules and styles of the map elements in the electronic chart;
[0073] Parse the color table, symbol definition, style rule, line definition, surface filling, view grouping, base mode, view grouping layer, display mode, display plane and content association.
[0074] Parse the Portrayal_catalogue.xml file unique to the S-101 electronic chart format to obtain the symbolization rules and styles of the map elements, and parse how to display different geographic elements (such as roads, rivers, buildings, etc.) on the map. The specific parsing content includes color table, symbol definition, style rule, line definition, surface filling, view grouping, base mode, view grouping layer, display mode, display plane and content.
[0075] Parsing the symbolization rules and styles of the map elements can ensure that different geographic elements are correctly displayed on the map.
[0076] S4: Parse the object space data file corresponding to S-101 to obtain the spatial element records of the electronic chart, and extract geographic element information and its associated information according to the spatial element records;
[0077] The reference function of the object space data file is mainly parsed, including reference function parsing, spatial element record parsing and associated attribute;
[0078] The reference function analysis includes analyzing dataset general information, dataset coordinate system reference system, and information record;
[0079] The spatial element record analysis includes analyzing point record, multi-point record, curve record, combined curve record, surface record, and element type record according to dataset general information record, dataset coordinate system reference system record, and information record;
[0080] The associated attribute includes analyzing geographic element information and its associated information by object target association according to point record, multi-point record, curve record, combined curve record, surface record, and element type record, wherein the geographic element information includes land contour, channel, lighthouse, buoy, and water depth point, and the object target association is to find associated spatial elements from the object target;
[0081] The object target association mainly includes querying point, curve, surface, and other spatial associated information associated with the object target, further associating ring associated field, curve associated field, and point associated field through reference record name, and deeply mining complex multi-layer data structure to accurately extract land contour, channel, lighthouse, buoy, water depth point, and other information and its associated information.
[0082] After the relevant spatial associated information is queried, the Lua language is selected to utilize the general data model of S-101 to associate the object target and its attribute information, and finally generate high-precision, high-dynamic, and strong interactive operation drawing instructions based on the advantages of Lua, such as light weight, less resource occupation, strong cross-platform compatibility, flexible integration and expansion, dynamic updating and interaction, etc.
[0083] The geographic element information and its associated attribute are analyzed through the object target association, including:
[0084] S41: Positioning the spatial element associated field associated with the object target, and dividing the spatial element associated field into associated point, associated multi-point, associated curve, associated combined curve, and associated surface according to the type;
[0085] S42: Associating the ring associated field through the spatial element associated field, finding the curve associated field through the ring associated field, and finding the point associated field according to the curve associated field;
[0086] S43: Repeating the S42 step to complete the finding of all associated points, associated multi-points, associated curves, associated combined curves, and associated surfaces associated with the object target.
[0087] S5: Generating the drawing instruction through the Lua language and the main program according to the type, attribute, relationship, and symbolization rule of the element in the electronic chart, the symbolization rule and style of the map element in the electronic chart, and the geographic element information and its associated information;
[0088] The main program extracts chart core data through a main program header function, and the chart core data includes target ID, information ID, spatial correlation information of point elements, spatial correlation information of line elements, and spatial correlation information of surface elements;
[0089] The main program delivers the chart core data to a Lua program, and the Lua program receives the chart core data and stores it in a stack temporarily;
[0090] The main program registers a host name interaction function to the Lua program through the main program header function according to the chart core data, and the Lua program registers a host function according to the host name interaction function and the chart core data;
[0091] The main program calls the Lua program according to the host name interaction function, and obtains a first intermediate drawing instruction;
[0092] The Lua program calls a Lua internal function, the Lua internal function calls the host function and a Lua header function, and then calls the host function again to obtain a second intermediate drawing instruction;
[0093] The first intermediate drawing instruction and the second intermediate drawing instruction are fused to obtain a drawing instruction.
[0094] S6: Analyzing the drawing instruction, and drawing the S-101 electronic chart according to chart drawing parameters, a graph center point and chart setting information;
[0095] The symbolization rule of S-101 is generated to be compatible with the vector symbol of S-57, and different drawing instructions are issued according to the differences of point, line and surface elements, and the point, line and surface graph drawing includes:
[0096] The point drawing is rendered and drawn through an SVG file;
[0097] The complex line shape is drawn by first drawing all simple line shapes in the complex line shape, and inserting a point object according to the rotation direction;
[0098] When there is not one complete simple line shape, the length is calculated during drawing, and the drawing is stopped when the target point is reached;
[0099] The surface drawing is drawn by calculating the length and width of the surface shape, and sequentially filling points from the left to the right and the bottom according to the rules;
[0100] When there is not one complete surface shape, the length and height are calculated during filling, and the point is filled to stop at the lower right corner.
[0101] S-57 electronic chart and S-101 electronic chart have essential differences in format, S-101 electronic chart directly generates drawing instructions through the general data model given by IHO, and S-57 is drawn according to the object type, position and vector symbol information obtained by analyzing the 000 file, the symbolization rule of S-101 is used to generate S-57 compatible vector symbols, and different drawing instructions are issued according to the differences of point, line and surface elements.
[0102] As shown in Figure 2 , an S-101 electronic chart parsing and drawing system is used to execute an S-101 electronic chart parsing and drawing method, which comprises:
[0103] The generation module 101 loads the electronic chart basic information and the drawing resource library, obtains the graph center point and the chart setting information, and generates the chart drawing parameters according to the drawing resource library;
[0104] The first parsing module 102 parses the object definition file to obtain the type, attribute, association and symbolization rule of the elements in the electronic chart;
[0105] The second parsing module 103 parses the object drawing parameter file to obtain the symbolization rule and style of the map elements in the electronic chart;
[0106] The third parsing module 104 parses the S-101 corresponding object space data file to obtain the spatial element record of the electronic chart, and extracts the geographic element information and its associated information according to the spatial element record;
[0107] The drawing instruction module 105 generates drawing instructions through Lua language and main program according to the type, attribute, relationship and symbolization rule of the elements in the electronic chart, the symbolization rule and style of the map elements in the electronic chart, the geographic element information and its associated information;
[0108] The drawing module 106 parses the drawing instructions and draws the S-101 electronic chart according to the chart drawing parameters, the graph center point and the chart setting information.
[0109] Figure 3 An example of a block diagram of an electronic device is shown in Figure 3 , which can include a processor 201, a communications interface 203, a memory 204 and a communication bus 202, wherein the processor 201, the communications interface 203 and the memory 204 complete mutual communication through the communication bus 202. The processor 201 can call the logical instructions in the memory 204 to execute an S-101 electronic chart parsing and drawing method.
[0110] Moreover, the logic instructions in the memory 204 described above can be implemented in the form of software function units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0111] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute an S-101 electronic chart parsing and drawing method provided by the above-mentioned methods.
[0112] In yet another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement an S-101 electronic chart parsing and drawing method provided by the above-mentioned methods.
[0113] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0114] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus necessary general hardware platforms, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions essentially or the parts that make contributions to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0115] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the same; although the present application has been described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An S-101 electronic chart interpretation plotting method, characterized by, The method comprises the following steps: S1: loading electronic chart basic information and drawing resource library, obtaining the graphic center point and chart setting information, and generating chart drawing parameters according to the drawing resource library; S2: analyzing the feature definition file to obtain the type, attribute, association and symbolization rule of the feature in the electronic chart; S3: analyzing the feature drawing parameter file to obtain the symbolization rule and style of the map feature in the electronic chart; S4: analyzing the S-101 corresponding feature space data file to obtain the spatial feature record of the electronic chart, and extracting geographic feature information and its associated information according to the spatial feature record; S5: generating drawing instructions through Lua language and main program combination according to the type, attribute, association and symbolization rule of the feature in the electronic chart, the symbolization rule and style of the map feature in the electronic chart, and the geographic feature information and its associated information; S6: analyzing the drawing instructions, and drawing the S-101 electronic chart according to the chart drawing parameters, the graphic center point and the chart setting information.
2. The S-101 electronic chart rendering method according to claim 1, wherein, The drawing resource library comprises a color library, an SVG library, a line shape library and a surface shape library, color drawing parameters are generated from the color library, point symbol drawing parameters are generated from the SVG library, line symbol drawing parameters are generated from the line shape library, and surface symbol drawing parameters are generated from the surface shape library.
3. The S-101 electronic chart rendering method of claim 1, wherein, The step S2 comprises: FeatureCatalogue file definition analysis, which comprises analyzing the version and scope of application of the file; attribute analysis, which comprises simple attribute analysis and complex attribute analysis according to the version and scope of application of the file; association analysis, which comprises role analysis, information association analysis and feature association analysis according to the version and scope of application of the file; type analysis, which comprises information type analysis and feature type analysis according to the version and scope of application of the file; The symbolization rule of each feature in the electronic chart is determined according to the attribute, association and type of the feature in the electronic chart.
4. The S-101 electronic chart rendering method of claim 1, wherein, The step S4 comprises: reference function analysis, which comprises analyzing the dataset general information record, dataset coordinate system reference system record and information record; spatial feature record analysis, which comprises analyzing point record, multi-point record, curve record, combined curve record, surface record and feature type record according to the dataset general information record, dataset coordinate system reference system record and information record; associated attribute, which comprises analyzing geographic feature information and its associated information through feature association according to the point record, multi-point record, curve record, combined curve record, surface record and feature type record, wherein the geographic feature information comprises land contour, channel, lighthouse, buoy and depth point, and the feature association is to find the associated spatial feature from the feature.
5. The S-101 electronic chart rendering method according to claim 4, wherein, The analysis of the geographic feature information and its associated attribute through the feature association comprises: S41: positioning the spatial feature association field associated with the feature, and dividing the spatial feature association field into associated point, associated multi-point, associated curve, associated combined curve and associated surface according to the type; S42: find the point association field according to the curve association field through the ring association field associated with the space element association field; S43: repeat S42 to find all the associated points, associated multiple points, associated curves, associated combined curves and associated surfaces related to the target.
6. The S-101 electronic chart rendering method according to claim 1, wherein, S5 includes: The main program extracts the chart core data through the main program header function, and the chart core data includes target ID, information ID, spatial association information of point elements, spatial association information of line elements, and spatial association information of surface elements; The main program delivers the chart core data to the Lua program, and the Lua program receives the chart core data and stores it in the stack temporarily; The main program registers the host name interaction function to the Lua program through the main program header function according to the chart core data, and the Lua program registers the host function according to the host name interaction function and the chart core data; The main program calls the Lua program according to the host name interaction function to obtain the first intermediate drawing instruction; The Lua program calls the Lua internal function, and the Lua internal function calls the host function and the Lua header function and then calls the host function again to obtain the second intermediate drawing instruction; The first intermediate drawing instruction and the second intermediate drawing instruction are fused to obtain the drawing instruction.
7. The S-101 electronic chart rendering method according to claim 1, wherein, The symbolization rule of S-101 is generated to be compatible with the vector symbol of S-57, and different drawing instructions are issued according to the differences of point, line and surface elements. The point, line and surface graphics drawing includes: Point drawing is rendered and drawn through an SVG file; Complex line is drawn by first drawing all simple lines in the complex line, inserting point objects according to the rotation direction; When there is not enough one complete simple line, the length is calculated during drawing, and the drawing stops at the target point; Surface drawing is filled from left to right and bottom according to the rules by calculating the length and width of the surface shape; When there is not enough one complete surface shape, the length and height are calculated during filling, and the point is filled to the right bottom corner.
8. An S-101 electronic chart parsing and rendering system, characterized by, An S-101 electronic chart parsing and drawing method is executed, including: A generation module loads electronic chart basic information and drawing resources to obtain a graphic center point and chart setting information, and generates chart drawing parameters according to the drawing resources; A first parsing module parses a target definition file to obtain the type, attribute, association and symbolization rule of the elements in the electronic chart; A second parsing module parses a target drawing parameter file to obtain the symbolization rule and style of the map elements in the electronic chart; A third parsing module parses the S-101 corresponding target space data file to obtain the spatial element record of the electronic chart, and extracts geographic element information and its association information according to the spatial element record; A drawing instruction module generates drawing instructions through Lua language and the main program according to the type, attribute, association and symbolization rule of the elements in the electronic chart, the symbolization rule and style of the map elements in the electronic chart, and the geographic element information and its association information. The drawing module parses the drawing instruction, and draws the S-101 electronic chart according to the chart drawing parameter, the graphic center point and the chart setting information.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the S-101 electronic chart parsing and drawing method according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the steps of the S-101 electronic chart parsing and drawing method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Ship collision risk pre-warning system and method
CN108281043A
Electronic chart analysis display method based on PyQGIS development system
CN115994234A