A road condition drawing method, related device and client
By intercepting and mapping road condition textures based on road texture templates, and combining gradient processing and alpha value recognition, the jagging and hollowing problems when the scale of road condition graphics and road graphic in the map are solved, improving the drawing effect and efficiency.
Patent Information
- Application Number
- CN202010080558.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-05
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2040-02-05
AI Technical Summary
In the prior art, map road conditions and road patterns are prone to problems such as jagged or hollowed out when the scale is changed, and the drawing efficiency of irregular shape patterns is inefficient.
By intercepting the appropriate width of the road condition texture template from the road condition texture template according to the preset road texture template and mapping it to the end position of the road, combining gradient processing and alpha values to identify irregular windows, improve the drawing effect and efficiency.
The gap between road width and road conditions is avoided, the graphical display effect of maps is improved, the serration and hollow problems are solved, and the drawing efficiency of irregular graphics is improved.
Smart Images

Figure CN113223134B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer graphics processing, and in particular to a method for drawing road conditions, a related device and a client. Background Art
[0002] The rendering pipeline, also known as the rendering pipeline, refers to the series of processing steps that the rendering image must go through. Rendering pipelines can be divided into two categories: fixed pipelines and programmable pipelines.
[0003] The fixed pipeline does not require or allow customization of the specific logic of vertex rendering and pixel rendering. It has a complete set of rendering processes solidified within it. An example of a fixed pipeline rendering process generally includes the following functions:
[0004] 1. Vertex Transformation;
[0005] 2. Primitive Assembly and Rasterization;
[0006] 3. Fragment Texturing and Coloring;
[0007] 4. Raster Operations;
[0008] The programmable pipeline allows programmers to program the two stages of the above pipeline:
[0009] Vertex shader implements the functions of the vertex transformation stage;
[0010] Fragment Shader (also called pixel shader) implements the functions of fragment texturing and coloring.
[0011] A fragment shader is a programmable unit that processes fragment values and their associated data. A fragment shader can perform operations such as texture access, color aggregation, and fogging.
[0012] When the fragment shader is processing the rendering of map road conditions, it is easy for the road condition graphics to not fit well with the road graphics when the map scale changes, resulting in jagged or hollow effects.
[0013] In addition, during the map rendering process, if irregular shapes (called special shapes) are to be rendered, in the actual processing process, more complex methods are usually used for calculations, such as a large number of Boolean operations. On the one hand, it lacks flexibility, and on the other hand, there is a situation in which the execution efficiency is low or the graphics effect is poor during the graphics drawing process. Summary of the Invention
[0014] In view of the above problems, the present invention is proposed to provide a method, related device and client for road condition mapping that overcomes the above problems or at least partially solves the above problems.
[0015] In a first aspect, an embodiment of the present invention provides a road condition mapping method, comprising:
[0016] According to the preset road texture template, determining the width of the road texture to be intercepted from the preset road texture template;
[0017] According to the width, intercepting the road condition texture of the corresponding width from the road condition texture template, wherein the intercepted road condition texture includes a road condition color value;
[0018] The intercepted road condition texture is mapped to a position corresponding to the end of the road to be drawn.
[0019] In one embodiment, determining the width of the road texture to be intercepted from the preset road texture template according to the preset road texture template includes:
[0020] Determine the ratio F of the sum of the width of the road texture in the road texture template and the width of the road texture to the total width of the road texture template ratio1 ;
[0021] By the proportional value F ratio1 and the width L2 of the road condition texture template to obtain the width L1 of the intercepted texture in the road condition texture template.
[0022] In one embodiment, the road condition texture and the road texture each include two texture intervals, wherein the two adjacent intervals of the road condition texture and the road texture constitute a texture buffer interval S3;
[0023] After the intercepted texture is mapped to a corresponding position on one side or both sides of the road to be drawn, the method further includes:
[0024] The portion of the road to be drawn corresponding to the texture buffer is processed in a gradient style.
[0025] In one embodiment, the captured texture is mapped to a corresponding position on one side or both sides of the road to be drawn, including:
[0026] The intercepted texture is stretched horizontally and fit to the corresponding position at one end or both ends of the road to be drawn; the stretching width satisfies that the width of the texture containing the road condition color value in the intercepted texture is equal to the width of the road condition graphic actually required for the road to be drawn.
[0027] In one embodiment, the method for mapping road conditions further includes:
[0028] When it is necessary to display map information in a designated window, a preset image is loaded onto the map to be cropped; the preset image includes a graphic having the same shape as the designated window, and different alpha values are used to distinguish the graphic outside, on the lines of, and inside the graphic;
[0029] According to the alpha value of the read image, it is determined whether the pixel on the map to be cropped is located within the graphic. If so, the pixel is displayed, otherwise it is not displayed.
[0030] In a second aspect, an embodiment of the present invention provides a device for mapping road conditions, including:
[0031] A determination module, configured to determine the width of the road texture to be intercepted from the preset road texture template according to the preset road texture template;
[0032] an interception module, configured to intercept the road condition texture of corresponding width from the road condition texture template according to the width, wherein the intercepted road condition texture includes a road condition color value;
[0033] A mapping module is used to map the intercepted road texture to a position corresponding to the end of the road to be drawn.
[0034] In one embodiment, the determining module is specifically configured to determine a ratio F of the sum of the width of the road texture in the road texture template and the width of the road texture to the total width of the road texture template. ratio1 ; Through the ratio value F ratio1 and the width L2 of the road condition texture template to obtain the width L1 of the intercepted texture in the road condition texture template.
[0035] In one embodiment, the road condition drawing device may further include:
[0036] A window recognition module is used to load a preset image onto the map to be cropped when it is necessary to display map information in a specified window; the preset image contains a graphic with the same shape as the specified window, which is distinguished by different alpha values outside the graphic, on the lines of the graphic, and inside the graphic; based on the alpha value of the read image, it is determined whether the pixel on the map to be cropped is within the graphic. If so, the pixel is displayed; otherwise, it is not displayed.
[0037] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which implement the aforementioned road condition mapping method when executed by a processor.
[0038] In a fourth aspect, an embodiment of the present invention provides a navigation client, comprising: a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the instructions, when executed by the processor, are capable of executing the following road condition mapping method:
[0039] According to the preset road texture template, determining the width of the road texture to be intercepted from the preset road texture template;
[0040] According to the width, intercepting the road condition texture of the corresponding width from the road condition texture template, wherein the intercepted road condition texture includes a road condition color value;
[0041] The intercepted road condition texture is mapped to a position corresponding to the end of the road to be drawn.
[0042] The beneficial effects of the above technical solutions provided by the embodiments of the present invention include at least:
[0043] The above-mentioned road condition drawing method provided by the embodiment of the present invention refers to a preset road texture template, intercepts the required road condition texture width from the preset road condition texture template, and maps the intercepted texture to the end position (one end or both ends) of the road to be drawn according to the actual situation of the road to be drawn. It can dynamically adjust the width of the road condition width texture that matches the road to be drawn according to the actual road drawing needs, for example, according to the scale of the map display, thereby avoiding the phenomenon of a gap (hollow) between the road width and the road condition width in the prior art, and improving the map graphical display effect.
[0044] In the embodiment of the present invention, the portion of the road to be drawn corresponding to the second texture interval S3 is processed in a gradient style, and the color transition between the road width portion (the colored portion) and the road portion is natural, which can avoid the jagged problem that exists when different scales are magnified.
[0045] The present invention also uses the alpha values inside, outside and on the graphics that are consistent with the window shape in a preset picture to identify windows with irregular graphics. The method is simple and has high operating efficiency, avoiding the problem of low operating efficiency caused by a large number of Boolean operations.
[0046] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0047] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0049] Figure 1 A schematic diagram of a method for drawing road width in an existing map in the prior art;
[0050] Figure 2 A schematic diagram of the effect of road width and road fitting in the prior art;
[0051] Figure 3 This is a flow chart of a road condition drawing method according to an embodiment of the present invention;
[0052] Figure 4 Schematic diagram of a road texture template according to an embodiment of the present invention;
[0053] Figure 5 Schematic diagram of a road condition texture template in an embodiment of the present invention;
[0054] Figure 6 Flowchart for implementing step S31 in an embodiment of the present invention;
[0055] Figure 7 A schematic diagram of mapping a captured texture to a road to be drawn in an embodiment of the present invention;
[0056] Figure 8 Schematic diagram of using an image to identify an irregularly shaped window in an embodiment of the present invention;
[0057] Figure 9 Schematic diagram of a device for mapping road conditions in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0059] Before describing the road condition drawing method provided by the embodiment of the present invention, a brief description of the road condition drawing method in the prior art is given.
[0060] For example, refer to Figure 1 As shown, an existing method used when drawing road conditions (also known as real-time traffic information, Traffic Message Channel, TMC) on a map is as follows: use a road condition width graphic to overlay the width of the road itself, that is, stretch the texture image of the road condition width to fit the road graphic, so as to achieve the effect of the road condition fitting the edge. This method avoids saving separate shape points when drawing road conditions, and the drawing method reuses the road method, which is simple to draw. However, this drawing method, because the road condition width and the width of the road itself are fixed, will cause the map to switch scales due to the inherent characteristics of the road condition width texture image (except for the parts on both sides with colors indicating congestion status, the middle is transparent), which will cause the map to appear when the scale is switched. Figure 2 The traffic graphics shown do not fit well with the road graphics, resulting in a jagged or hollow effect.
[0061] Based on the above-mentioned existing map drawing process in the prior art, the road width and the road width are not well aligned, which easily leads to problems such as hollowness and jaggedness. In order to improve the user experience, the embodiments of the present invention provide a road condition drawing method, related devices and client, which are respectively described in conjunction with the accompanying drawings below.
[0062] A method for mapping road conditions provided by an embodiment of the present invention is described with reference to Figure 3 Shown, including:
[0063] S31. Determine, based on a preset road texture template, the width of the road texture to be intercepted from the preset road texture template;
[0064] S32. According to the width, intercepting the road condition texture of the corresponding width from the road condition texture template, wherein the intercepted road condition texture includes a road condition color value;
[0065] S33: Map the intercepted road texture to a position corresponding to the end of the road to be drawn.
[0066] In step S33 , the captured texture is mapped to corresponding positions at one or both ends of the road to be drawn.
[0067] The above-mentioned road condition drawing method provided by the embodiment of the present invention refers to a preset road texture template, intercepts the required road condition texture width from the preset road condition texture template, and maps the intercepted texture to the end position (one end or both ends) of the road to be drawn according to the actual situation of the road to be drawn. It can dynamically adjust the width of the road condition width texture that matches the road to be drawn according to the actual road drawing needs, for example, according to the scale of the map display, thereby avoiding the phenomenon of a gap (hollow) between the road width and the road condition width in the prior art, and improving the map graphical display effect.
[0068] Refer to Figure 4 The road texture template shown in Figure 4 In the middle is the road texture template with superimposed road condition information, which is divided into three parts. The middle part is the road texture, and the two ends of the road texture are the superimposed road condition width textures.
[0069] In this road texture template, the road texture and the road condition width texture fit closely together and are generated in advance according to the requirements of map drawing. Specifically, the color and width of the road condition width texture can be generated in advance according to the requirements.
[0070] During implementation, corresponding road texture templates can be set according to different scales and for the actual roads to be drawn.
[0071] Reference Figure 5 The road condition texture template shown includes: a texture of a road condition color value and a transparent texture (this section of texture has no color).
[0072] The texture of the road condition color value in the road condition texture template can be set to various different colors according to the actual needs of reflecting road condition information, such as green, yellow, red, and dark red, which respectively represent different degrees of congestion. Of course, other color representation methods can also be used, such as color depth, etc., and the embodiment of the present invention is not limited to this.
[0073] In one embodiment, the above step S31 determines the width of the road texture to be intercepted from the preset road texture template according to the preset road texture template. In specific implementation, it can be implemented in the following manner:
[0074] Reference Figure 6 As shown, the method includes the following steps:
[0075] S61, determining the ratio F of the sum of the width of the road texture in the road texture template and the width of the road texture to the total width of the road texture template ratio1 ;
[0076] S62, through the proportional value F ratio1 And the width L2 of the road texture template, the width L1 of the texture intercepted in the road texture template is obtained, L1 satisfies: L1=L2*F ratio1 .
[0077] When setting the road texture template, the ratio of the road color part and the transparent part inside it can be set as needed, such as 3:8 or other values.
[0078] Still a reference Figure 4 As shown, the sum of the width of the road texture and the road texture is Figure 4 The width of S4.
[0079] In one embodiment, the sum of the road width texture and the road texture is S4. The road width texture and the road texture each include two texture intervals. Specifically, they can be further divided into a first texture interval S1 and a second texture interval S3.
[0080] The first texture interval S1 is a portion of the road width texture, and the second texture interval S3 includes another portion of the road width texture and a portion of the road texture;
[0081] In one embodiment, the first texture interval S1 occupies, for example, 80% to 90% of the road width texture;
[0082] The second texture section S3 accounts for 10% to 20% of the road width texture, for example.
[0083] The width of S1 and S3 can be adjusted according to actual conditions.
[0084] In one embodiment, when the above S32 is implemented, refer to Figure 7 As shown, the texture intercepted in step S32 can be stretched in the width direction and fit to the corresponding position at one end or both ends of the road to be drawn; the stretched width satisfies that the width of the texture containing the road condition color value in the intercepted texture is equal to the road condition width actually required for the road to be drawn.
[0085] The reason for setting part of the second texture interval S3 is that when the intercepted texture is subsequently mapped proportionally to the road to be drawn, the corresponding part can be gradient processed. Specifically, after the above step S32, the part on the road to be drawn corresponding to the second texture interval S3 (the texture buffer composed of the two intervals adjacent to the road texture and the road texture) is processed in a gradient style. There are many ways to use gradient processing, such as the gradient method of the smoothstep function.
[0086] After gradient processing, the color transition between the road width part (the colored part) and the road part is natural, which can avoid the jagged problem that exists when zooming in at different scales.
[0087] In the process of drawing map graphics, there may be other problems. For example, when displaying map information in a specific area, the shape of this area is irregular. The usual approach is to perform Boolean operations on the area to be displayed and the window boundary to determine which areas are inside the window and which are outside the window. However, for windows with irregular shapes, the large number of Boolean operations required will lead to low efficiency. To solve this problem, the embodiment of the present invention can adopt the following method:
[0088] When it is necessary to display map information in a specified window, a preset image is loaded onto the map to be cropped. The preset image contains a graphic with the same shape as the specified window, and different alpha values are used to distinguish the graphics outside, on the lines of, and inside the graphics.
[0089] Based on the alpha value of the read image, determine whether the pixel on the map to be cropped is within the graphic. If so, display the pixel, otherwise do not display it.
[0090] For example, taking the window as a circle, as shown in Figure 8, a pre-set image A is passed into the graphics processing system and loaded on the image B to be cropped. The image A contains a circle, which is exactly the same as the shape of the window to be displayed. On the image A, the alpha value within the circle (used to record transparency), the alpha value above the graphic, and the alpha value outside the graphic are all different. For example, the alpha value within the circular area is 1, the alpha on the circumference is 0.5, and the alpha of the area outside the circle is 0.
[0091] In this way, when the fragment shader draws the graphics in the window, the edge of the window can be identified according to the change of the alpha value, such as when reading Figure 8 For the four corners of image A shown in the figure, since alpha is 0, the pixels in this area are not displayed, and only the pixels in the area with alpha value 1 need to be displayed.
[0092] Based on the same inventive concept, an embodiment of the present invention also provides a device for drawing road conditions and a navigation client. Since the principles of the problems solved by these devices and clients are similar to the method of drawing road conditions in the aforementioned map, the implementation of the device and client can refer to the implementation of the aforementioned method, and the repeated parts will not be repeated.
[0093] An embodiment of the present invention provides a device for mapping road conditions, referring to Figure 9 Shown, including:
[0094] A determination module 91 is used to determine the width of the road texture to be intercepted from the preset road texture template according to the preset road texture template;
[0095] An interception module 92 is configured to intercept the road condition texture of a corresponding width from the road condition texture template according to the width, wherein the intercepted road condition texture includes a road condition color value;
[0096] The mapping module 93 is configured to map the intercepted road texture to a position corresponding to the end of the road to be drawn.
[0097] In one embodiment, the determining module 91 is specifically configured to determine the ratio F of the width of the road texture in the road texture template and the sum of the width of the road texture to the total width of the road texture template. ratio1 ; Through the ratio value F ratio1 and the width L2 of the road texture template, to obtain the width L1 of the intercepted texture in the road texture template, where L1 satisfies: L1=L2*F ratio1 .
[0098] In one embodiment, the road condition texture and the road texture each include two texture intervals, wherein the two adjacent intervals of the road condition texture and the road texture constitute the texture buffer interval S3;
[0099] Accordingly, the above-mentioned road condition drawing device refers to Figure 9 As shown, it also includes: a gradient processing module 94, which is used to process the portion of the road to be drawn corresponding to the texture buffer in a gradient style.
[0100] In one embodiment, the mapping module 93 is used to stretch the intercepted texture in the horizontal direction (i.e., the width direction) and fit it to the corresponding position at one end or both ends of the road to be drawn; the stretching width satisfies that the width of the texture containing the road condition color value in the intercepted texture is equal to the width of the road condition graphic actually required for the road to be drawn.
[0101] In one embodiment, the device for mapping road conditions, referring to Figure 9 As shown, it may also include:
[0102] The window recognition module 95 is used to load a preset image onto the map to be cropped when it is necessary to display map information in a specified window; the preset image contains a graphic with the same shape as the specified window, which is distinguished by different alpha values outside the graphic, on the lines of the graphic, and inside the graphic; based on the alpha value of the read image, it is determined whether the pixel on the map to be cropped is located within the graphic, and if so, the pixel is displayed, otherwise it is not displayed.
[0103] An embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which implement the aforementioned road condition mapping method when executed by a processor.
[0104] An embodiment of the present invention provides a navigation client, comprising: a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the instructions, when executed by the processor, are capable of performing the following road condition mapping method:
[0105] According to the preset road texture template, determining the width of the road texture to be intercepted from the preset road texture template;
[0106] According to the width, intercepting the road condition texture of the corresponding width from the road condition texture template, wherein the intercepted road condition texture includes a road condition color value;
[0107] The intercepted road condition texture is mapped to a position corresponding to the end of the road to be drawn.
[0108] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0109] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0112] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A road condition mapping method, wherein: include: Determine the ratio F of the sum of the width of the road texture in the preset road texture template and the width of the road texture to the total width of the road texture template ratio1 ; By the ratio value F ratio1 and the width L2 of the preset road texture template to obtain the width L1 of the road texture intercepted from the road texture template; According to the width of the intercepted road condition texture, intercepting the road condition texture of the corresponding width from the road condition texture template, wherein the intercepted road condition texture includes a road condition color value; The intercepted road condition texture is mapped to a position corresponding to the end of the road to be drawn.
2. The method according to claim 1, wherein The road condition texture and the road texture each include two texture intervals, wherein the two adjacent intervals of the road condition texture and the road texture constitute a texture buffer interval S3; After the intercepted texture is mapped to a corresponding position at one end or both ends of the road to be drawn, the method further includes: The portion of the road to be drawn corresponding to the texture buffer is processed in a gradient style.
3. The method according to claim 1 or 2, wherein The intercepted texture is mapped to a corresponding position on one side or both sides of the road to be drawn, including: The intercepted texture is stretched horizontally and fit to the corresponding position at one end or both ends of the road to be drawn; the stretching width satisfies that the width of the texture containing the road condition color value in the intercepted texture is equal to the width of the road condition graphic actually required for the road to be drawn.
4. The method according to claim 1 or 2, wherein Also includes: When it is necessary to display map information in a specified window, the preset image is loaded onto the map to be cropped; The preset image includes a graphic with the same shape as the designated window, and the areas outside the graphic, on the lines of the graphic, and inside the graphic are distinguished by different alpha values; According to the alpha value of the read image, it is determined whether the pixel on the map to be cropped is located within the graphic. If so, the pixel is displayed, otherwise it is not displayed.
5. A device for mapping road conditions, wherein: include: A determination module is used to determine the width of the road texture in the preset road texture template and the ratio of the sum of the width of the road texture to the total width of the road texture template. ratio1 ; By the ratio value F ratio1 and the width L2 of the preset road texture template to obtain the width L1 of the road texture intercepted from the road texture template; an interception module, configured to intercept the road condition texture of corresponding width from the road condition texture template according to the width of the intercepted road condition texture, wherein the intercepted road condition texture includes a road condition color value; A mapping module is used to map the intercepted road texture to a position corresponding to the end of the road to be drawn.
6. The device according to claim 5, wherein The road condition drawing device further includes: A window recognition module is used to load a preset image onto the map to be cropped when it is necessary to display map information in a specified window; the preset image contains a graphic with the same shape as the specified window, which is distinguished by different alpha values outside the graphic, on the lines of the graphic, and inside the graphic; based on the alpha value of the read image, it is determined whether the pixel on the map to be cropped is within the graphic. If so, the pixel is displayed; otherwise, it is not displayed.
7. A computer-readable storage medium having computer instructions stored thereon, wherein: When the instruction is executed by the processor, the method for road condition mapping according to any one of claims 1 to 4 is implemented.
8. A navigation client, wherein: include: A memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the instructions, when executed by the processor, are capable of executing the following road condition mapping method: Determine the ratio F of the sum of the width of the road texture in the preset road texture template and the width of the road texture to the total width of the road texture template ratio1 ; By the ratio value F ratio1 and the width L2 of the preset road texture template to obtain the width L1 of the road texture intercepted from the road texture template; According to the width of the intercepted road condition texture, intercepting the road condition texture of the corresponding width from the road condition texture template, wherein the intercepted road condition texture includes a road condition color value; The intercepted road condition texture is mapped to a position corresponding to the end of the road to be drawn.
Citation Information
Patent Citations
Map road rendering method and system
CN103903507A
Method and system for providing graphical real-time traffic information
WO2011140859A1