A method and device for calculating and drawing a dynamic icon mapping vector curve

By obtaining a set of route points in QGIS software, establishing an icon coordinate system and processing coordinate changes caused by movement, smooth drawing of icons when moving along random routes on a two-dimensional map is achieved, solving the problem of tearing or deformation.

CN114792350BActive Publication Date: 2024-09-17湖北地信科技集团股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210182009.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2024-09-17
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The existing QGIS software cannot effectively draw icons on a two-dimensional map to avoid tearing or deformation when moving along random routes.

Method used

By obtaining the set of route points on the two-dimensional map, establishing the icon coordinate system, mapping the bottom matrix coordinates of the icon to the route surface, processing coordinate changes caused by movement along the trajectory line, integerization and interpolation processing, and finally performing transparency thresholding on the two-dimensional map Overlay drawing to ensure smoothness of icon movement.

Benefits of technology

Solved the problem of tearing or deformation of icons when moving along random routes on the 2D map, making the drawing process smoother and smoother.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792350B
    Figure CN114792350B
Patent Text Reader

Abstract

The present invention discloses a method and device for calculating and drawing a dynamic icon mapping vector curve, the method comprising the following steps: obtaining a set L of route points to be drawn by an icon S0 in a two-dimensional map coordinate system O; grouping the icon S0 in a vertical direction to obtain a set S of matrix coordinates under the icon coordinate system O'; mapping the bottom matrix coordinates of the icon S0 under the icon coordinate system to each point of any continuous subset L1 of the set L to the route surface of the coordinate system O to obtain mapping coordinates; cloning the mapping coordinates to a copy; obtaining the coordinates of the icon S0 after the line element changes; integerizing and interpolating the changed coordinates to obtain an integer coordinate set of H rows and a corresponding pixel value array; superimposing zero values ​​on the pixel value at the transparent threshold [R1, R2], and superimposing the icon S0 on the two-dimensional map. The present invention has the beneficial effect of making the drawing process of the two-dimensional icon on the map smoother and more fluent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of GIS data drawing, and in particular to a method and device for calculating and drawing a dynamic icon mapping vector curve. Background Art

[0002] The current QGIS software does not provide the function of drawing icons on two-dimensional line features. For any two-dimensional icon shape, when it moves along a random route on a two-dimensional map, its two-dimensional icon will be torn or deformed.

[0003] In order to solve the above problems, the part of the bottom of the two-dimensional icon that touches the route needs to be completely aligned, and the other shapes of the icon are mapped to the current position according to the map route and drawn to show the movement of the icon along the route, making the drawing process smoother and more fluent. Summary of the invention

[0004] In order to solve the above technical problems and in view of the above requirements, the present invention proposes a method for calculating and drawing a dynamic icon mapping vector curve.

[0005] The present application provides a method for calculating and drawing a dynamic icon mapping vector curve, including the following:

[0006] S1: Get the set of route points L[(x1, y1), (x2, y2)..., (x n ,y n )];

[0007] S2: Group the icons S0 in the vertical direction to obtain the matrix coordinate set S[[(1, 1), (1, 2)…, (1, H)], …[(W, 1), (W, 2)…, (W, H)]] in the icon coordinate system O′, where the size of the icon S0 is W×H; the pixel value set corresponding to each coordinate of the set S is V;

[0008] S3: Compare the bottom matrix coordinates [(1, H), (2, H)…, (W, H)] of icon S0 in icon coordinate system O′ with any continuous subset L1 [(x k ,y k ), (x k+1 ,y k+1 )...,(x k+W ,y k+W )] corresponds to the route surface mapped to the coordinate system O, and the mapping coordinates D1, D2, ..., D i , ..., D w ;in i is a positive integer between [1, W]; Di It represents the set coordinates of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon matrix coordinates mapped to the original coordinate system O;

[0009] S4: Map the coordinates D1, D2, ..., D i , ..., D W Clone to D 1t , D 2t , …, D it , ..., D Wt copy;

[0010] S5: From D1, D2, ..., D i , ..., D W Process the stretching, contraction, and invariance of adjacent mapped icon points due to the movement trend along the trajectory line, resulting in coordinate changes and recalculation to D 1t , D 2t , …, D it , ..., D Wt In the copy, the final icon S0 is D after the line element changes. 1t , D 2t , …, D it , ..., D Wt ;

[0011] S6: Traverse from row 1 to row H to extract D 1t , D 2t , …, D it , ..., D Wt Coordinate unit, where for any row of coordinates set Perform integerization and interpolation to obtain a new coordinate array set D it ′ and the corresponding pixel value array S it ′, and finally obtain the integer coordinate set D′ of H rows H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S′ 1t , S′ 2t ,…,S′ Wt ];

[0012] S7: Coordinate position D′ after icon transformation H And the corresponding pixel value S′ H , a zero value is superimposed on the pixel value at the transparent threshold [R1, R2], and the icon S0 is superimposed on the two-dimensional map.

[0013] Furthermore, the specific standard for establishing the icon coordinate system O′ in step S2 is:

[0014] L1 starting point (x k ,y k ) and S0 keep coincident at position (1, H). For any point i in L1, the coordinate point of L1 is P i (x k+i ,y k+i ), P i Point adjacent to the previous point P i-1 (x k+i-1 ,y k+i-1 ), with P i , P i-1 Draw a horizontal tangent line between the two points, passing through P i Draw a perpendicular normal to establish the coordinate system O′.

[0015] Furthermore, step S3 obtains the mapping coordinates D1, D2, ..., D i , ..., D W The specific process is:

[0016] S31: The transformation matrix between the coordinate system O′ and the original coordinate system O is The coordinates (1, j) of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon image matrix are converted to the coordinates (0, Hj) on the y' axis of the O' coordinate system, and mapped to the coordinate system O as The icon pixel drawing position is According to the above method, any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon image matrix is ​​mapped to the set coordinates of the original coordinate O

[0017] S32: Continue to traverse the second contact point (x k+1 ,y k+1 ) coincides with the position (2, H) of S0, and the second column of the vertical grouping of the S0 icon image matrix [(2, 1), (2, 2) ..., (2, H)] is mapped to the coordinate system O according to the method in S31 to generate a coordinate set

[0018] S33: Traverse the i-th contact point (x k+i ,y k+i ), the second column of the vertical grouping of the S0 icon image matrix [(i, 1), (i, 2) ..., (i, H)] is mapped to the coordinate system O to generate the coordinate set

[0019] S34: Traverse all contact points in L1 from 1, 2, ..., i ... W to generate D1, D2, ..., D W .

[0020] Furthermore, in step S5, the D after the icon S0 follows the line element changes is obtained. 1t , D 2t , …, D it , ..., D Wt The specific process is:

[0021] D i With D i+1 element According to the coordinate transformation relationship D i All coordinate elements in are on a straight line, calculate D i To D i+1 Angle of the straight line Pair from 1 to H vertically in sequence from D i To D i+1 The m rows of adjacent vectors corresponding to the original icon are

[0022] (a) When |θ| ≥ π / 180, it means that there is stretching or squeezing between adjacent icon columns. α is the coordinate and Displacement influence factor, β is the influence of D i , D i+1 The distance attenuation coefficient of the impact; D (i+1)t , …, D wt Update the position of m rows of arbitrary coordinate elements: D 1t , …, D it Location Updates:

[0023] When θ>0, it means that there is a stretch constraint α∈(0, 0.4) between adjacent icon columns;

[0024] When θ < 0, it means that there are squeezing constraints α∈(0.5, 1), β∈(0, 1) between adjacent icon columns;

[0025] Update and calculate D according to the above rules 1t , …, D Wt All coordinate elements in ;

[0026] (b) When Icons in two adjacent columns D i , D i+1 Parallel has no effect on the coordinate elements on the overall icon.1t , …, D Wt Remain unchanged.

[0027] Furthermore, in step S6, the integer transformation process is specifically as follows:

[0028] S61: traverse coordinate points from 1, ...k, ..., W;

[0029] S62: For any coordinate point The coordinate point Round to the nearest integer r is the rounding function, and the rounded coordinates are added to the temporary array The corresponding pixel value V ki Append to temporary array S′;

[0030] S63: Adjacent points vector for Direction vector to adjacent points, vector integer distance When d>1, in the sequence 1,…,d, in the vector The direction takes the coordinates in sequence. When the corresponding sequence is the jth, the coordinates of the newly inserted point are calculated by the vector coordinate position. The corresponding pixel value, if the condition j>d / 2 is satisfied, then V (k+1)i Append to S[i]′, otherwise V ki Append to S[i]′; at the same time, (x j ,y j )Integerized append to array Remove duplicate coordinates with the same value in the same xy direction in array T, and remove the S′ elements at the corresponding array positions;

[0031] S64: Append all coordinate elements in the temporary arrays T and S' to D respectively it ′、S it ′;

[0032] S65: traverse 1, ..., W in sequence, and generate the final D for each row it ′ and the corresponding pixel set S it ', according to the above, we get the integer coordinate set D' of the last row H H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′].

[0033] A device for calculating and drawing a dynamic icon mapping vector curve, the device comprising:

[0034] Route drawing acquisition module: obtains the route point set L[(x1, y1), (x2, y2)..., (x n ,y n )];

[0035] Icon coordinate acquisition module: group icons S0 in the vertical direction to obtain a matrix coordinate set S[[(1, 1), (1, 2)…, (1, H)], …[(W, 1), (W, 2)…, (W, H)]] in the icon coordinate system O′, where the size of icon S0 is W×H; the pixel value set corresponding to each coordinate of the set S is V;

[0036] Coordinate mapping module: The bottom matrix coordinates [(1, H), (2, H)…, (W, H)] of icon S0 in icon coordinate system O′ are mapped to any continuous subset L1 [(x k ,y k ), (x k+1 ,y k+1 )...,(x k+W ,y k+W )] corresponds to the route surface mapped to the coordinate system O, and the mapping coordinates D1, D2, ..., D i , ..., D w ;in i is a positive integer between [1, W]; D i It represents the set coordinates of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon matrix coordinates mapped to the original coordinate system O;

[0037] Coordinate copy module: map coordinates D1, D2, ..., D i , ..., D W Clone to D 1t , D 2t , …, D it , ..., D Wt copy;

[0038] Coordinate update module: from D1, D2, ..., D i , ..., D W Process the stretching, contraction, and invariance of adjacent mapped icon points due to the movement trend along the trajectory line, resulting in coordinate changes and recalculation to D 1t , D 2t , …, D it , ..., DWt In the copy, the final icon S0 is D after the line element changes. 1t , D 2t , …, D it , ..., D Wt ;

[0039] Coordinate processing module: traverse from row 1 to row H to extract D 1t , D 2t , …, D it , …, D Wt Coordinate unit, where for any row of coordinates set Perform integerization and interpolation to obtain a new coordinate array set D it ′ and the corresponding pixel value array S it ′, and finally obtain the integer coordinate set D′ of H rows H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′];

[0040] Overlay drawing module: coordinate position D′ after icon transformation H And the corresponding pixel value S′ H , a zero value is superimposed on the pixel value at the transparent threshold [R1, R2], and the icon S0 is superimposed on the two-dimensional map.

[0041] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of calculating and drawing the dynamic mapping vector curve of the icon are realized.

[0042] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of calculating and drawing the icon dynamic mapping vector curve are implemented.

[0043] Compared with the prior art, the beneficial effects of the present invention include: solving the problem that the two-dimensional icon of any two-dimensional shape will be torn or deformed when moving along a random route on a two-dimensional map, making the drawing process smoother and more fluent. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of the method of the present invention;

[0045] Figure 2is a schematic diagram of any route to be drawn;

[0046] Figure 3 It is a schematic diagram of the relative relationship between coordinate system O′ and coordinate system O;

[0047] Figure 4 It is a schematic diagram of the two-dimensional icon S0. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0049] In order to better explain the present invention, the present invention firstly describes the relevant principles of the photovoltaic power generation system.

[0050] Please refer to Figure 1 , Figure 1 is a flow chart of the method of the present invention;

[0051] S1: Get the set of route points L[(x1, y1), (x2, y2)..., (x n ,y n )];

[0052] Please refer to Figure 2 , Figure 2 is a schematic diagram of any route to be drawn; the starting point of the route is (x1, y1) and the end point is (x n ,y n );

[0053] S2: Group the icons S0 in the vertical direction to obtain the matrix coordinate set S[[(1, 1), (1, 2)…, (1, H)], …[(W, 1), (W, 2)…, (W, H)]] in the icon coordinate system O′, where the size of the icon S0 is W×H; the pixel value set corresponding to each coordinate of the set S is V;

[0054] S3: Compare the bottom matrix coordinates [(1, H), (2, H)…, (W, H)] of icon S0 in icon coordinate system O′ with any continuous subset L1 [(x k ,y k ), (x k+1 ,y k+1 )...,(x k+W ,y k+W )] corresponds to the route surface mapped to the coordinate system O, and the mapping coordinates D1, D2, ..., D i , ..., Dw ;in i is a positive integer between [1, W]; D i It represents the set coordinates of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon matrix coordinates mapped to the original coordinate system O;

[0055] Please refer to Figure 2 , Figure 2 (x k ,y k ) to (x k+W ,y k+W ) is any sub-continuous route in the route to be drawn, that is, L1 described in step S2;

[0056] It should be noted that the specific standard for establishing the icon coordinate system O′ in step S2 is:

[0057] Please refer to Figure 3 , Figure 3 It is a schematic diagram of the relative relationship between coordinate system O′ and coordinate system O;

[0058] L1 starting point (x k ,y k ) and S0 keep coincident at position (1, H). For any point i in L1, the coordinate point of L1 is P i (x k+i ,y k+i ), P i Point adjacent to the previous point P i-1 (x k+i-1 ,y k+i-1 ), with P i , P i-1 Draw a horizontal tangent line between the two points, passing through P i Draw a perpendicular normal to establish the coordinate system O′.

[0059] Please refer to Figure 4 , Figure 4 It is a schematic diagram of the two-dimensional icon S0.

[0060] It should be noted that step S3 obtains the mapping coordinates D1, D2, ..., D i , ..., D W The specific process is:

[0061] S31: The transformation matrix between the coordinate system O′ and the original coordinate system O is The coordinates (1, j) of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon image matrix are converted to the coordinates (0, Hj) on the y' axis of the O' coordinate system, and mapped to the coordinate system O as The icon pixel drawing position is According to the above method, any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon image matrix is ​​mapped to the set coordinates of the original coordinate O

[0062] S32: Continue to traverse the second contact point (x k+1 ,y k+1 ) coincides with the position (2, H) of S0, and the second column of the vertical grouping of the S0 icon image matrix [(2, 1), (2, 2) ..., (2, H)] is mapped to the coordinate system O according to the method in S31 to generate a coordinate set

[0063] S33: Traverse the i-th contact point (x k+i ,y k+i ), the second column of the vertical grouping of the S0 icon image matrix [(i, 1), (i, 2) ..., (i, H)] is mapped to the coordinate system O to generate the coordinate set

[0064] S34: Traverse all contact points in L1 from 1, 2, ..., i ... W to generate D1, D2, ..., D W .

[0065] S4: Map the coordinates D1, D2, ..., D i , ..., D W Clone to D 1t , D 2t , …, D it , ..., D Wt copy;

[0066] S5: From D1, D2, ..., D i , ..., D W Process the stretching, contraction, and invariance of adjacent mapped icon points due to the movement trend along the trajectory line, resulting in coordinate changes and recalculation to D 1t , D 2t , …, D it , ..., D Wt In the copy, the final icon S0 is D after the line element changes. 1t , D 2t , …, D it , …, D Wt ;

[0067] It should be noted that in step S5, the D after the icon S0 follows the line element changes 1t , D 2t , …, D it , ..., D WtThe specific process is:

[0068] D i With D i+1 element According to the coordinate transformation relationship D i All coordinate elements in are on a straight line, calculate D i To D i+1 Angle of the straight line Pair from 1 to H vertically in sequence from D i To D i+1 The m rows of adjacent vectors corresponding to the original icon are

[0069] (a) When |θ| ≥ π / 180, it means that there is stretching or squeezing between adjacent icon columns. α is the coordinate and Displacement influence factor, β is the influence of D i , D i+1 The distance attenuation coefficient of the impact; D (i+1)t , …, D wt Update the position of m rows of arbitrary coordinate elements: D 1t , …, D it Location Updates:

[0070] When θ>0, it means that there is a stretch constraint α∈(0, 0.4) between adjacent icon columns;

[0071] When θ < 0, it means that there are squeezing constraints α∈(0.5, 1), β∈(0, 1) between adjacent icon columns;

[0072] Update and calculate D according to the above rules 1t , …, D Wt All coordinate elements in ;

[0073] (b) When Icons in two adjacent columns D i , D i+1 Parallel has no effect on the coordinate elements on the overall icon. 1t , …, D Wt Remain unchanged.

[0074] S6: Traverse from row 1 to row H to extract D 1t , D 2t , …, D it , ..., D Wt Coordinate unit, where for any row of coordinates set Perform integerization and interpolation to obtain a new coordinate array set D it ′ and the corresponding pixel value array S it ′, and finally obtain the integer coordinate set D′ of H rows H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array

[0075] S′ H =[S′ 1t , S′ 2t ,…,S′ Wt ];

[0076] It should be noted that, in step S6, the integer transformation process is specifically as follows:

[0077] S61: traverse coordinate points from 1, ...k, ..., W;

[0078] S62: For any coordinate point The coordinate point Round to the nearest integer r is the rounding function, and the rounded coordinates are added to the temporary array The corresponding pixel value V ki Append to temporary array S′;

[0079] S63: Adjacent points vector for Direction vector to adjacent points, vector integer distance When d>1, in the sequence 1,…,d, in the vector The direction takes the coordinates in sequence. When the corresponding sequence is the jth, the coordinates of the newly inserted point are calculated by the vector coordinate position. The corresponding pixel value, if the condition j>d / 2 is satisfied, then V (k+1)i Append to S[i]′, otherwise V ki Append to S[i]′; at the same time, (x j ,y j ) Integerized additional insert number Remove duplicate coordinates with the same value in the same xy direction in array T, and remove the S′ elements at the corresponding array positions;

[0080] S64: Append all coordinate elements in the temporary arrays T and S' to D respectively it ′、S it ′;

[0081] S65: traverse 1, ..., W in sequence, and generate the final D for each rowit ′ and the corresponding pixel set S it ', according to the above, we get the integer coordinate set D of the last row H H ′=[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′].

[0082] S7: Coordinate position D′ after icon transformation H And the corresponding pixel value S′ H , a zero value is superimposed on the pixel value at the transparent threshold [R1, R2], and the icon S0 is superimposed on the two-dimensional map.

[0083] A device for calculating and drawing a dynamic icon mapping vector curve, the device comprising:

[0084] Route drawing acquisition module: obtains the route point set L[(x1, y1), (x2, y2)..., (x n ,y n )];

[0085] Icon coordinate acquisition module: group icons S0 in the vertical direction to obtain a matrix coordinate set S[[(1, 1), (1, 2)…, (1, H)], …[(W, 1), (W, 2)…, (W, H)]] in the icon coordinate system O′, where the size of icon S0 is W×H; the pixel value set corresponding to each coordinate of the set S is V;

[0086] Coordinate mapping module: The bottom matrix coordinates [(1, H), (2, H)…, (W, H)] of icon S0 in icon coordinate system O′ are mapped to any continuous subset L1 [(x k ,y k ), (x k+1 ,y k+1 )...,(x k+W ,y k+W )] corresponds to the route surface mapped to the coordinate system O, and the mapping coordinates D1, D2, ..., D i , ..., D w ;in i is a positive integer between [1, W]; D iIt represents the set coordinates of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon matrix coordinates mapped to the original coordinate system O;

[0087] Coordinate copy module: map coordinates D1, D2, ..., D i , ..., D W Clone to D 1t , D 2t , …, D it , ..., D Wt copy;

[0088] Coordinate update module: from D1, D2, ..., D i , ..., D W Process the stretching, contraction, and invariance of adjacent mapped icon points due to the movement trend along the trajectory line, resulting in coordinate changes and recalculation to D 1t , D 2t , …, D it , ..., D Wt In the copy, the final icon S0 is D after the line element changes. 1t , D 2t , …, D it , ..., D Wt ;

[0089] Coordinate processing module: traverse from row 1 to row H to extract D 1t , D 2t , …, D it , …, D Wt Coordinate unit, where for any row of coordinates set Perform integerization and interpolation to obtain a new coordinate array set D it ′ and the corresponding pixel value array S it ′, and finally obtain the integer coordinate set D′ of H rows H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′];

[0090] Overlay drawing module: coordinate position D′ after icon transformation H And the corresponding pixel value S′ H , a zero value is superimposed on the pixel value at the transparent threshold [R1, R2], and the icon S0 is superimposed on the two-dimensional map.

[0091] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of calculating and drawing the dynamic mapping vector curve of the icon are realized.

[0092] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of calculating and drawing the icon dynamic mapping vector curve are implemented.

[0093] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0094] The beneficial effects of the present invention are: solving the problem that when an arbitrary two-dimensional icon shape moves along a random route on a two-dimensional map, its two-dimensional icon will be torn or deformed, making the drawing process smoother and more fluent.

[0095] The specific implementation of the present invention described above does not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for calculating and drawing a dynamic icon mapping vector curve, characterized in that: The following steps are involved: S1: Get the set of route points L[(x1, y1), (x2, y2)..., (x n ,y n )]; S2: Group the icons S0 in the vertical direction to obtain the matrix coordinate set S[[(1, 1), (1, 2)…, (1, H)], …[(W, 1), (W, 2)…, (W, H)]] in the icon coordinate system O′, where the size of the icon S0 is W×H; the pixel value set corresponding to each coordinate of the set S is V; S3: Compare the bottom matrix coordinates [(1, H), (2, H)…, (W, H)] of icon S0 in icon coordinate system 0′ with any continuous subset L1 [(x k ,y k ), (x k+1 ,y k+1 )...,(x k+W ,y k+W )] is mapped to the route surface of coordinate system O, and the mapping coordinates D1, D2, ..., D i , ..., D w ;in i is a positive integer between [1, W]; D i It represents the set coordinates of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon matrix coordinates mapped to the original coordinate system 0; S4: Map the coordinates D1, D2, ..., D i , ..., D W Clone to D 1t , D 2t , …, D it , ..., D Wt copy; S5: From D1, D2, ..., D i , ..., D W Process the stretching, contraction, and invariance of adjacent mapped icon points due to the movement trend along the trajectory line, resulting in coordinate changes and recalculation to D 1t , D 2t , …, D it , ..., D Wt In the copy, the final icon S0 is D after the line element changes. 1t , D 2t , …, D it , ..., D Wt ; S6: Traverse from row 1 to row H to extract D 1t , D 2t , …, D it , ..., D Wt Coordinate unit, where for any row of coordinates set Perform integerization and interpolation to obtain a new coordinate array set D it ′ and the corresponding pixel value array S it ′, and finally obtain the integer coordinate set D′ of H rows H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′]; S7: Coordinate position D′ after icon transformation H And the corresponding pixel value S′ H , a zero value is superimposed on the pixel value at the transparent threshold [R1, R2], and the icon S0 is superimposed on the two-dimensional map.

2. The method for calculating and drawing a dynamic icon mapping vector curve according to claim 1, characterized in that: The specific standard for establishing the icon coordinate system O′ in step S2 is: L1 starting point (x k ,y k ) and S0 keep coincident at position (1, H). For any point i in L1, the coordinate point of L1 is P i (x k+i ,y k+i ), P i Point adjacent to the previous point P i-1 (x k+i-1 ,y k+i-1 ), with P i , P i-1 Draw a horizontal tangent line between the two points, passing through P i Draw a perpendicular normal to establish the coordinate system O′.

3. The method for calculating and drawing a dynamic icon mapping vector curve according to claim 2, characterized in that: Step S3 obtains the mapping coordinates D1, D2, ..., D i , ..., D W The specific process is: S31: The transformation matrix between the coordinate system O′ and the original coordinate system O is The coordinates (1, j) of any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon image matrix are converted to the coordinates (0, Hj) on the y' axis of the O' coordinate system, and mapped to the coordinate system O as The icon pixel drawing position is According to the above method, any pixel in the first column [(1, 1), (1, 2) ..., (1, H)] of the vertical grouping of the S0 icon image matrix is ​​mapped to the set coordinates of the original coordinate O S32: Continue to traverse the second contact point (x k+1 ,y k+1 ) coincides with the position (2, H) of S0, and the second column of the vertical grouping of the S0 icon image matrix [(2, 1), (2, 2) ..., (2, H)] is mapped to the coordinate system O according to the method in S31 to generate a coordinate set S33: Traverse the i-th contact point (x k+i ,y k+i ), the second column of the vertical grouping of the S0 icon image matrix [(i, 1), (i, 2) ..., (i, H)] is mapped to the coordinate system O to generate the coordinate set S34: Traverse all contact points in L1 from 1, 2, ..., i ... W to generate D1, D2, ..., D W .

4. The method for calculating and drawing a dynamic icon mapping vector curve according to claim 1, characterized in that: Step S5 obtains the D after the icon S0 changes with the line element. 1t , D 2t , …, D it , ..., D Wt The specific process is: D i With D i+1 element , according to the coordinate transformation relationship D i All coordinate elements in are on a straight line, calculate D i To D i+1 Angle of the straight line The m rows of adjacent vectors corresponding to the original icon are paired vertically from 1...H from Di to Di+1. (a) When |θ| ≥ π / 180, it means that there is stretching or squeezing between adjacent icon columns. α is the coordinate and Displacement influence factor, β is the influence of D i , D i+1 The distance attenuation coefficient of the impact; D (i+1)t , …, D wt Update the position of m rows of arbitrary coordinate elements: D 1t , …, D it Location Updates: When θ>0, it means that there is a stretch constraint α∈(0, 0.4) between adjacent icon columns; When θ < 0, it means that there are squeezing constraints α∈(0.5, 1), β∈(0, 1) between adjacent icon columns; Update and calculate D according to the above rules 1t , …, D Wt All coordinate elements in ; (b) When Icons in two adjacent columns D i , D i+1 Parallel has no effect on the coordinate elements on the overall icon. 1t , …, D Wt Remain unchanged.

5. The method for calculating and drawing a dynamic icon mapping vector curve according to claim 1, characterized in that: In step S6, the integer transformation process is specifically as follows: S61: traverse coordinate points from 1, ...k, ..., W; S62: For any coordinate point The coordinate point Round to the nearest integer r is the rounding function, and the rounded coordinates are added to the temporary array The corresponding pixel value V ki Append to temporary array S′; S63: Adjacent points vector for Direction vector to adjacent points, vector integer distance When d>1, in the sequence 1,…,d, in the vector The direction takes the coordinates in sequence. When the corresponding sequence is the jth, the coordinates of the newly inserted point are calculated by the vector coordinate position. The corresponding pixel value, if the condition j>d / 2 is satisfied, then V (k+1)i Append to S[i]′, otherwise V ki Append to S[i]′; at the same time, (x j ,y j )Integerized append to array Remove duplicate coordinates with the same value in the same xy direction in array T, and remove the S′ elements at the corresponding array positions; S64: Append all coordinate elements in the temporary arrays T and S' to D respectively it ′、S it ′; S65: traverse 1, ..., W in sequence, and generate the final D for each row it ′ and the corresponding pixel set S it ', according to the above, we get the integer coordinate set D' of the last row H H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′].

6. An icon dynamic mapping vector curve calculation and drawing device, characterized in that: The device comprises: Route drawing acquisition module: obtains the route point set L[(x1, y1), (x2, y2)..., (x n ,y n )]; Icon coordinate acquisition module: group icons S0 in the vertical direction to obtain a matrix coordinate set S[[(1, 1), (1, 2)…, (1, H)], …[(W, 1), (W, 2)…, (W, H)]] in the icon coordinate system O′, where the size of icon S0 is W×H; the pixel value set corresponding to each coordinate of the set S is V; Coordinate mapping module: The bottom matrix coordinates [(1, H), (2, H)…, (W, H)] of icon S0 in icon coordinate system O′ are mapped to any continuous subset L1 [(x k ,y k ), (x k+1 ,y k+1 )...,(x k+W ,y k+W )] is mapped to the route surface of coordinate system O, and the mapping coordinates D1, D2, ..., D i , ..., D w ;in i is a positive integer between [1, W]; Di represents the set coordinates of any pixel in the first column [(1, 1), (1, 2)…, (1, H)] of the vertical grouping of the S0 icon matrix coordinates mapped to the original coordinate system O; Coordinate copy module: map coordinates D1, D2, ..., D i , ..., D W Clone to D 1t , D 2t , …, D it , ..., D Wt copy; Coordinate update module: from D1, D2, ..., D i , ..., D W Process the stretching, contraction, and invariance of adjacent mapped icon points due to the movement trend along the trajectory line, resulting in coordinate changes and recalculation to D 1t , D 2t , …, D it , ..., D Wt In the copy, the final icon S0 is D after the line element changes. 1t , D 2t , …, D it , ..., D Wt ; Coordinate processing module: traverse from row 1 to row H to extract D 1t , D 2t , …, D it , ..., D Wt Coordinate unit, where for any row of coordinates set Perform integerization and interpolation to obtain a new coordinate array set D it ′ and the corresponding pixel value array S it ′, and finally obtain the integer coordinate set D′ of H rows H =[D 1t ′,D 2t ′,…,D Wt ′] and the corresponding pixel value array S′ H =[S 1t ′,S 2t ′,…,S Wt ′]; Overlay drawing module: coordinate position D′ after icon transformation H And the corresponding pixel value S′ H , a zero value is superimposed on the pixel value at the transparent threshold [R1, R2], and the icon S0 is superimposed on the two-dimensional map.

7. A computer device, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of calculating and drawing the dynamic mapping vector curve of the icon as claimed in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of calculating and drawing the icon dynamic mapping vector curve according to any one of claims 1 to 5 are implemented.