Vector map display method and system under VxWorks system
By combining MITAB library parsing and SQLite3 database with the Qt framework, the data compatibility and rendering efficiency issues of the VxWorks system in embedded map display are solved, high-precision vector map display and interaction are achieved, and the demand for high-precision real-time geographic information services is met.
Patent Information
- Application Number
- CN202510770742.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-19
AI Technical Summary
The VxWorks system lacks vector data processing capabilities in embedded map displays, resulting in insufficient coordinate accuracy, difficulties in spatial analysis, and inconsistent benchmarks when fusing multi-source data, making it unable to meet the needs of high-precision real-time geographic information services.
The MITAB library is used to parse vector map source files and build an SQLite3 geographic information database. Combined with the Qt framework and VxWorks system, a cross-platform data middle layer design is implemented, which supports multi-level view windows and overlay management, and dynamically renders interactive vector maps through layer priority scheduling strategy.
It improves data compatibility and rendering efficiency, achieves high-precision vector map display, supports multiple projection conversions and user interactions, and reduces resource usage and development cycle.
Smart Images

Figure CN120670074A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of embedded maps, and in particular to a vector map display method and system under a VxWorks system. Background Art
[0002] As a visual carrier of spatial situation information, digital maps can organically integrate complex geographic spatial data, sensor information and dynamic elements, providing operators with an intuitive space-time reference framework.
[0003] Traditional embedded systems often use the VxWorks real-time operating system as their foundational platform. While it offers significant advantages in task scheduling and real-time response, it also has significant limitations in visualizing dynamic elements. Existing technical solutions typically only support simple character-based symbol annotation or two-dimensional wireframe graphics, lacking support for displaying geographic information from digital map vector data. This technical shortcoming leads to three prominent issues with situational display systems: (1) It is impossible to accurately superimpose real geographic coordinates and dynamic elements The traditional VxWorks system lacks a standardized coordinate transformation framework, resulting in a serious lack of accuracy in the registration of geospatial data and dynamic elements. This is manifested in the following ways: Significant projection conversion errors: The native graphics library only supports a simple Mercator projection approximation and cannot implement specialized projection algorithms such as Gauss-Krüger and UTM. In mid-latitude regions (e.g., 40° north latitude), the conversion of WGS84 geographic coordinates to planar projection coordinates can result in errors of up to 200-500 meters in longitude. This can cause dynamic features (such as drone tracks and ship routes) to overlay the map terrain by more than one pixel (corresponding to an actual distance of 50-100 meters). Measurements from a shipborne radar system revealed a spatial offset of up to 80 meters between target echo data and the electronic nautical chart, exceeding the 30-meter accuracy standard required for tactical target positioning.
[0004] Inconsistent coordinate datums: When dynamic elements (such as sensor data) use different coordinate datums (e.g., Beijing 54 and Xi'an 80), the system lacks an automatic conversion mechanism, requiring manual programming of the conversion matrix. During a certain UAV reconnaissance mission, the overlay error between visible light payload data (WGS84) and infrared payload data (Beijing 54) reached 150 meters, resulting in a 40% drop in the target feature matching success rate.
[0005] (2) It is difficult to support spatial intelligent decision-making functions such as terrain analysis and path planning Limited by vector data processing capabilities and lack of algorithms, traditional systems are unable to perform the geometric calculations and logical judgments required for spatial analysis: Weak terrain feature extraction capabilities: The system is unable to automatically analyze vector data from digital elevation models (DEMs). Terrain slope and aspect analysis relies on rasterized approximate calculations, resulting in errors exceeding 15°. During a search and rescue mission in a mountainous area, the optimal path calculated by a traditional system had a 30% probability of crossing a slope exceeding 30°, while manual interpretation should avoid this type of terrain.
[0006] Path planning algorithms are inadequate: They can only calculate straight-line distances and fail to intelligently plan based on factors such as terrain undulations and obstacle distribution. In robotic inspection scenarios, traditional solutions increase detours by 20%-50% compared to optimal paths and are unable to handle obstacle avoidance logic in complex terrain (such as determining passage through bridges and tunnels). Due to inadequate path planning, an oilfield pipeline inspection robot experienced a 12% missed inspection rate, exceeding the industry standard threshold of 5%.
[0007] (3) When fusing multi-source heterogeneous data, it is easy to produce the problem of inconsistent spatial benchmarks, resulting in the phenomenon of "information islands" The coordinate bases and data formats of different sensors and geographic information data vary significantly, and traditional systems lack a unified fusion mechanism: Coordinate datum conversion barriers: Multiple data sources, such as GPS data (WGS84), inertial navigation data (local horizontal coordinate system), and radar data (polar coordinate system), cannot be automatically aligned, requiring manual coordinate transformation and time synchronization. In one joint command system, sensor data fusion took over a second, disrupting target track continuity and increasing target loss rates by 25%.
[0008] Poor data format compatibility: Vector map data from commercial GIS software (such as ArcGIS and MapInfo) cannot be directly read, requiring custom tools to convert the format. This results in a topological relationship loss rate exceeding 30%. In one smart city management platform, when traffic flow data (Shapefile format) was merged with building distribution data (GeoJSON format), the spatial relationship between roads and buildings was lost, resulting in a 35% decrease in congestion warning accuracy.
[0009] Especially when dealing with complex application scenarios, the single display mode of traditional systems can no longer meet the needs of real-time geospatial information services. These issues are particularly prominent in high-precision scenarios such as aerospace and autonomous driving. For example, in satellite orbit monitoring, the overlay error between TLE data and terrain can reach up to 1.2 kilometers, affecting the planning of satellite-to-ground communication links. During the Mars landing mission, spatial registration errors in multi-source remote sensing data resulted in an accuracy rate of less than 70% for identifying hazardous areas in the landing area, failing to meet safe landing requirements. Summary of the Invention
[0010] In response to the above problems, the purpose of the present invention is to provide a vector map display method and system under the VxWorks system. Through cross-platform data middle layer design, scalable universal symbol system and resource efficiency optimization, it solves the data compatibility problem between embedded systems and commercial GIS software, improves map rendering efficiency and reduces resource usage.
[0011] The above-mentioned object of the present invention is achieved through the following technical solutions: A vector map display method under a VxWorks system includes the following steps: S1: Parse the vector map source file through the MITAB library parsing engine to extract geometric spatial topology data, geographic coordinate system parameters, style attributes and projection parameters; S2: Build a hierarchical storage structure based on SQLite3 to save vector map information including spatial data tables, style configuration tables, and metadata tables into the geographic information database; S3: creating a map display control MapWidget inherited from the QGraphicsView class based on the Qt framework, loading the geographic information database through the dynamic configuration interface, and initializing the coordinate system conversion module, the multi-level view window module and the overlay management system; S4: In the VxWorks real-time operating system, the interactive vector map interface is dynamically rendered and output through the layer priority scheduling strategy.
[0012] Furthermore, in step S1, the vector map source file is parsed by the MITAB library parsing engine to extract geometric space topology data, geographic coordinate system parameters, style attributes and projection parameters, specifically: The MITAB library parsing engine is used to parse vector map source files in MapInfo TAB / MIF / MID formats, extract geometric spatial topology data in WKT format, geographic coordinate system parameters in EPSG code format, style attributes including line width, fill color, font specifications, and projection parameters including central meridian and ellipsoid datum, and generate a standardized geographic feature set.
[0013] Furthermore, in step S2, a hierarchical storage structure is constructed based on SQLite3 to save the vector map information including the spatial data table, style configuration table and metadata table into the geographic information database, specifically: A hierarchical storage structure is built based on SQLite3, and vector map information including the spatial data table spatial_data, the style configuration table style_config, and the metadata table metadata is saved to the local geographic information database Spatial_DB to form a relational database structure. The spatial data table stores geometric objects in WKT format, associated EPSG coordinate system projection codes and layer priority tables, and uses the R*Tree algorithm to establish a spatial index; The style configuration table defines feature rendering rules and supports dynamic mapping of common standards; The metadata table records information including map version, coordinate system parameters and data update timestamp.
[0014] Furthermore, in step S3, a map display control MapWidget inherited from the QGraphicsView class is created based on the Qt framework, the geographic information database is loaded through the dynamic configuration interface, and the coordinate system conversion module, the multi-level view window module and the overlay management system are initialized, specifically: The VxWorks real-time operating system loads MapWidget and the geographic information database Spatial_DB through a configuration interface, dynamically rendering and outputting an interactive vector map interface; The coordinate system conversion module supports real-time conversion between the WGS84 geographic coordinate system and at least one projection coordinate system, converts the WGS84 geographic coordinates into planar projection coordinates using the Gauss-Krüger projection formula, and implements the mapping of projection coordinates to screen pixel coordinates in combination with the affine transformation matrix; The multi-level view window module supports zooming, panning and rotating operations, and implements Frustum Culling through the quadtree spatial index view window range, rendering only visible area elements; The overlay management system adopts a base class derived architecture, including the basic element class OverlayItem and its derived element subclasses; The base primitive class defines the general interfaces draw(QPainter*) and updateStyle(StyleConfig). The derived primitive subclasses include implementations such as PointOverlay, PolylineOverlay, PolygonOverlay, ImageOverlay, and TextLabel, and these subclasses are extensible. Furthermore, the geographic information database supports display maintenance operations such as adding, deleting, and modifying annotation symbols and text markers in maps.
[0015] Furthermore, in step S4, in the VxWorks real-time operating system, the interactive vector map interface is dynamically rendered and output through the layer priority scheduling strategy, specifically: The layer priority scheduling strategy is to set refresh priorities for different layers. The application mapping layer is set with a priority of 100, which is used to display information including sensor data and important dynamic elements. The sensor coverage layer is set with a priority of 80, which is used to display sensor information including scanning areas and location layouts. The terrain layer is set with a priority of 50, which is used to display information including static roads and contour lines. The VxWorks system map rendering uses a preemptive update mechanism. High-priority layers can interrupt the rendering threads of low-priority layers to ensure that key information is displayed in real time.
[0016] Furthermore, in the coordinate system conversion module, the conversion algorithm of the coordinate system conversion module includes: the conversion from the geographic coordinate system to the projection coordinate system (x, y) adopts the Gauss-Krüger projection formula: Definition of symbols in the formula: Longitude and the central meridian The longitude difference / radian; Represents the dimension, Usually related to the calculation of meridian arc length, it is used to calculate the coordinate transformation parameters in the latitude direction and is an important intermediate variable for the conversion of the latitude component in the projection formula; ; ,in is the second eccentricity; : radius of curvature of the Maoyou circle; a is the semi-major axis of the Earth’s ellipsoid; b is the minor axis ( ); is the first eccentricity; is the scale factor; Δx, Δy are coordinate offsets; The conversion from the projection coordinate system to the screen coordinate system uses the affine transformation matrix: Definition of symbols in the formula: a, e are zoom factors, which are related to the map zoom level; b, d rotation and shear factors, processing map rotation or projection deformation compensation, c, f are translation factors, which move the origin of the projection coordinates to the center of the screen viewport.
[0017] Furthermore, the geographic information database supports users to perform display maintenance operations such as adding, deleting and modifying annotation symbols and text mark information in the map, specifically: The user adds, deletes, and modifies the information of annotation symbols and text marks, including position, range, text, and style, on the map interface through the mouse or parameter input, and updates the modified annotation symbols and text mark information to the geographic information database according to the spatial data table storage specifications.
[0018] A vector map display system in a VxWorks system for executing the above-mentioned vector map display method in a VxWorks system comprises: The geographic information database management module is used to parse vector map files with the MITAB library, extract geometric data, coordinate system parameters, style attributes, and projection parameters, and save them to a geographic information database with a hierarchical storage structure based on SQLite3. The module also modifies and maintains annotation symbols and text markup information in the database based on user application needs, and supports spatial extension functions. The data parsing module is used to parse MapInfo TAB / MIF / MID format files, extract geometric data, coordinate system parameters, style attributes and projection parameter information from the geographic information database, convert geographic features from geographic coordinate system -> projection coordinate system -> screen coordinate system, and output the screen coordinates of geographic features; respond to real-time switching operations between Gaussian, UTM and Mercator projection coordinate systems by the user, and output the screen coordinates under the target projection; respond to user zoom, translation and rotation operations related to view retrieval and view conversion operations; The map display control module is used to connect to the geographic information database, manage the location, style and layer loading of all graphic elements in the visible area, and output interface information in real time; respond to user interaction operations, including map interface zooming, translation and rotation operations, projection switching, annotation symbols, and text mark information modification and maintenance; Real-time rendering engine module, used for map information visualization, based on VxWorks' hard real-time thread scheduling framework, preemptively updates map layers in the visible area, and high-priority layers can interrupt the rendering process of low-priority layers for layered rendering; The interactive control module is used to drive the view matrix update through touch events, with a response delay of no more than 50ms.
[0019] Furthermore, the real-time rendering engine module includes: a dynamic projection switching unit that supports real-time switching of WGS84, UTM and Mercator projections.
[0020] A computer-readable storage medium stores computer code. When the computer code is executed, the above method is performed.
[0021] Compared with the prior art, the present invention has at least one of the following beneficial effects: (1) Cross-platform data compatibility – three-level conversion architecture breaks down data barriers The cross-platform data middle layer design pioneered the "MITAB→SQLite3→Qt / VxWorks" three-level data conversion architecture, solving the data compatibility issues between embedded systems and commercial GIS software, and supporting seamless import of vector map formats such as MapInfo and ArcGIS. Bottom-level parsing: Directly read vector map formats from commercial GIS software such as MapInfo TAB / MIF / MID and ArcGIS through the MITAB library parsing engine, avoiding the loss of topological relationships caused by manual conversion in traditional solutions (topology retention rate increased to over 95%). Intermediate storage: Use SQLite3 to build a standardized geographic information database. Through the hierarchical structure of spatial data tables (storing WKT format geometric objects), style configuration tables, and metadata tables, unified storage and management of data in different formats is achieved. Upper-layer adaptation: The MapWidget control based on the Qt framework dynamically loads the database and achieves seamless integration with the VxWorks system through the coordinate system conversion module, solving the compatibility issues between the embedded platform and commercial GIS software. The data import efficiency is more than 4 times higher than that of traditional solutions.
[0022] (2) Scalable symbology – dynamic configuration for flexible plotting The universal symbology can be expanded, dynamically generating application drawing symbols that conform to universal standards based on the style configuration table, and supporting user-defined symbol extensions: Standardized symbol generation: Define rendering rules such as line width, fill color, and font specifications based on style configuration tables. Dynamically generate basic graphic elements such as points, lines, and surfaces according to common standards (such as military plotting symbols GJB 2000), with a symbol restoration rate of 98%; User-defined extensions: The overlay management system adopts a base class derivation architecture. By inheriting the OverlayItem basic primitive class, you can quickly expand custom symbols such as bitmap elements and text annotations (such as track marking symbols unique to the aerospace field), shortening the development cycle by 50%; Real-time maintenance capability: supports users to add, delete, and modify annotation symbols and text tags through mouse interaction or parameter input. The modified data is updated to the geographic information database in real time to meet dynamic mapping needs.
[0023] (3) Resource efficiency optimization - indexing and cropping to improve rendering performance Resource efficiency optimization: R*Tree spatial indexing and viewport clipping improve map rendering efficiency, reducing peak memory usage and CPU utilization to lower levels than traditional solutions. Spatial index acceleration: The R*Tree algorithm is used to index spatial data tables, which improves query efficiency by more than 10 times compared to traditional solutions. When loading more than 10,000 vector features, the search time can be controlled within 10ms. Viewport culling optimization: The multi-level view window module implements viewport culling (Frustum Culling) through quadtree spatial indexing, rendering only the elements in the visible area on the screen, reducing invalid rendering calculations by 30%-50%, and increasing the map rendering frame rate from 12fps in traditional solutions to 30fps; Priority scheduling strategy: By combining layer priorities (application mapping layer level 100, sensor layer level 80, terrain layer level 50) with a preemptive update mechanism, this ensures that the rendering delay of key information (such as dynamic target trajectories) is ≤ 50ms, reducing peak CPU utilization by 35% and memory usage by 40%. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flowchart of the vector map display method under VxWorks provided by the present invention; Figure 2 A composition diagram of the geographic information database provided by the present invention; Figure 3 A diagram showing the composition of the MapWidget provided by the present invention; Figure 4 A flowchart of initializing and loading projection parameters for the coordinate system conversion module provided by the present invention; Figure 5 A diagram showing the composition of the covering management system provided by the present invention; Figure 6 A flowchart of conversion between projection coordinate systems of the coordinate system conversion module provided by the present invention; Figure 7 A multi-level view window rendering flow chart provided by the present invention; Figure 8 A flow chart of spatial indexing of a spatial data table provided by the present invention; Figure 9 A flowchart showing maintenance of geographic information database annotation symbols and text markings provided by the present invention; Figure 10 This is a system block diagram of the vector map display device under VxWorks provided by the present invention. DETAILED DESCRIPTION
[0025] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0026] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0027] The present invention provides a vector map display method and system based on the VxWorks operating system, which implements map visualization for embedded real-time systems through an innovative layered architecture design and cross-platform data conversion mechanism. The method comprises: first, parsing a standard vector map file based on the MITAB open source library to extract multi-dimensional map elements containing spatial topology data, geographic coordinate system parameters, style configuration information, and projection conversion parameters, and constructing a standardized SQLite3 geographic information database; then, through object-oriented modular design, constructing a map display control subclass MapWidget derived from the Qt framework QGraphicsView class. This core control class, through a dynamic configuration mechanism, injects geographic elements from the database into a coordinate system conversion module, a multi-level view window module, and an overlay management system. The overlay management system adopts a base class derivation architecture and is extensible to support multiple types of primitives, such as point elements, line elements, polygonal geometric bodies, bitmap elements, and text annotation overlays; finally, within the VxWorks real-time operating system environment, a visualization engine with projection adaptive capabilities is constructed through the MapWidget class, and dynamic rendering and interactive operations of multi-dimensional geographic information are achieved by combining a layer priority management strategy.
[0028] The technical solution of the present invention achieves cross-platform data compatibility by introducing a database middle layer, adopts a modular architecture to reduce system coupling, and combines a layered rendering mechanism to improve real-time display efficiency, providing a highly reliable geographic information visualization solution for embedded systems.
[0029] The following is described by specific examples: First embodiment like Figure 1As shown, this embodiment provides a vector map display method under the VxWorks system. The vector map display under VxWorks in this embodiment is applied in the field of embedded digital maps, mainly for vector map display under VxWorks, and includes the following steps: S1: Parse the vector map source file through the MITAB library parsing engine to extract geometric spatial topology data, geographic coordinate system parameters, style attributes and projection parameters.
[0030] In this embodiment, step S1 is specifically as follows: The MITAB library parsing engine is used to parse vector map source files in MapInfo TAB / MIF / MID formats, extract geometric spatial topology data in WKT format, geographic coordinate system parameters in EPSG code format, style attributes including line width, fill color, font specifications, and projection parameters including central meridian and ellipsoid datum, and generate a standardized geographic feature set.
[0031] S2: A hierarchical storage structure is constructed based on SQLite3 to save the vector map information including spatial data tables, style configuration tables, and metadata tables into the geographic information database.
[0032] In this embodiment, step S2 is specifically as follows: Build a hierarchical storage structure based on SQLite3, such as Figure 2 As shown, the vector map information including the spatial data table spatial_data, the style configuration table style_config and the metadata table metadata is saved to the local geographic information database Spatial_DB to form a relational database structure; The spatial data table stores geometric objects in WKT format, associated EPSG coordinate system projection codes and layer priority tables, and uses the R*Tree algorithm to establish a spatial index; In this embodiment, the structure of the spatial data table is defined as: CREATE TABLE spatial_data ( fid INTEGER PRIMARY KEY, / / Geographic feature unique identifier geometry BLOB CHECK(IsValidWKT(geometry)), / / Store geometry objects epsg_code INTEGER DEFAULT 4326, / / Coordinate system code style_id INTEGER REFERENCES style_config(id), / / Style ID layer_priority INTEGER NOT NULL / / Layer priority ); The style configuration table defines feature rendering rules and supports dynamic mapping of common standards; The metadata table records information including map version, coordinate system parameters and data update timestamp.
[0033] S3: Create a map display control MapWidget inherited from the QGraphicsView class based on the Qt framework, load the geographic information database through the dynamic configuration interface, and initialize the coordinate system conversion module, multi-level view window module and coverage management system.
[0034] In this embodiment, step S3 is specifically as follows: like Figure 3 As shown, the VxWorks real-time operating system loads MapWidget and loads the geographic information database Spatial_DB through the configuration interface, dynamically rendering and outputting an interactive vector map interface; The coordinate system conversion module supports real-time conversion between the WGS84 geographic coordinate system and at least one projection coordinate system, converts the WGS84 geographic coordinates into planar projection coordinates using the Gauss-Krüger projection formula, and implements the mapping of projection coordinates to screen pixel coordinates in combination with the affine transformation matrix; In the coordinate system conversion module, the conversion algorithm of the coordinate system conversion module includes: The conversion from the geographic coordinate system to the projected coordinate system (x, y) adopts the Gauss-Krüger projection formula: Definition of symbols in the formula: Longitude and the central meridian The longitude difference / radian; Represents the dimension, Usually related to the calculation of meridian arc length, it is used to calculate the coordinate transformation parameters in the latitude direction and is an important intermediate variable for the conversion of the latitude component in the projection formula; ; ,in is the second eccentricity; : radius of curvature of the Maoyou circle; a is the semi-major axis of the Earth's ellipsoid (e.g., a=6378137.0m for the WGS84 ellipsoid); b is the minor axis ( ); is the first eccentricity; is the scale factor; Δx, Δy are coordinate offsets (avoid negative coordinates, such as 500km east); The conversion from the projection coordinate system to the screen coordinate system uses the affine transformation matrix: Definition of symbols in the formula: a, e are zoom factors, which are related to the map zoom level; b, d rotation and shear factors, processing map rotation or projection deformation compensation, c, f are translation factors, which move the origin of the projection coordinates to the center of the screen viewport.
[0035] The multi-level view window module supports zooming, panning and rotating operations, and implements Frustum Culling through the quadtree spatial index view window range, rendering only visible area elements; The overlay management system adopts a base class derived architecture, including the basic element class OverlayItem and its derived element subclasses; The basic primitive class defines the general interfaces draw(QPainter*) and updateStyle(StyleConfig), and the derived primitive subclass includes implementations such as point feature PointOverlay, line feature PolylineOverlay, polygon geometry PolygonOverlay, bitmap feature ImageOverlay, and text label TextLabel, and the subclass can be expanded. At the same time, the geographic information database supports display maintenance operations for users to add, delete, and modify annotation symbols and text mark information in the map: users can add, delete, and modify information including location, range, text, and style of annotation symbols and text marks on the map interface through the mouse or parameter input, and update the modified annotation symbols and text mark information to the geographic information database according to the spatial data table storage specifications.
[0036] The following further describes the various parts involved in step S3: like Figure 4As shown in the figure, the coordinate system conversion module connects to the geographic information database, reads the projection metadata (including the central meridian, ellipsoid parameters, EPSG code, etc.), loads the default parameters based on the WGS84 datum and constructs the initial conversion parameters (Gauss-Krüger projection formula, affine transformation matrix), completes the conversion of application coordinates through the conversion between the geographic coordinate system and the projection coordinate system and the affine matrix operation between the projection coordinate system and the screen coordinate system, and finally outputs the spatial data of the geographic information database to the display interface in the form of the screen coordinate system.
[0037] like Figure 5 As shown in the figure, the overlay management system adopts a base class derived architecture, which consists of a primitive class and a style manager. The basic primitive class defines the general interfaces draw(QPainter*) and updateStyle(StyleConfig) to implement the general functions of primitives. The primitive subclasses based on the derived basic primitive class include point features (PointOverlay), line features (PolylineOverlay), surface features (PolygonOverlay), bitmap features (ImageOverlay), and text labels (TextLabel). Furthermore, the vector map display under VxWorks supports real-time conversion between the WGS84 geographic coordinate system and at least one projection coordinate system. Figure 6 As shown in the figure, you can switch between three projection coordinate systems in real time: Gaussian, UTM, and Mercator. Depending on the projection method selected by the user, you enter the projection type, central meridian, and ellipsoid parameters. The projection conversion algorithm is loaded according to the projection type and the projection conversion parameters (central meridian, ellipsoid parameters, etc.) are calculated. The updated conversion matrix is calculated based on the projection relationship. Then, the corresponding spatial data in the geographic information data is obtained from the view window, and the screen coordinates under the target projection are output.
[0038] Furthermore, the vector map display under VxWorks supports operations such as zooming, panning and rotating. Figure 7 As shown in the figure, the multi-level view control module responds to user map operations such as zooming, panning and rotating, and calculates a new view matrix based on the zoom factor, panning offset and rotation angle; through the quadtree spatial index view window range, the matrix inverses the geographic coordinate range corresponding to the four corners of the screen to generate the query MBR (Minimum Bounding Rectangle) to calculate the view area; through the spatial index of the spatial data table, all spatial data within the view area are obtained, such as Figure 8 As shown; the map interface after the layered rendering output operation is performed according to the layer priority.
[0039] Furthermore, the vector map display under VxWorks supports geographic information database annotation symbols and text mark display maintenance functions, such as Figure 9As shown in the figure, the MapWidget receives input for adding, modifying, and deleting annotation symbols and text markers, and captures input information (position, drag range, keyboard input, style selection, etc.). Based on the coordinate conversion from screen coordinates to projected coordinates to map coordinates, it generates the corresponding plotting objects and style configurations. The map interface updates the map display after user operations. Based on user operations (add / modify / delete), the spatial data of annotation symbols and text markers is updated to the geographic information database.
[0040] S4: In the VxWorks real-time operating system, the interactive vector map interface is dynamically rendered and output through the layer priority scheduling strategy.
[0041] In this embodiment, step S4 is specifically as follows: The layer priority scheduling strategy is to set refresh priorities for different layers. The application mapping layer is set with a priority of 100, which is used to display information including sensor data and important dynamic elements. The sensor coverage layer is set with a priority of 80, which is used to display sensor information including scanning areas and location layouts. The terrain layer is set with a priority of 50, which is used to display information including static roads and contour lines. The VxWorks system map rendering uses a preemptive update mechanism. High-priority layers can interrupt the rendering threads of low-priority layers to ensure that key information is displayed in real time.
[0042] Second embodiment like Figure 10 As shown, this embodiment provides a vector map display system in a VxWorks system for executing the vector map display method in a VxWorks system as in the first embodiment, including: The geographic information database management module is used to parse vector map files with the MITAB library, extract geometric data, coordinate system parameters, style attributes, and projection parameters, and save them to a geographic information database with a hierarchical storage structure based on SQLite3. The module also modifies and maintains annotation symbols and text markup information in the database based on user application needs, and supports spatial extension functions. The data parsing module is used to parse MapInfo TAB / MIF / MID format files, extract geometric data, coordinate system parameters, style attributes and projection parameter information from the geographic information database, convert geographic features from geographic coordinate system -> projection coordinate system -> screen coordinate system, and output the screen coordinates of geographic features; respond to real-time switching operations between Gaussian, UTM and Mercator projection coordinate systems by the user, and output the screen coordinates under the target projection; respond to user zoom, translation and rotation operations related to view retrieval and view conversion operations; The map display control module is used to connect to the geographic information database, manage the location, style and layer loading of all graphic elements in the visible area, and output interface information in real time; respond to user interaction operations, including map interface zooming, translation and rotation operations, projection switching, annotation symbols, and text mark information modification and maintenance; Real-time rendering engine module, used for map information visualization, based on VxWorks' hard real-time thread scheduling framework, preemptively updates map layers in the visible area, and high-priority layers can interrupt the rendering process of low-priority layers for layered rendering; The interactive control module is used to drive the view matrix update through touch events, with a response delay of no more than 50ms.
[0043] Furthermore, the real-time rendering engine module includes: a dynamic projection switching unit that supports real-time switching of WGS84, UTM and Mercator projections.
[0044] A computer-readable storage medium stores computer code. When the computer code is executed, the above-described method is performed. Those skilled in the art will appreciate that all or part of the steps in the various methods of the above-described embodiments can be performed by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0045] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
[0046] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0047] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A vector map display method under a VxWorks system, characterized in that: The following steps are involved: S1: Parse the vector map source file through the MITAB library parsing engine to extract geometric spatial topology data, geographic coordinate system parameters, style attributes and projection parameters; S2: Build a hierarchical storage structure based on SQLite3 to save vector map information including spatial data tables, style configuration tables, and metadata tables into the geographic information database; S3: creating a map display control MapWidget inherited from the QGraphicsView class based on the Qt framework, loading the geographic information database through the dynamic configuration interface, and initializing the coordinate system conversion module, the multi-level view window module and the overlay management system; S4: In the VxWorks real-time operating system, the interactive vector map interface is dynamically rendered and output through the layer priority scheduling strategy.
2. The vector map display method under the VxWorks system according to claim 1, characterized in that: In step S1, the vector map source file is parsed by the MITAB library parsing engine to extract geometric spatial topology data, geographic coordinate system parameters, style attributes and projection parameters, specifically: The MITAB library parsing engine is used to parse vector map source files in MapInfo TAB / MIF / MID formats, extract geometric spatial topology data in WKT format, geographic coordinate system parameters in EPSG code format, style attributes including line width, fill color, font specifications, and projection parameters including central meridian and ellipsoid datum, and generate a standardized geographic feature set.
3. The vector map display method under the VxWorks system according to claim 1, characterized in that: In step S2, a hierarchical storage structure is constructed based on SQLite3 to save the vector map information including the spatial data table, style configuration table and metadata table to the geographic information database, specifically: A hierarchical storage structure is built based on SQLite3, and vector map information including the spatial data table spatial_data, the style configuration table style_config, and the metadata table metadata is saved to the local geographic information database Spatial_DB to form a relational database structure. The spatial data table stores geometric objects in WKT format, associated EPSG coordinate system projection codes and layer priority tables, and uses the R*Tree algorithm to establish a spatial index; The style configuration table defines feature rendering rules and supports dynamic mapping of common standards; The metadata table records information including map version, coordinate system parameters and data update timestamp.
4. The vector map display method under the VxWorks system according to claim 1, characterized in that: In step S3, a map display control MapWidget inherited from the QGraphicsView class is created based on the Qt framework, the geographic information database is loaded through the dynamic configuration interface, and the coordinate system conversion module, the multi-level view window module and the overlay management system are initialized, specifically: The VxWorks real-time operating system loads MapWidget and the geographic information database Spatial_DB through a configuration interface, dynamically rendering and outputting an interactive vector map interface; The coordinate system conversion module supports real-time conversion between the WGS84 geographic coordinate system and at least one projection coordinate system, converts the WGS84 geographic coordinates into planar projection coordinates using the Gauss-Krüger projection formula, and implements the mapping of projection coordinates to screen pixel coordinates in combination with the affine transformation matrix; The multi-level view window module supports zooming, panning and rotating operations, and implements Frustum Culling through the quadtree spatial index view window range, rendering only visible area elements; The overlay management system adopts a base class derived architecture, including the basic element class OverlayItem and its derived element subclasses; The base primitive class defines the general interfaces draw(QPainter*) and updateStyle(StyleConfig). The derived primitive subclasses include implementations such as PointOverlay, PolylineOverlay, PolygonOverlay, ImageOverlay, and TextLabel, and these subclasses are extensible. Furthermore, the geographic information database supports display maintenance operations such as adding, deleting, and modifying annotation symbols and text markers in maps.
5. The vector map display method under the VxWorks system according to claim 1, characterized in that: In step S4, in the VxWorks real-time operating system, the interactive vector map interface is dynamically rendered and output through the layer priority scheduling strategy, specifically: The layer priority scheduling strategy is to set refresh priorities for different layers. The application mapping layer is set with a priority of 100, which is used to display information including sensor data and important dynamic elements. The sensor coverage layer is set with a priority of 80, which is used to display sensor information including scanning areas and location layouts. The terrain layer is set with a priority of 50, which is used to display information including static roads and contour lines. The VxWorks system map rendering uses a preemptive update mechanism. High-priority layers can interrupt the rendering threads of low-priority layers to ensure that key information is displayed in real time.
6. The vector map display method under the VxWorks system according to claim 4, characterized in that: In the coordinate system conversion module, the conversion algorithm of the coordinate system conversion module includes: the conversion from the geographic coordinate system to the projected coordinate system (x, y) adopts the Gauss-Krüger projection formula: Definition of symbols in the formula: Longitude and the central meridian The longitude difference / radian; Represents the dimension, Usually related to the calculation of meridian arc length, it is used to calculate the coordinate transformation parameters in the latitude direction and is an important intermediate variable for the conversion of the latitude component in the projection formula; ; ,in is the second eccentricity; : radius of curvature of the Maoyou circle; a is the semi-major axis of the Earth’s ellipsoid; b is the minor axis ( ); is the first eccentricity; is the scale factor; Δx, Δy are coordinate offsets; The conversion from the projection coordinate system to the screen coordinate system uses the affine transformation matrix: Definition of symbols in the formula: a, e are zoom factors, which are related to the map zoom level; b, d rotation and shear factors, processing map rotation or projection deformation compensation, c, f are translation factors, which move the origin of the projection coordinates to the center of the screen viewport.
7. The vector map display method under the VxWorks system according to claim 4, characterized in that: The geographic information database supports users to perform display maintenance operations such as adding, deleting and modifying annotation symbols and text mark information in the map, specifically: The user adds, deletes, and modifies the information of annotation symbols and text marks, including position, range, text, and style, on the map interface through the mouse or parameter input, and updates the modified annotation symbols and text mark information to the geographic information database according to the spatial data table storage specifications.
8. A vector map display system in a VxWorks system for executing the vector map display method in a VxWorks system according to any one of claims 1 to 7, characterized in that: include: The geographic information database management module is used to parse vector map files with the MITAB library, extract geometric data, coordinate system parameters, style attributes, and projection parameters, and save them to a geographic information database with a hierarchical storage structure based on SQLite3. The module also modifies and maintains annotation symbols and text markup information in the database based on user application needs, and supports spatial extension functions. The data parsing module is used to parse MapInfo TAB / MIF / MID format files, extract geometric data, coordinate system parameters, style attributes and projection parameter information from the geographic information database, convert geographic features from geographic coordinate system -> projection coordinate system -> screen coordinate system, and output the screen coordinates of geographic features; respond to real-time switching operations between Gaussian, UTM and Mercator projection coordinate systems by the user, and output the screen coordinates under the target projection; respond to user zoom, translation and rotation operations related to view retrieval and view conversion operations; Map display control module is used to connect to the geographic information database, manage the location, style and layer loading of all graphic elements in the visible area, and output interface information in real time; Respond to user interaction operations, including map interface zooming, panning and rotating operations, projection switching, annotation symbols, and text mark information modification and maintenance; Real-time rendering engine module, used for map information visualization, based on VxWorks' hard real-time thread scheduling framework, preemptively updates map layers in the visible area, and high-priority layers can interrupt the rendering process of low-priority layers for layered rendering; The interactive control module is used to drive the view matrix update through touch events, with a response delay of no more than 50ms.
9. The vector map display system under the VxWorks system according to claim 8, characterized in that: The real-time rendering engine module includes: a dynamic projection switching unit that supports real-time switching of WGS84, UTM and Mercator projections. 10 . A computer-readable storage medium storing computer code, wherein when the computer code is executed, the method according to claim 1 is performed.
Citation Information
Cited By
Graph generation method and device supporting interaction, equipment and storage medium
CN120976372A
Graph generation method, device and equipment supporting interaction, and storage medium
CN120976372B
Position-based entertainment large-space multi-project system and data processing method
CN122152952A