A cross-platform vector map element symbol rendering method and device based on QGIS
Through the cross-platform vector map element symbol rendering method based on QGIS, symbols are designed using symbol description and stored in the symbol library, which solves the problem in the existing technology that symbol design systems are difficult to communicate between different platforms, and realizes symbol design. Separation from rendering and cross-platform interoperability.
Patent Information
- Application Number
- CN201911127999.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-18
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2039-11-18
AI Technical Summary
In the prior art, map symbol design systems are difficult to communicate between different platforms, resulting in symbol designs that cannot be directly used in other systems in one system and need to be redesigned and produced.
A cross-platform vector map element symbol rendering method based on QGIS is adopted. Symbol design and rendering are completely separated through the symbol rendering framework of QGIS. Symbols are designed using symbol description, and the designed symbol description is stored in the symbol library to achieve Design and edit symbols independently, with good independence and strong cross-platform capabilities.
It achieves complete separation of symbol design and rendering, allows symbols to be designed and edited independently, has powerful cross-platform capabilities, and solves the problem of symbol interoperability between different platforms.
Smart Images

Figure CN111209356B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer map making, and in particular to a cross-platform vector map element symbol rendering method and device based on QGIS. Background Art
[0002] Map symbols are the basic means of expressing map content. They can not only indicate the spatial position, shape, quality and quantity characteristics of objects, but also the mutual connections between objects and the overall characteristics of the region. They are the language of maps.
[0003] Symbol design is a crucial step in map making. The symbol design system mainly includes the definition of basic symbols, the definition of combination methods, and the design of key technologies such as symbol rendering.
[0004] At present, many symbol design systems on the market divide symbols into three categories: points, lines, and surfaces. The point symbols are determined by parameters such as size, color, and shape; the line symbols are determined by parameters such as broadband and dashed line interval; and the surface symbols are composed of two parts: outline and fill. In order to represent the complex real world, there are thousands of map symbols. Symbol design systems generally use simple points to form complex points, simple lines to form complex lines, and simple surfaces to form complex surfaces to meet the design of various map symbols. However, each system has limitations. All major symbol design systems adopt the principle of "using simple symbols to form complex symbols". The choice of simple symbols is the main difference between major symbol design systems. In ArcGIS, point symbols are divided into seven types: 3D marker symbols, 3D simple marker symbols, 3D character marker symbols, simple marker symbols, arrow marker symbols, picture marker symbols, and character marker symbols; in QGIS, a large number of basic vector symbols are used as basic symbols, and there are many basic symbol types. The classification of lines and surfaces is also very different, and secondly, the symbol combination method and rendering method are also different.
[0005] Therefore, symbols designed using one system or platform are difficult to use on other platforms, and symbols need to be redesigned when drawing using different platforms. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, one of the objects of the present invention is to provide a cross-platform vector map feature symbol rendering method based on QGIS. The method is based on the symbol rendering framework of QGIS and utilizes the powerful rendering logic and layer management mechanism of QGIS to completely separate symbol design and rendering. Symbols are designed by symbol description, and symbols can be designed and edited individually, with good independence and strong cross-platform capabilities.
[0007] The second purpose of the present invention is to provide an electronic device, which is based on the symbol rendering framework of QGIS, utilizes the powerful rendering logic and layer management mechanism of QGIS, completely separates symbol design and rendering, designs symbols by symbol description, and can independently design and edit symbols, with good independence and strong cross-platform capabilities.
[0008] The third object of the present invention is to provide a computer-readable storage medium, in which a computer program can realize a symbol rendering framework based on QGIS when it is running, and utilize the powerful rendering logic and layer management mechanism of QGIS to completely separate symbol design and rendering. Symbols are designed by symbol description, and symbols can be designed and edited independently, with good independence and strong cross-platform capabilities.
[0009] One of the purposes of the present invention is achieved by the following technical solution:
[0010] A cross-platform vector map feature symbol rendering method based on QGIS, comprising the following steps:
[0011] A basic element library is established, and each basic element is mapped to a corresponding semantic description and stored in the basic element library; the semantic description is used to form a corresponding basic element and a parameter value corresponding to the basic element; the basic elements include points, simple lines, dot-dash lines, width gradient lines, double lines, simple surfaces, filled points, and filled lines;
[0012] According to the symbol design instruction input by the user, the semantic description of the corresponding basic element is obtained to generate a symbol description of the corresponding symbol and save it in the symbol library, wherein the symbol description is composed of the semantic description of the basic element; the symbol design instruction includes: a basic element selection instruction, a basic element parameter setting instruction and a basic element superposition instruction;
[0013] Get the symbol description of the symbol to be drawn and render the symbol according to the symbol description and map parameter information.
[0014] Furthermore, the step of acquiring the semantic description of the corresponding basic element according to the symbol design instruction input by the user to generate the symbol description of the corresponding symbol is specifically:
[0015] According to the basic element selection instruction and the basic element parameter setting instruction, the semantic description of the corresponding basic element is obtained to generate the sub-symbol description of the current layer; according to the basic element superposition instruction, the sub-symbol descriptions of each layer are superimposed to generate the symbol description of the corresponding symbol.
[0016] Furthermore, the sub-symbol description of each layer contains the sub-color attributes of the basic elements of the current layer, and the symbol description generated by superimposing the sub-symbol descriptions contains the main color attribute, and the sub-color attribute is used to set the color of the corresponding basic element, and the main color attribute is used to set the color of all basic elements that have not been set to color and constitute the current symbol.
[0017] Furthermore, the sub-symbol description of each layer also includes the coordinate attribute of the basic element, and the coordinate attribute is used to locate the position of the current basic element in the symbol to be drawn.
[0018] Furthermore, the symbol description of each symbol is stored corresponding to a unique code.
[0019] Furthermore, the steps of obtaining the symbol description of the symbol to be drawn and rendering the symbol according to the symbol description and the map parameter information are as follows:
[0020] The corresponding symbol description is found according to the unique code of the symbol to be drawn, and the sub-symbol descriptions in the symbol description are identified and parsed through basic semantic rules to obtain the basic elements and the parameters of each basic element. According to the parameters of each basic element, GDI is used to build the corresponding Pen or Brush for symbol rendering.
[0021] The second object of the present invention is achieved by adopting the following technical solution:
[0022] An electronic device includes a processor and a memory, wherein the memory stores an executable computer program, and the processor can read the computer program in the memory and run it to implement the cross-platform vector map feature symbol rendering method based on QGIS as described above.
[0023] The third object of the present invention is achieved by adopting the following technical solution:
[0024] A computer-readable storage medium stores an executable computer program, which can implement the cross-platform vector map feature symbol rendering method based on QGIS as described above when the computer program is run.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] This QGIS-based cross-platform vector map feature symbol rendering method is based on the QGIS symbol rendering framework and uses QGIS's powerful rendering logic and layer management mechanism to completely separate symbol design and rendering. Symbols can be designed and edited independently, with good independence and strong cross-platform capabilities. Symbols are designed through symbol descriptions, and the symbol descriptions of the designed symbols are stored in the symbol library. When symbols need to be drawn, the corresponding symbol descriptions can be directly obtained from the symbol library to perform symbol rendering. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of a process flow of a cross-platform vector map element symbol rendering method based on QGIS provided by the present invention;
[0028] Figure 2 for Figure 1 A logical diagram of a cross-platform vector map feature symbol rendering method based on QGIS
[0029] Figure 3 An example diagram of setting parameters for line segments according to the QGIS-based cross-platform vector map feature symbol rendering method provided by the present invention;
[0030] Figure 4 A schematic diagram of symbol positioning points in a symbol design page of a cross-platform vector map element symbol rendering method based on QGIS provided by the present invention;
[0031] Figure 5 An example diagram of setting a polyline by using coordinate attributes according to the QGIS-based cross-platform vector map feature symbol rendering method provided by the present invention;
[0032] Figure 6 Based on Figure 5 The effect diagram generated by the example diagram;
[0033] Figure 7 This is an example diagram of drawing dotted gradient lines using the QGIS-based cross-platform vector map feature symbol rendering method provided by the present invention. DETAILED DESCRIPTION
[0034] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0035] See also Figure 1 and Figure 2 , a cross-platform vector map feature symbol rendering method based on QGIS, comprising the following steps:
[0036] S1. Establish a basic element library, map each basic element to a corresponding semantic description and store it in the basic element library; the semantic description is used to construct the corresponding basic element and the parameter value corresponding to the basic element; the basic elements include points, simple lines, dot-dash lines, width gradient lines, double lines, simple surfaces, filled points and filled lines; the basic elements are mapped through semantic descriptions, each element is mapped to the corresponding description semantics, and the parameters in the elements are also mapped to the corresponding description semantics; the basic elements and their parameter values can be constructed by parsing the description semantics;
[0037] S2. According to the symbol design instruction input by the user, the semantic description of the corresponding basic element is obtained to generate the symbol description of the corresponding symbol and save it in the symbol library, wherein the symbol description is composed of the semantic description of the basic element; the symbol design instruction includes: basic element selection instruction, basic element parameter setting instruction and basic element superposition instruction; in the symbol design process, the color and size of the basic element can be adjusted by modifying the parameter attributes in the semantic description of the basic element; complex symbols can be expressed by superposition description of the basic element;
[0038] S3. Obtain the symbol description of the symbol to be drawn and render the symbol according to the symbol description and map parameter information.
[0039] This QGIS-based cross-platform vector map feature symbol rendering method is based on the QGIS symbol rendering framework and uses QGIS's powerful rendering logic and layer management mechanism to completely separate symbol design and rendering. Symbols can be designed and edited independently, with good independence and strong cross-platform capabilities. Symbols are designed through symbol descriptions, and the symbol descriptions of the designed symbols are stored in the symbol library. When symbols need to be drawn, the corresponding symbol descriptions can be directly obtained from the symbol library to perform symbol rendering.
[0040] A symbol rendering cycle consists of the following process: first, the QGIS drawing area obtains all the symbols that need to be drawn and obtains the map parameter information (including mapping scale, drawing area background color, etc.), and then sends these parameter information to the implementation class of point, line, and surface rendering. The corresponding symbol description is determined according to the unique coding of the symbol, and the symbol is drawn through the parameters parsed from the symbol description, the attribute information of the basic elements, and the position information (position in the drawing area), so that it is displayed in the drawing area.
[0041] This method uses QGIS's rendering logic and methods to define symbols visually and render them symbolically. It inherits the point, line, and surface rendering classes and renderers of its symbol layer and replaces its underlying rendering implementation, perfectly combining the definition and rendering of symbol design rules.
[0042] As a preferred implementation, the method of acquiring the semantic description of the corresponding basic element according to the symbol design instruction input by the user to generate the symbol description of the corresponding symbol is specifically as follows:
[0043] According to the basic element selection instruction and the basic element parameter setting instruction, the semantic description of the corresponding basic element is obtained to generate the sub-symbol description of the current layer; according to the basic element superposition instruction, the sub-symbol descriptions of each layer are superimposed to generate the symbol description of the corresponding symbol.
[0044] This method can be used to design the hierarchical information of symbols. The eight basic elements provide parameter setting entries. After the parameter setting is completed, the sub-symbol description of the current layer is generated. That is, the required basic element is selected through the basic element selection command, and then the parameters of the basic element are set through the basic element parameter setting command to obtain the semantic description of the corresponding basic element, that is, the sub-symbol description of the current layer is generated. For example, the length, width, color, rotation angle, left and right offset, up and down offset and other parameters of the line segment can be set (such as Figure 3 ), the line layer selected in the figure generates a description such as "line; 0.30; 0.000, 1.000; 0.000, -1.000", which represents the basic element type as line segment, line width as 0.30, first point coordinates as (0.000, 1.000), and second point coordinates as (0.000, -1.000) from left to right; multi-layer symbols generate complex symbol descriptions by superimposing different basic elements. A symbol that can express a certain meaning is composed by selecting basic elements, setting parameters, and superimposing multiple basic elements. Conversely, a symbol can be decomposed into one or more layers of basic elements, and each layer can be a different basic element.
[0045] As a preferred embodiment, the sub-symbol description of each layer includes the sub-color attributes of the basic elements of the current layer, and the symbol description generated by superimposing the sub-symbol descriptions includes the main color attribute, and the sub-color attribute is used to set the color of the corresponding basic element, and the main color attribute is used to set the color of all basic elements that have not been set to color and constitute the current symbol.
[0046] A complex symbol is generally composed of many basic elements. In symbol design, there are requirements for different colors of basic elements and requirements for the same color of basic elements. In this method, each basic element can select a color separately (optionally). At the same time, the concept of the main color of the symbol is introduced. Among the basic elements that make up the symbol, the basic elements that have not selected a color all use the main color of the symbol. When the colors of the basic elements of the symbol need to be consistent, there is no need to perform color selection multiple times.
[0047] As a preferred implementation, the sub-symbol description of each layer also includes the coordinate attributes of the basic element, which are used to locate the position of the current basic element in the symbol to be drawn. A symbol is composed of a positioning point and basic elements that exist relative to the positioning point. The positioning point is the position where the center of the cross cursor is located during the drawing process (such as Figure 4 ). In the process of symbol design, the positioning center is used as the origin to establish a two-dimensional coordinate system, and simple elements that constitute the symbol are added. The coordinates can be used to accurately add simple elements that constitute point symbols to the surrounding area; and the coordinate values can be set through the coordinate attributes to adjust the position of simple elements relative to the origin. Simple elements include single points, polylines, polygons, arcs, text, and positioning point offsets (the offsets of the parameters set for the elements after the positioning point offset are all referenced to the positioning point after the offset, but the positioning point in the drawing process is unchanged, which is equivalent to the elements after the positioning point offset are offset in the same direction by the same amount).
[0048] In addition, you can also use coordinate attributes to quickly set polyline or polygon symbols. In polyline and polygon symbols, in addition to the traditional offset method, you can directly adjust the coordinate attributes to achieve complex line segments, irregular polygons, etc. For example, by Figure 5 The polyline with the coordinates shown is as follows Figure 6 This is much more convenient than using multiple line segments, and is more accurate than the offset and rotation settings.
[0049] As a preferred implementation, the symbol description of each symbol is saved corresponding to a unique code. In this way, the corresponding symbol description in the symbol library can be directly obtained through the unique code, which is simple and fast. It should be noted that symbols with the same code are the same, but symbols drawn using the same code can change their color, width and other information by setting attribute values.
[0050] As a preferred implementation, the steps of obtaining the symbol description of the symbol to be drawn and rendering the symbol according to the symbol description and map parameter information are as follows:
[0051] The corresponding symbol description is found according to the unique code of the symbol to be drawn, and the sub-symbol descriptions in the symbol description are identified and parsed through basic semantic rules to obtain the basic elements and the parameters of each basic element. According to the parameters of each basic element, GDI is used to build the corresponding Pen or Brush for symbol rendering.
[0052] The symbol composition rules used in the method provided by the present invention are as follows:
[0053] 1) Symbol color rules: A complex symbol is generally composed of many basic elements. In symbol design, there are requirements for different colors of each element and requirements for the same color of each element. In this system, each element can choose a color separately (optionally). At the same time, the concept of symbol primary color is introduced. Among the basic elements that make up the symbol, the elements that have not selected a color all use the symbol primary color. When the colors of the elements of the symbol need to be consistent, there is no need to perform color selection multiple times.
[0054] 2) Point elements. The symbol is composed of a simple element with a positioning point and a relative positioning point. The positioning point is the position where the center of the cross cursor is located during the drawing process (such as Figure 4 ), in the process of symbol design, a two-dimensional coordinate system is established with the positioning center as the origin, simple elements that constitute the symbol are added, and the positions of the simple elements relative to the origin are adjusted. Simple elements include single points, polylines, polygons, arcs, texts, and positioning point offsets (the offsets of the parameters set for the elements after the positioning point offset are all referenced to the positioning point after the offset, but the positioning point in the drawing process remains unchanged, which is equivalent to the elements after the positioning point offset being offset in the same direction by the same amount).
[0055] 3) Simple line elements are simple line types with fixed line width that can be drawn by simply lifting and lowering the pen, such as solid line, dotted line, etc.
[0056] 4) Dot-dash line elements are linear elements formed by regularly inserting point symbols according to defined rules. The rules include insertion point symbol methods such as period, endpoint, offset, etc.
[0057] 5) Gradient Width Line Element is a line type drawn by adding 2-3 gradient widths to a simple line.
[0058] 6) Double line element is a double line element symbol composed of two simple lines or dash-dot lines with a certain width and connection form.
[0059] The symbol of a surface feature consists of an outline and a fill. The outline is defined by the above line symbol rules, and the fill method is described separately here:
[0060] 7) Simple surface element is a simple surface element that is filled with no fill or a certain color and a certain transparency.
[0061] 8) There are two types of fill point elements: grid fill and center fill. A parallelogram is formed by a certain horizontal and vertical distance and offset angle, and point symbols are filled at the grid points. Point symbols are also inserted at the centroid of the surface element.
[0062] 9) The fill line symbol is composed of the line angle, starting offset and the spacing between two inserted lines.
[0063] 10) Call lines to fill in vertically or equally spaced patterns based on the positioning edge.
[0064] 11) At the same time, the surface symbol supports multiple types of symbols, which are actually two symbols with the same name. The specific symbol depends on the attributes of the feature. For example, the symbol of a steep rock mountain is different when the backlight attributes are different.
[0065] In the method provided by the present invention, the symbol rendering class is generally divided into three types: point, line, and surface. It is responsible for the variables related to symbols in the feature information and attribute table sent by the QGIS rendering system, such as obtaining the corresponding symbol style through encoding, controlling the display of symbols through color, line width, etc., and the corresponding changes according to proportional scaling and non-proportional scaling.
[0066] 1) When rendering point symbols, non-text symbols are directly drawn by a series of trajectory points after coordinate conversion, while text symbols are drawn by calculating the outline points of the text through PainterPath, and then obtaining the path through positioning points and coordinate conversion.
[0067] 2) When drawing a dotted gradient line, treat each real part as a surface, that is, calculate the surface composed of the offset points on the upper and lower sides of the first and last points of the real part (half the line width is the offset), a total of 4 points (when the real part passes through the vertex, add 2 more points) (such as Figure 7 ), and finally all the multiple faces drawn by the real part are combined into a gradient line symbol. The solid line gradient line is similar, and only the faces composed of the offset points at each vertex need to be calculated. This method can also solve the problem of synchronizing the real part of the line after turning when drawing a double dashed line.
[0068] 3) When drawing a grid-filled surface, with the help of QT drawing mechanism, first draw a primitive, that is, a small picture with two rows and two columns of four grid points, set the primitive to the brush, and then use the brush to directly draw the entire surface entity. Similarly, you can also draw a fill line symbol.
[0069] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores an executable computer program, and the processor can read the computer program in the memory and run it to implement the cross-platform vector map feature symbol rendering method based on QGIS as described above.
[0070] In addition, the present invention also provides a computer-readable storage medium, which stores an executable computer program. When the computer program is run, the cross-platform vector map feature symbol rendering method based on QGIS as described above can be implemented.
[0071] The computer-readable storage medium stores a computer program. If the method of the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the computer storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer storage media do not include electric carrier signals and telecommunication signals.
[0072] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A cross-platform vector map feature symbol rendering method based on QGIS, characterized in that: The following steps are involved: A basic element library is established, and each basic element is mapped to a corresponding semantic description and stored in the basic element library; the semantic description is used to form the corresponding basic element and the parameter value corresponding to the basic element; the basic elements include points, simple lines, dot-dash lines, width gradient lines, double lines, simple surfaces, filled points and filled lines; the symbol composition rules applied to the basic elements are as follows: 1) Symbol color rules: A complex symbol is composed of many basic elements. In symbol design, there are requirements for different colors of each element, and there are also requirements for the same color of each element. Each element has a separate color, and the concept of symbol primary color is introduced. Among the basic elements that make up the symbol, the elements that have not selected a color all use the symbol primary color. When the colors of the elements of the symbol need to be consistent, there is no need to perform color selection multiple times; 2) Point elements: a symbol is composed of a positioning point and simple elements relative to the positioning point. The positioning point is the position of the center of the cross cursor during the drawing process. During the symbol design process, the positioning center is used as the origin to establish a two-dimensional coordinate system, add simple elements that constitute the symbol, and adjust the position of the simple elements relative to the origin. Simple elements include single points, polylines, polygons, arcs, text, and positioning point offsets. 3) Simple line element is a simple line class with fixed line width that can be drawn by just lifting and lowering the pen; 4) Dot-dash line elements are linear elements formed by regularly inserting point symbols according to defined rules. The rules include insertion point symbol methods such as period, endpoint, offset, etc. 5) Gradient width line element is a line type drawn by adding 2-3 gradient widths to a simple line; 6) Double line element is a double line element symbol composed of two simple lines or dash-dot lines with a certain width and connection form; 7) Simple surface elements are simple surface elements that are filled with no fill or a certain transparency of a color; 8) Fill point elements are divided into two categories: grid fill and center fill: a parallelogram is formed with a certain horizontal and vertical distance and offset angle, and a point symbol is filled at the grid point, and a point symbol is inserted at the centroid position of the surface element; 9) Fill line symbol is composed of line angle, starting offset and the spacing between two inserted lines; According to the symbol design instruction input by the user, the semantic description of the corresponding basic element is obtained to generate the symbol description of the corresponding symbol and save it in the symbol library: the symbol description is composed of the semantic description of the basic element; wherein the symbol description of each symbol is saved corresponding to a unique code; the symbol design instruction includes: basic element selection instruction, basic element parameter setting instruction and basic element superposition instruction; The method of obtaining the semantic description of the corresponding basic element according to the symbol design instruction input by the user and generating the symbol description of the corresponding symbol is specifically as follows: according to the basic element selection instruction and the basic element parameter setting instruction, the semantic description of the corresponding basic element is obtained to generate the sub-symbol description of the current layer; according to the basic element superposition instruction, the sub-symbol descriptions of each layer are superimposed to generate the symbol description of the corresponding symbol; the sub-symbol description of each layer includes the sub-color attribute of the basic element of the current layer, and the symbol description generated after the sub-symbol descriptions are superimposed includes the main color attribute, and the sub-color attribute is used to set the color of the corresponding basic element, and the main color attribute is used to set the color of all the basic elements of the current symbol that have not been set with color; the sub-symbol description of each layer also includes the coordinate attribute of the basic element, and the coordinate attribute is used to locate the position of the current basic element in the symbol to be drawn; Obtain the symbol description of the symbol to be drawn and use QGIS to render the symbol according to the symbol description and map parameter information; find the corresponding symbol description according to the unique code of the symbol to be drawn, identify and parse each sub-symbol description in the symbol description through basic semantic rules to obtain each basic element and the parameters of each basic element, and use GDI to construct the corresponding Pen or Brush for symbol rendering according to the parameters of each basic element; The symbol rendering includes three types: point, line and surface; When rendering point symbols, non-text symbols are directly drawn by a series of trajectory points after coordinate conversion, and text symbols are drawn by calculating the outline points of the text through PainterPath, and then obtaining the path through positioning points and coordinate conversion; When drawing a dotted gradient line, calculate the surface composed of the offset points on the upper and lower sides of the first and last points of the real part, a total of 4 points, and combine the multiple surfaces drawn by all real parts into a gradient line symbol; When drawing a grid-filled surface, with the help of QT drawing mechanism, first draw a primitive, set the primitive to the brush, and then use the brush to directly draw the entire surface entity.
2. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores an executable computer program, and the processor can read the computer program in the memory and run it to implement the cross-platform vector map feature symbol rendering method based on QGIS as claimed in claim 1.
3. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an executable computer program, and when the computer program is run, the cross-platform vector map feature symbol rendering method based on QGIS as claimed in claim 1 can be implemented.
Citation Information
Patent Citations
Electronic chart extension symbol construction system based on vector symbol description language
CN108733442A