CN114445520A - Lane line rendering method, lane line rendering device and computer-readable storage medium - Google Patents

Lane line rendering method, lane line rendering device and computer-readable storage medium Download PDF

Info

Publication number
CN114445520A
CN114445520A CN202210112157.8A CN202210112157A CN114445520A CN 114445520 A CN114445520 A CN 114445520A CN 202210112157 A CN202210112157 A CN 202210112157A CN 114445520 A CN114445520 A CN 114445520A
Authority
CN
China
Prior art keywords
line
lane line
lane
rendering
element vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210112157.8A
Other languages
Chinese (zh)
Inventor
庞小斌
贾双成
朱磊
贾郭峰
王斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhidao Network Technology Beijing Co Ltd
Original Assignee
Zhidao Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhidao Network Technology Beijing Co Ltd filed Critical Zhidao Network Technology Beijing Co Ltd
Priority to CN202210112157.8A priority Critical patent/CN114445520A/en
Publication of CN114445520A publication Critical patent/CN114445520A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The application relates to a lane line rendering method, a lane line rendering device and a computer-readable storage medium. The method comprises the following steps: obtaining relevant parameters of a current map; acquiring lane line attribute data and line element vector data in a JSON format provided by a rear-end server according to related parameters of a current map; and drawing a lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data. The scheme provided by the application can reduce the consumption of computing resources and can display the lane lines on the electronic map in real time.

Description

Lane line rendering method, lane line rendering device and computer-readable storage medium
Technical Field
The present application relates to the field of automatic driving technologies, and in particular, to a lane line rendering method, apparatus, and computer-readable storage medium.
Background
The lane lines are important elements of the electronic map. In the related technology, the lane line rendering method is that high-precision data of a lane line is preprocessed into a Map slice of a Web Map Tile Service (WMTS) protocol by using desktop end software, and then the Map slice is released into a static Web resource by using a geoserver Map server. The web front-end map engine requests the WMTS of the server side for pictures with different numbers of different levels according to the zoom level of the map and the map center point information, and the pictures are spliced in the map engine and then displayed in the map. However, the above lane line rendering method is time-consuming and labor-consuming, and when used for an electronic map, the method is poor in real-time performance.
Disclosure of Invention
In order to solve or partially solve the problems in the related art, the application provides a lane line rendering method, a lane line rendering device and a computer-readable storage medium, which can reduce the consumption of computing resources and can display lane lines on an electronic map in real time.
A first aspect of the present application provides a lane line rendering method, including:
obtaining relevant parameters of a current map;
acquiring lane line attribute data and line element vector data in a JSON format provided by a back-end server according to the related parameters of the current map;
and drawing a lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data.
The second aspect of the present application provides a lane line rendering apparatus, including:
the first acquisition module is used for acquiring relevant parameters of the current map;
the second acquisition module is used for acquiring lane line attribute data and line element vector data in a JSON format provided by a rear-end server according to the related parameters of the current map;
and the rendering module is used for drawing the lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data.
A third aspect of the present application provides an electronic device comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon executable code, which, when executed by a processor of an electronic device, causes the processor to perform the method as described above.
The technical scheme provided by the application can comprise the following beneficial effects: by obtaining the relevant parameters of the current map, and then obtaining the lane line attribute data and the line element vector data in the JSON format provided by the back-end server according to the relevant parameters of the current map, the lane line corresponding to the lane line attribute data is drawn according to the lane line attribute data and the line element vector data. On one hand, compared with the prior art that desktop-end software is required to be preprocessed into map slices of WMTS protocol, the lane line attribute data and line element vector data in the JSON format are in the database of the back-end server, the data can be updated by updating the database, the preprocessing similar to the prior art is not required, and the calculation amount is greatly reduced; on the other hand, compared with the time consumption of requesting the pictures of different levels of the WMTS in the related technology, the lane line attribute data and the line element vector data in the JSON format are acquired, the data volume is small, and therefore the time delay is small; in conclusion, the technical scheme of the application can reduce the consumption of computing resources, and can display the lane line on the electronic map in real time when being applied to the electronic map.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
Fig. 1 is a schematic flowchart of a lane line rendering method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a lane line rendering apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are illustrated in the accompanying drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the field of automatic driving, lane lines are important elements of electronic maps. In the related technology, a lane line rendering method is that high-precision data of a lane line is preprocessed into a map slice of a WMTS protocol by using desktop end software, and then the map slice is released into a static web resource by using a geoserver map server. The web front-end map engine requests the WMTS of the server side for pictures with different numbers of different levels according to the zoom level of the map and the map center point information, and the pictures are spliced in the map engine and then displayed in the map. However, WMTS is a method for publishing digital map services by using predefined tile blocks, the tile blocks are organized in a pyramid structure, and are divided and stored according to map levels, the higher the map level is, the smaller the map range represented by each tile block is, the time and labor are required to be preprocessed by using desktop software, the larger the data volume and the workload are, the higher the map level is, the number of generated tiles is increased in a geometric progression, the data storage volume is sharply increased, the data processing time is sharply prolonged, when loading the WMTS tiles, a Web front-end engine needs to request pictures from a rear-end geoserver map server, the time is required to be consumed in the process of network request, the loading of the WMTS tiles is delayed, and in the process of map movement, the lane line loading speed is behind the map advancing speed, the experience is poor; in addition, the WMTS slice generation needs desktop software preprocessing, and when data updating is performed, new WMTS slices are generated by reusing the desktop software, so that the workload is large, and data updating is inconvenient. In other words, the above lane line rendering method is time-consuming and labor-consuming, and when used for an electronic map, the method is poor in real-time performance.
In view of the above problems, embodiments of the present application provide a lane line rendering method, which can reduce consumption of computing resources and can display a lane line on an electronic map in real time.
The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, it is a schematic flow chart of a lane line rendering method shown in the embodiment of the present application, where the method is applicable to a Web front end, and mainly includes steps S101 to S103, which are described as follows:
step S101: and obtaining related parameters of the current map.
In the embodiment of the application, the relevant parameters of the current map comprise the layer name and the longitude and latitude data of the current map, wherein the layer name of the current map is relevant to the element to be displayed on the current map, different layer names correspond to different elements to be displayed on the current map, and the longitude and latitude data of the current map represent the range of the element corresponding to the layer name displayed on the current map.
Step S102: and acquiring lane line attribute data and line element vector data in a JSON format provided by a back-end server according to the related parameters of the current map.
As described above, the method of the embodiment of the present application is mainly applied to a Web front end, where the Web front end is a Web back end that interacts with a database to process corresponding business logic in Web implementation, and specifically refers to foreground expressions that can be seen and touched by a user in the Web application, including a structure of a Web page, an appearance vision of a Web, and an interaction at a Web level, and the like, and JSON, that is, JavaScript Object Notation, means a JavaScript Object Notation, which is a lightweight data exchange format that is text-based and language-independent, and therefore, in the embodiment of the present application, lane line attribute data and line element vector data in a JSON format provided by a back end server mean that a data amount is small. The line element vector data is one of vector data types, and the types of vector data include point element vector data, line element vector data, and plane element vector data. Obtaining line element vector data from the back-end server instead of point element vector data or plane element vector data is based on a tradeoff between efficiency and data size. Further, the back-end server may be a back-end geoserver map server.
As an embodiment of the present application, the obtaining of the lane line attribute data and the line element vector data in the JSON format provided by the backend server according to the current map related parameters may be: the method comprises the steps of calling a service provided by a rear-end server, receiving JSON-format lane line attribute data and line element vector data returned by the rear-end server through transmitting a layer name and longitude and latitude data of a current map, and specifically, transmitting the layer name and the longitude and latitude data of the current map through calling a WFS (Web services server) protocol service issued by a rear-end geoserver map server by a web front-end map engine. Because the layer name of the current map corresponds to an element to be displayed on the current map, such as a lane line, and the longitude and latitude data of the current map indicate that the element corresponding to the layer name is displayed in the range of the current map, the back-end geoserver map server returns lane line attribute data and line element vector data in a JSON format to the Web front-end map engine according to the layer name and the longitude and latitude data of the current map, wherein the lane line attribute data includes lane line types and lane line colors, the lane line types include a single solid line, a single dotted line, a double solid line, a double dotted line, a left virtual right real and/or a left real right virtual, and the lane line colors include white and/or yellow.
Step S103: and drawing a lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data.
As described above, the lane line attribute data includes the lane line type and the lane line color, and in the traffic field, the simplest lane line type belongs to the single solid line and the single dotted line, and rendering the single solid line is a basis for rendering other types of lane lines, so that one can start with rendering the single solid line and the single dotted line first. In an embodiment of the present application, according to the lane line attribute data and the line element vector data, drawing the lane line corresponding to the lane line attribute data may be: if the lane line type is a single solid line, drawing the lane line of the single solid line according to the lane line type, the lane line color and the line element vector data; and if the lane line type is a single dotted line, drawing the lane line of the single dotted line according to the lane line type, the lane line color and the line element vector data. In other words, the Web front-end map engine draws the lane line of the single solid line or the single dotted line according to whether the lane line type returned by the back-end geoserver map server is the single solid line or the single dotted line, and according to the lane line type, the lane line color and the line element vector data of the single solid line or the single dotted line. Specifically, as an embodiment of the present application, when the lane line type is a single solid line, the lane line drawn by the single solid line may be, according to the lane line type, the lane line color, and the line element vector data: drawing a first target line segment and a second target line segment which are parallel to the line segment and have the same shape at the position (for example, 7.5 centimeters) of the two sides of the line segment corresponding to the line element vector data at an interval of a first preset distance; connecting all points of the first target line segment and the second target line segment which have the same horizontal axis coordinate according to a preset direction to form a latticed polygon taking a connecting line of end points of the first target line segment and the second target line segment as a boundary; and filling the grid-shaped polygon into white or yellow according to the lane line color included by the lane line attribute data to obtain the lane line with the type of a single solid line. It should be noted that, in the above-described embodiment, not only two end point pairs where the first target line segment and the second target line segment have the same abscissa (one end point pair, that is, two end points where the first target line segment and the second target line segment have the same abscissa) but also all points between the two end point pairs are connected, because a single solid line of an actual scene is not only a straight line segment (a straight line here is not a straight line segment having no thickness in a geometric sense but a straight line segment having a certain width), but may be a line segment having a certain radian. When the single solid line of the actual scene is an arc line segment, if only two end point pairs with the same horizontal axis coordinate of the first target line segment and the second target line segment are connected and all points between the two end point pairs are omitted, the finally rendered single solid line which is still a straight line segment is not in accordance with the single solid line of the actual scene. For example, assuming that the first target line segment includes 20 points, and the second target line segment also includes 20 points having the same horizontal axis coordinate as the 20 points of the first target line segment, two points having the same horizontal axis coordinate are connected to each other.
As an embodiment of the present application, when the lane line type is a single dotted line, the lane line drawn by the single dotted line may be, according to the lane line type, the lane line color, and the line element vector data: cutting the line segment corresponding to the line element vector data into a plurality of equal-length line segments; aiming at a plurality of equal-length line segments, the line segment L is drawn according to the method of drawing the lane line of the single solid lineiRendering the line segment L as a transparent lane line with a single solid linei+1Rendering the lane line of the single solid line in yellow or white to obtain the lane line of the type of the single dotted line, wherein the line segment LiAnd a line segment Li+1Are adjacent equal-length line segments in the plurality of equal-length line segments. In this embodiment, the line segment L is drawn by a method of drawing a lane line of a single solid lineiRendering the line segment L as a transparent lane line with a single solid linei+1Rendering the lane line as a single solid line of yellow or white means that the lane line is drawn only according to the lane line type, lane line color and line element vector dataIn the embodiment of the lane line of the single solid line, the line segment corresponding to the line element vector data is replaced by the line segment LiAnd a line segment Li+1And (4) finishing. In addition, when the line element vector data corresponding line segment is cut into a plurality of equal-length line segments, it is obvious that the line element vector data corresponding line segment needs to be cut into an integral number of equal-length line segments. Specifically, the number totalstep of the equal-length line segments may be obtained by dividing the total length lineDistance of the line segment by the distance nlistance, which is a preset value nlistance (for example, nlistance is 2.5 meters) in the direction of the line segment from the start point of the line segment corresponding to the line element vector data. If totalstep is not an integer, rounding totalstep which is not an integer to obtain an integer as the number totalstep 'of equal-length line segments, dividing total length lineDistance of the line segments by totalstep' to obtain new distance ', and cutting the line element vector data corresponding to the line segments into a plurality of equal-length line segments with the distance' as the distance.
As an embodiment of the present application, according to the lane line attribute data and the line element vector data, drawing a lane line corresponding to the lane line attribute data may be: if the lane line type is a double-solid line, rendering a yellow or white lane line with a single-solid line at the position where the line element vector data corresponds to the two sides of the line segment and is spaced by a second preset distance respectively according to the method for rendering the lane line with the single-solid line in the embodiment; if the lane line type is a double-dashed line, rendering a yellow or white lane line with a single-dashed line at a position spaced by a third preset distance from two sides of the line segment corresponding to the line element vector data according to the method for rendering the lane line with the single-dashed line in the above embodiment. Specifically, when the lane line type is a double solid line, at a position spaced by a second preset distance on two sides of a line segment corresponding to the line element vector data, rendering a lane line of a single solid line in yellow or white according to the method for drawing a lane line of a single solid line in the above embodiment may be: drawing a left line segment which is parallel to the line segment and has the same shape with the line segment at the position of the left side of the line segment corresponding to the line element vector data at a second preset distance interval, and drawing a first target line segment and a second target line segment which are parallel to the left line segment and have the same shape with the left line segment at the position of the left side of the line segment at the first preset distance interval; connecting all points of the first target line segment and the second target line segment which have the same horizontal axis coordinate according to a preset direction to form a latticed polygon taking a connecting line of end points of the first target line segment and the second target line segment as a boundary; filling the latticed polygon into white or yellow according to the lane line color included by the lane line attribute data to obtain a left lane line of which the type is a single solid line; drawing a right line segment which is parallel to the line segment and has the same shape as the line segment at the position of the right side of the line segment corresponding to the line element vector data at intervals of a second preset distance, and drawing a third target line segment and a fourth target line segment which are parallel to the right line segment and have the same shape as the right line segment at the positions of the two sides of the right line segment at intervals of the first preset distance; connecting all points of the third target line segment and the fourth target line segment with the same horizontal axis coordinate according to a preset direction to form a latticed polygon with the connection line of the end points of the third target line segment and the fourth target line segment as a boundary; filling the latticed polygon into white or yellow according to the lane line color included by the lane line attribute data to obtain a right lane line of which the type is a single solid line; the left lane line of the single solid line and the right lane line of the single solid line together constitute a lane line of a double solid line.
Similarly, when the lane line type is a double-dashed line, at a position spaced by a third preset distance on two sides of the line segment corresponding to the line element vector data, rendering a lane line of a yellow or white single-dashed line according to the method for drawing a lane line of a single-dashed line in the above embodiment may be: drawing a left line segment which is parallel to the line segment and has the same shape with the line segment at the position of the left side of the line segment corresponding to the line element vector data at a third preset distance interval, and cutting the left line segment into a plurality of line segments with equal length; aiming at the plurality of equal-length line segments, the line segment L 'is drawn according to the method of drawing the lane line of the single solid line'iRendering a transparent single solid lane line, and dividing the line segment into L'i+1Rendering a lane line of a single solid line which is yellow or white to obtain a left lane line of which the type is a single dotted line; drawing a right line segment which is parallel to the line segment and has the same shape with the line segment at the position of the right side of the line segment corresponding to the line element vector data at a third preset distance interval, and cutting the right line segment into a plurality of line segments with equal length; aiming at the plurality of equal-length line segments, the line segment L 'is drawn according to the method of drawing the lane line of the single solid line'iRendering a transparent single solid lane line, and dividing the line segment into L'i+1Rendering a lane line of single solid line of yellow or white, resulting in a right lane line of type single dashed line, where line segment L'iAnd line segment L'i+1The equal-length line segments are adjacent to each other in the plurality of equal-length line segments; the left lane line of the single dotted line and the right lane line of the single dotted line together form a lane line of a double dotted line.
As another embodiment of the present application, according to the lane line attribute data and the line element vector data, drawing a lane line corresponding to the lane line attribute data may be: if the type of the lane line is a lane line with a left real line and a right imaginary line, rendering a yellow or white lane line with a single solid line according to the method for rendering the lane line with the single solid line in the embodiment at a position with a fourth preset distance between the left sides of the line segments corresponding to the line element vector data, and rendering a yellow or white lane line with a single dotted line according to the method for rendering the lane line with the single dotted line in the embodiment at a position with a fifth preset distance between the right sides of the line segments corresponding to the line element vector data; the lane lines of the single solid line and the lane lines of the single dotted line form lane lines of left solid and right virtual lines. As for rendering a yellow or white lane line with a single solid line according to the method for rendering a lane line with a single solid line and rendering a yellow or white lane line with a single dashed line according to the method for rendering a lane line with a single dashed line, reference may be specifically made to the relevant description of the foregoing embodiments, which is not described herein again.
As another embodiment of the present application, according to the lane line attribute data and the line element vector data, drawing a lane line corresponding to the lane line attribute data may be: if the type of the lane line is a lane line with a virtual left and a real right, rendering a yellow or white lane line with a single dotted line according to the method for rendering the lane line with the single dotted line in the embodiment at a position with a sixth preset distance between the left sides of the line segments corresponding to the line element vector data, and rendering a yellow or white lane line with a single solid line according to the method for rendering the lane line with the single solid line in the embodiment at a position with a seventh preset distance between the right sides of the line segments corresponding to the line element vector data; the lane lines of the single dotted line and the lane lines of the single solid line form left-dotted right-solid lane lines. As for rendering a yellow or white single-dashed lane line according to the method for rendering a single-dashed lane line and rendering a yellow or white single-solid lane line according to the method for rendering a single-solid lane line, reference may be specifically made to the relevant description of the foregoing embodiments, which is not described herein again.
As can be seen from the lane line rendering method illustrated in fig. 1, by obtaining the current map related parameters, then obtaining the lane line attribute data and the line element vector data in the JSON format provided by the back-end server according to the current map related parameters, and further drawing the lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data. On one hand, compared with the prior art that desktop-end software is required to be preprocessed into map slices of WMTS protocol, the lane line attribute data and line element vector data in the JSON format are in the database of the back-end server, the data can be updated by updating the database, the preprocessing similar to the prior art is not required, and the calculation amount is greatly reduced; on the other hand, compared with the time consumption of requesting the pictures of different levels of the WMTS in the related technology, the lane line attribute data and the line element vector data in the JSON format are acquired, the data volume is small, and therefore the time delay is small; in conclusion, the technical scheme of the application can reduce the consumption of computing resources, and can display the lane line on the electronic map in real time when being applied to the electronic map.
Corresponding to the embodiment of the application function implementation method, the application also provides a lane line rendering device, electronic equipment and a corresponding embodiment.
Fig. 2 is a schematic structural diagram of a lane line rendering apparatus according to an embodiment of the present application. For convenience of explanation, only portions related to the embodiments of the present application are shown. The apparatus illustrated in fig. 2 is applicable to a Web front end, and mainly includes a first obtaining module 201, a second obtaining module 202, and a rendering module 203, where:
a first obtaining module 201, configured to obtain a current map related parameter;
a second obtaining module 202, configured to obtain, according to the relevant parameters of the current map, lane line attribute data and line element vector data in the JSON format provided by the back-end server;
and the rendering module 203 is configured to draw a lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Optionally, the relevant parameters of the current map in the foregoing embodiment include a layer name and longitude and latitude data of the current map, and the second obtaining module 202 in the example in fig. 2 may include a calling unit, configured to call a service provided by a back-end server, and receive, by introducing the layer name and the longitude and latitude data of the current map, lane line attribute data and line element vector data in the JSON format returned by the back-end server.
Optionally, the lane line attribute data of the foregoing embodiment includes a lane line type and a lane line color, and the second obtaining module 202 illustrated in fig. 2 may include a first drawing unit and a second drawing unit, where:
a first drawing unit configured to draw a lane line of a single solid line according to a lane line type, a lane line color, and line element vector data if the lane line type is the single solid line;
and the second drawing unit is used for drawing the lane line of the single dotted line according to the lane line type, the lane line color and the line element vector data if the lane line type is the single dotted line.
Optionally, the first rendering unit of the above example may include a third rendering unit, a connection unit, and a padding unit, wherein:
the third drawing unit is used for drawing a first target line segment and a second target line segment which are parallel to the line segments and have the same shape at the positions of the two sides of the line segment corresponding to the line element vector data at intervals of a first preset distance;
the connecting unit is used for connecting all points of the first target line segment and the second target line segment with the same horizontal axis coordinate according to a preset direction to form a grid-shaped polygon with the connecting line of the end points of the first target line segment and the second target line segment as a boundary;
and the filling unit is used for filling the grid-shaped polygons into white or yellow according to the lane line colors included in the lane line attribute data to obtain the lane lines of which the types are single solid lines.
Optionally, the second drawing unit of the above example may include a cutting unit and a fourth drawing unit, wherein:
the cutting unit is used for cutting the line element vector data corresponding to the line segment into a plurality of equal-length line segments;
a fourth drawing unit, configured to draw the line segment L according to the method for drawing the lane line of the single solid line for a plurality of equal-length line segmentsiRendering the line segment L as a transparent lane line with a single solid linei+1Rendering the lane line of the single solid line in yellow or white to obtain the lane line of the type of the single dotted line, wherein the line segment LiAnd a line segment Li+1Are adjacent equal-length line segments in the plurality of equal-length line segments.
Optionally, the second obtaining module 202 illustrated in fig. 2 may include a fifth rendering unit and a sixth rendering unit, where:
a fifth drawing unit, configured to, if the lane line type is a double-solid line, render a yellow or white lane line with a single-solid line at a second preset distance between two sides of a line segment corresponding to the line element vector data according to a method for drawing a lane line with a single-solid line;
and the sixth drawing unit is used for rendering a yellow or white lane line with a single dotted line at the position spaced by a third preset distance from the two sides of the line segment corresponding to the line element vector data according to the method for drawing the lane line with the single dotted line if the lane line type is the double dotted line.
Optionally, the second obtaining module 202 illustrated in fig. 2 may include a seventh drawing unit and an eighth drawing unit, where:
a seventh rendering unit, configured to render a yellow or white lane line with a single solid line according to a method for rendering a lane line with a single solid line at a position spaced by a fourth preset distance from the left side of the line segment corresponding to the line element vector data if the lane line type is a lane line with a left real line and a right imaginary line, and render a yellow or white lane line with a single dotted line according to a method for rendering a lane line with a single dotted line at a position spaced by a fifth preset distance from the right side of the line segment corresponding to the line element vector data;
and the eighth rendering unit is used for rendering a yellow or white single-dotted lane line at the position with the interval of the sixth preset distance on the left side of the line segment corresponding to the line element vector data according to the method for rendering the single-dotted lane line, and rendering a yellow or white single-solid lane line at the position with the interval of the seventh preset distance on the right side of the line segment corresponding to the line element vector data according to the method for rendering the single-solid lane line, if the type of the lane line is a left virtual lane line and a right real lane line.
Fig. 3 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Referring to fig. 3, the electronic device 300 includes a memory 310 and a processor 320.
The Processor 320 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 310 may include various types of storage units such as a system memory, a Read Only Memory (ROM), and a permanent storage device. Wherein the ROM may store static data or instructions for the processor 320 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 310 may comprise any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, may also be employed. In some embodiments, memory 310 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 310 has stored thereon executable code that, when processed by the processor 320, may cause the processor 320 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having executable code (or a computer program or computer instruction code) stored thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the various steps of the above-described method according to the present application.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A lane line rendering method is applied to a Web front end, and is characterized by comprising the following steps:
obtaining relevant parameters of a current map;
acquiring lane line attribute data and line element vector data in a JSON format provided by a back-end server according to the related parameters of the current map;
and drawing a lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data.
2. The lane line rendering method of claim 1, wherein the current map related parameters include a layer name and longitude and latitude data of a current map, and the obtaining lane line attribute data and line element vector data in JSON format provided by a back-end server according to the current map related parameters includes:
and calling the service provided by the back-end server, and receiving the lane line attribute data and the line element vector data in the JSON format returned by the back-end server through transmitting the layer name and the longitude and latitude data of the current map.
3. The lane line rendering method according to claim 1, wherein the lane line attribute data includes a lane line type and a lane line color, and the drawing of the lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data includes:
if the lane line type is a single solid line, drawing a lane line of the single solid line according to the lane line type, the lane line color and the line element vector data;
and if the lane line type is a single dotted line, drawing the lane line of the single dotted line according to the lane line type, the lane line color and the line element vector data.
4. The lane line rendering method according to claim 3, wherein the drawing a lane line of a single solid line according to the lane line type, the lane line color, and the line element vector data includes:
drawing a first target line segment and a second target line segment which are parallel to the line segments and have the same shape at the positions of the two sides of the line segments corresponding to the line element vector data at intervals of a first preset distance;
connecting all points of the first target line segment and the second target line segment with the same horizontal axis coordinate according to a preset direction to form a latticed polygon with the connection line of the end points of the first target line segment and the second target line segment as a boundary;
and filling the latticed polygons into white or yellow according to the lane line colors included in the lane line attribute data to obtain the lane lines of which the types are single solid lines.
5. The lane line rendering method according to claim 3, wherein the drawing a lane line of a single dotted line according to the lane line type, the lane line color, and the line element vector data includes:
cutting the line segment corresponding to the line element vector data into a plurality of equal-length line segments;
aiming at the plurality of equal-length line segments, the line segment L is drawn according to the method for drawing the lane line of the single solid lineiRendering the line segment L as a transparent lane line with a single solid linei+1Rendering the lane line of the single solid line as yellow or white to obtain the lane line of the type of the single dotted line, wherein the line segment LiAnd a line segment Li+1The equal-length line segments are adjacent to each other in the plurality of equal-length line segments.
6. The lane line rendering method according to claim 3, wherein the drawing a lane line corresponding to the lane line attribute data based on the lane line attribute data and line element vector data includes:
if the lane line type is a double-solid line, rendering a yellow or white lane line with a single-solid line at two sides of a line segment corresponding to the line element vector data at a second preset distance according to the method for rendering the lane line with the single-solid line;
and if the lane line type is a double-dotted line, rendering a yellow or white lane line with a single-dotted line at a third preset distance between two sides of the line element vector data corresponding to the line segment according to the method for rendering the lane line with the single-dotted line.
7. The lane line rendering method according to claim 3, wherein the drawing a lane line corresponding to the lane line attribute data based on the lane line attribute data and line element vector data includes:
if the lane line type is a lane line with a left real line and a right imaginary line, rendering a yellow or white lane line with a single solid line according to the method for rendering the lane line with the single solid line at a position with a fourth preset distance between the left sides of the line segments corresponding to the line element vector data, and rendering a yellow or white lane line with a single dotted line according to the method for rendering the lane line with the single dotted line at a position with a fifth preset distance between the right sides of the line segments corresponding to the line element vector data;
if the lane line type is a lane line with a virtual left and a real right, rendering a yellow or white lane line with a single dotted line according to the method for rendering the lane line with the single dotted line at a position with a sixth preset distance between the left sides of the line segments corresponding to the line element vector data, and rendering a yellow or white lane line with a single solid line according to the method for rendering the lane line with the single solid line at a position with a seventh preset distance between the right sides of the line segments corresponding to the line element vector data.
8. A lane line rendering apparatus applied to a Web front end, the apparatus comprising:
the first acquisition module is used for acquiring relevant parameters of the current map;
the second acquisition module is used for acquiring lane line attribute data and line element vector data in a JSON format provided by a rear-end server according to the related parameters of the current map;
and the rendering module is used for drawing the lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data.
9. An electronic device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1 to 7.
CN202210112157.8A 2022-01-29 2022-01-29 Lane line rendering method, lane line rendering device and computer-readable storage medium Pending CN114445520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210112157.8A CN114445520A (en) 2022-01-29 2022-01-29 Lane line rendering method, lane line rendering device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210112157.8A CN114445520A (en) 2022-01-29 2022-01-29 Lane line rendering method, lane line rendering device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN114445520A true CN114445520A (en) 2022-05-06

Family

ID=81371200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210112157.8A Pending CN114445520A (en) 2022-01-29 2022-01-29 Lane line rendering method, lane line rendering device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114445520A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114611036A (en) * 2022-05-10 2022-06-10 北京航空航天大学杭州创新研究院 Gis data processing and rendering method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114611036A (en) * 2022-05-10 2022-06-10 北京航空航天大学杭州创新研究院 Gis data processing and rendering method
CN114611036B (en) * 2022-05-10 2022-10-21 北京航空航天大学杭州创新研究院 Gis data processing and rendering method

Similar Documents

Publication Publication Date Title
US10997857B2 (en) Methods and systems for carpooling
WO2021121306A1 (en) Visual location method and system
US11514782B2 (en) Utilizing determined optimized time windows for precomputing optimal path matrices to reduce computer resource usage
US11037263B2 (en) Systems and methods for displaying an identity relating to a service request
US20130181993A1 (en) Place heat geometries
CN108133044A (en) Space big data three-dimensional visualization method and platform based on attribute separation
US20140204116A1 (en) Rendering a map using style identifiers
CN104221046A (en) Method and apparatus for pre-fetching place page data for subsequent display on a mobile computing device
US10323950B1 (en) Utilizing a geo-locator service and zone servers to reduce computer resource requirements for determining high quality solutions to routing problems
JP6773909B2 (en) Entity information validation method and device
WO2018223990A1 (en) Map tile updating method and device and computer readable storage medium
CN114445520A (en) Lane line rendering method, lane line rendering device and computer-readable storage medium
EP3567832A1 (en) Video map engine system
CN108268516A (en) High in the clouds map map updating method and equipment based on Octree
CN114116162B (en) Data processing method, system and non-transitory storage medium
CN108268514A (en) High in the clouds map map rejuvenation equipment based on Octree
CN110489396B (en) User interface data isolation method and device
CN115371663A (en) Laser mapping method and device, electronic equipment and computer readable storage medium
WO2019191914A1 (en) Systems and methods for on-demand services
CN111222904A (en) Advertisement putting method, device, system, computing equipment and storage medium
CN114490753A (en) Method, device, electronic equipment and medium for displaying map information
CN113763522A (en) Map rendering method, device, equipment and medium
CN112231125A (en) Map display method and device for intelligent vehicle-mounted internet terminal
CN115952372B (en) High-precision map data acquisition method, device, equipment and storage medium
CN113987233B (en) Tile request method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination