CN117115382A - Map road drawing method, device, computer equipment and storage medium - Google Patents

Map road drawing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117115382A
CN117115382A CN202311388364.7A CN202311388364A CN117115382A CN 117115382 A CN117115382 A CN 117115382A CN 202311388364 A CN202311388364 A CN 202311388364A CN 117115382 A CN117115382 A CN 117115382A
Authority
CN
China
Prior art keywords
track
expansion
point
points
map
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.)
Granted
Application number
CN202311388364.7A
Other languages
Chinese (zh)
Other versions
CN117115382B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311388364.7A priority Critical patent/CN117115382B/en
Publication of CN117115382A publication Critical patent/CN117115382A/en
Application granted granted Critical
Publication of CN117115382B publication Critical patent/CN117115382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present application relates to a map road drawing method, apparatus, computer device, storage medium and computer program product. The method can be applied to the map field, and comprises the following steps: acquiring the track lines of a plurality of road marks in a map; splicing the track lines of the plurality of road marks to generate a spliced track line; generating boundary information corresponding to the spliced track line; boundary information for identifying track points of different track lines from the spliced track lines; performing point expansion according to each track point in the spliced track line, and generating expansion points which are respectively corresponding to each track point and used for drawing; acquiring a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line; and drawing each road marking line according to each expansion point combination. The method can improve the efficiency of drawing the map road.

Description

Map road drawing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of map drawing technology, and in particular, to a map road drawing method, apparatus, computer device, storage medium, and computer program product.
Background
With the development of computer technology, a map road drawing technology, which is a technology for drawing roads in a map, has emerged. By requiring the mapping of roads in the scene, for example, by requiring the mapping of roads during the mapping process.
In the conventional art, in order to draw a map road, a drawing interface is generally called a plurality of times to draw each line in the road. However, since the lines in the road are generally relatively many, frequent calls to the drawing interface are required, which is time consuming, resulting in inefficient drawing of the map road.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a map road drawing method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve map road drawing efficiency.
In one aspect, the present application provides a map road drawing method, including: acquiring a plurality of track lines of road markings in a map, wherein each track line comprises a plurality of track points; splicing the track lines of the plurality of road marks to generate a spliced track line; generating boundary information corresponding to the spliced track line; the boundary information is used for identifying track points of different track lines from the spliced track lines; performing point expansion according to each track point in the spliced track line, and generating expansion points which are respectively corresponding to each track point and used for drawing; acquiring a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line; and drawing each road marking line according to each expansion point combination.
On the other hand, the application also provides a map road drawing device, which comprises: the track line acquisition module is used for acquiring track lines of a plurality of road marks in the map, and each track line comprises a plurality of track points; the track line splicing module is used for splicing the track lines of the plurality of road marks to generate spliced track lines; the boundary information generation module is used for generating boundary information corresponding to the spliced track line; the boundary information is used for identifying track points of different track lines from the spliced track lines; the expansion point generation module is used for carrying out point expansion according to each track point in the spliced track line, and generating expansion points which are respectively corresponding to each track point and used for drawing; the expansion point combination module is used for acquiring a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line; and the road marking drawing module is used for drawing each road marking according to each expansion point combination.
In some embodiments, the boundary information generation module is further configured to: generating a tag value for each track point in the spliced track line; the label values of the track points adjacent to each other and belonging to different track lines in the spliced track line are first label values, the label values of the rest track points in the spliced track line are second label values, and the first label values are different from the second label values; and generating boundary information corresponding to the spliced track line according to the label value of each track point in the spliced track line.
In some embodiments, the extension point combining module is further configured to: acquiring a label value of each track point in the spliced track line from the boundary information; for each track point, taking the label value of the track point as the label value of the expansion point corresponding to the track point; according to the arrangement sequence of the track points in the spliced track line, arranging expansion points corresponding to the track points respectively to generate an expansion point sequence; acquiring a plurality of expansion point combinations from the expansion point sequence; the expansion point combination comprises at least three continuous expansion points in the expansion point sequence, and the label value of at least one expansion point in the expansion point combination is a second label value.
In some embodiments, the extension point combining module is further configured to: according to the arrangement sequence of the track points in the spliced track line, arranging the label values of the track points in the spliced track line to obtain boundary information corresponding to the spliced track line; and determining a label value consistent with the arrangement sequence of the track points from boundary information for each track point in the spliced track line to obtain the label value of the track point.
In some embodiments, the extension point combining module is further configured to: acquiring at least three continuous expansion points from the expansion point sequence; under the condition that the obtained label value of at least one expansion point in the at least three expansion points is a second label value, forming an expansion point combination by the at least three expansion points; and returning to the step of obtaining at least three continuous expansion points from the expansion point sequence until the expansion point sequence is traversed to obtain a plurality of expansion point combinations.
In some embodiments, the extension point combining module is further configured to: and returning to the step of acquiring at least three continuous expansion points from the expansion point sequence under the condition that the acquired tag values of the at least three expansion points are all the first tag values.
In some embodiments, the trace splicing module is further configured to: determining the splicing sequence of the track lines of the plurality of road marks according to the widths of the plurality of road marks; and splicing the track lines according to the splicing sequence of the track lines to generate spliced track lines.
In some embodiments, the trajectory acquisition module is further to: displaying a map viewing area in a browser; the map reading area is used for displaying a map area in a map; determining a geographical range of a map area to be displayed in the map viewing area; acquiring the track lines of a plurality of road marks in the geographic range; the device is also for: and displaying the drawn road marks in the map reading area.
In some embodiments, the trajectory acquisition module is further to: receiving a geographic area changing operation for the map viewing area; responding to the geographic region changing operation, and updating the geographic coordinates of the reference point in the map reading region based on the geographic region changing operation to obtain updated geographic coordinates of the reference point; and determining the geographic range of the geographic area to be displayed in the map reading area according to the updated geographic coordinates of the reference points.
In some embodiments, the map is pre-divided into a plurality of unit geographic areas; the trace acquisition module is further configured to: determining a unit geographic range intersected with the geographic range to obtain at least one target unit geographic range; acquiring a track line of each road marking in the geographic range of the at least one target unit; and acquiring the track line of each road marking in the geographic range from the track line of each road marking in the geographic range of the at least one target unit.
In some embodiments, the trajectory acquisition module is further to: determining a range overlapped with the geographical range from the target unit geographical range for each target unit geographical range to obtain an overlapped range; and obtaining the track line of each road marking in the corresponding overlapping range from the road network data of each target unit geographic range, and obtaining the track line of each road marking in the geographic range.
In some embodiments, the apparatus is further to: acquiring respective color values of all track points in the spliced track line; determining the color value of an expansion point generated according to the track point according to the color value of the track point; the road marking drawing module is further used for: determining geometric figures formed by connecting expansion points in the expansion point combinations according to each expansion point combination; and drawing each road marking according to each geometric figure and the color value of each expansion point in each geometric figure.
In another aspect, the present application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps in the map road drawing method when executing the computer program.
In another aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the above-described map road mapping method.
In another aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the map road mapping method described above.
According to the map road drawing method, the map road drawing device, the computer equipment, the storage medium and the computer program product, the boundary information is used for identifying the track points of different track lines from the spliced track lines, so that the track points belonging to different track lines can be distinguished from the spliced track lines according to the boundary information in the process of rendering and drawing, the track points belonging to the same track line can be generated into the expansion point combination, and each road marking can be drawn based on each expansion point combination, so that a plurality of road markings can be drawn in one rendering process, and the drawing efficiency of a map road is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is an application environment diagram of a map road mapping method in one embodiment;
FIG. 2 is a flow chart of a method of mapping roads in one embodiment;
FIG. 3 is a schematic view of a road marking in one embodiment;
FIG. 4 is a schematic diagram of generating an expansion point in one embodiment;
FIG. 5 is a schematic view of a road marking in another embodiment;
FIG. 6 is a graph of trace points versus tag values in one embodiment;
FIG. 7 is a graph of relationship between expansion points and tag values in one embodiment;
FIG. 8 is a graph of relationship between expansion points and tag values in one embodiment;
FIG. 9 is a schematic diagram of a geographic scope intersecting a unit geographic scope in one embodiment;
FIG. 10 is a schematic diagram of generating geometry from expansion point combinations in one embodiment;
FIG. 11 is a flowchart of a method for mapping roads in another embodiment;
FIG. 12 is a system architecture diagram of a map road mapping method in another embodiment;
FIG. 13 is a block diagram of a map road drawing apparatus in one embodiment;
FIG. 14 is an internal block diagram of a computer device in one embodiment;
fig. 15 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The map road drawing method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server.
Specifically, the terminal 102 obtains the trajectories of a plurality of road markings in the map, each trajectory including a plurality of trajectory points, and splices the trajectories of the plurality of road markings to generate a spliced trajectory. The terminal 102 generates boundary information corresponding to the splice trajectory line. Boundary information for identifying the trace points of different trace lines from the spliced trace lines. The terminal 102 performs point expansion according to each track point in the spliced track line, generates expansion points for drawing, which correspond to each track point, and acquires a plurality of expansion point combinations from each expansion point according to boundary information. The expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line. The terminal 102 draws each road marking from each expansion point combination. The track line of the road marking may be obtained from the server 104 by the terminal 102 or may be obtained locally from the terminal 102.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, intelligent voice interaction devices, intelligent home appliances, vehicle-mounted terminals, aircrafts, internet of things devices and portable wearable devices, and the internet of things devices may be intelligent sound boxes, intelligent televisions, intelligent air conditioners, intelligent vehicle-mounted devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented by a stand-alone server or a server cluster formed by a plurality of servers, and may also be a cloud server, where the cloud server is configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 102 and the server 104 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
In some embodiments, as shown in fig. 2, a map road drawing method is provided, which may be performed by a terminal, or may be performed by the terminal and a server together, and the method is described as applied to the terminal 102 in fig. 1, and includes the following steps 202 to 210. Wherein:
Step 202, obtaining a plurality of track lines of road markings in a map, wherein each track line comprises a plurality of track points.
The map may be a real-world map, and may be, for example, a standard definition map (SD map, standard Definition Map), a high definition map (HD map, high Definition Map), an augmented reality map (AR map, augmentedReality Map), or the like in the real world. The plurality of road markings may be road markings that need to be drawn in a single frame of image.
The map may also be a map in a virtual scene, which refers to a fictitious scene, including but not limited to a virtual cartoon scene or a virtual game scene, and the road markings may be road markings in the map of the virtual scene. The map in the virtual scene may be a map generated by drawing a real ground scene or may be a fictional map, for example, a map which is generated by a simulation method and does not exist truly.
A road marking refers to a line that plays a marking role on a road or a lane in a road, and includes, but is not limited to, at least one of a road boundary line, a lane boundary line, or a lane centerline. Road markings are lines having widths, which may or may not be the same for different types of road markings. As shown in fig. 3, a plurality of road markings in the map are illustrated, including a road boundary line, a lane boundary line, and a lane center line.
The plurality of road markings means at least two road markings, each road marking having a track line. The track line of the road mark is a line for representing the track of the road mark, the track point is a point on the track of the road mark, the track line comprises a plurality of track points, and the line formed by connecting the track points in series is the track line. The trajectory points may also be referred to as shape points, since the trajectory lines may reflect the shape of the road markings. For example, a trajectory line having 6 trajectory points may be represented as (a 1, a2, a3, a4, a5, a 6), wherein a1, a2, a3, a4, a5, a6 represent 6 trajectory points. The trajectory may be represented by coordinates, one representing one trajectory point, e.g. a1, a2, a3, a4, a5, a6 being 6 different coordinates. The coordinates may be geographic coordinates or screen coordinates. Geographic coordinates refer to coordinates represented by a latitude and longitude coordinate system. The screen coordinates refer to coordinates represented by a screen coordinate system, the screen coordinate system is a two-dimensional coordinate system, a conversion relation exists between the screen coordinate system and a longitude and latitude coordinate system, the coordinates in the screen coordinate system can be converted into the coordinates in the longitude and latitude coordinate system, and the coordinates in the longitude and latitude coordinate system can also be converted into the coordinates in the screen coordinate system.
Specifically, the terminal may determine a geographical range of a map to be displayed in the map viewing page, determine a plurality of road markings in the geographical range from the map, and acquire the trajectory lines of the plurality of road markings to draw each road marking according to the trajectory lines of the plurality of road markings, and display each drawn road marking on the map viewing page. The geographic range is a range in a map represented by longitude and latitude, and the geographic range is a range in a map represented by a longitude and latitude coordinate system. The longitude and latitude coordinate system may be any coordinate system using longitude and latitude to represent a map, for example, may be a GCJ-02 coordinate system, G represents Guojia, i.e., a country, C represents Cehui, i.e., a mapping, and J represents Ju, i.e., an office.
In some embodiments, the terminal may display a map view page, display a geographic range input area in the map view page, obtain a geographic range input into the geographic range input area, determine a plurality of road markings in the geographic range from the map, and obtain a trajectory of the plurality of road markings to draw each road marking according to the trajectory of the plurality of road markings, and display each drawn road marking on the map view page.
In some embodiments, the terminal may acquire road network data of a portion in the map, where the road network data is real road data, and the road network data is basic data of the map, and the road network data may include data representing a form of a road and attached attribute information associated with the road. The road network data may also include the number of boundaries of the road and the lane centerline. The road network data may further include facility data, which is data describing a real-world facility morphology and corresponding attributes, and the road network data may include a trajectory line of each road marking in the map. The terminal may obtain the trajectory lines of the plurality of road markings from the road network data of the map.
And 204, splicing the track lines of the plurality of road marks to generate a spliced track line.
The splicing track line is generated by splicing the track lines of the road marks.
Specifically, the terminal may sequentially splice the respective trajectories of the plurality of road markings to generate a spliced trajectory. For example, the plurality of road markings is 3 road markings, and the respective track lines of the 3 road markings are (a 1, a2, a 3), (b 1, b2, b 3) and (c 1, c2, c 3), respectively, and then the spliced track line may be (a 1, a2, a3, b1, b2, b3, c1, c2, c 3).
In some embodiments, the terminal may determine a splice order of the trace lines, splice the trace lines according to the splice order of the trace lines, and generate a spliced trace line. The earlier the splice order, the earlier the position of the track line in the splice track line.
In some embodiments, the track lines of the plurality of road markings are each spliced in a different order. The respective splicing order of the track lines may be any and different order. For example, if the track lines of the plurality of road markings acquired by the terminal are stored by a list, the terminal may use the order of the track lines in the list as the splicing order of the track lines.
In some embodiments, the terminal may determine the splice order of the track lines by their length, e.g., the terminal may determine the splice order of the track lines in order of length from greater to lesser, the greater the length, the earlier the splice order. Alternatively, the terminal may determine the splicing order of the track lines in order of length from smaller to larger, the smaller the length, the more forward the splicing order.
Step 206, generating boundary information corresponding to the spliced track line; boundary information for identifying the trace points of different trace lines from the spliced trace lines.
Wherein the boundary information may include an identification of at least one endpoint of each trajectory line, the endpoint including a first trajectory point and a last trajectory point of the trajectory line. The identification of the endpoint may be a specific tag value, and the trace point having the specific tag value is the endpoint. The terminal can generate boundary information corresponding to the spliced track line according to the label value of each track point in the spliced track line. The boundary information includes a label value for each track point.
Specifically, the terminal may generate a tag value for each trace point in the spliced trace line, and set the tag value of each end point of each trace line in the spliced trace line to a first tag value, and set the tag values of the remaining trace points in the spliced trace line to a second tag value. In some embodiments, the terminal may generate a tag value for each trace point in the spliced trace line, and set the tag values of trace points adjacent to and belonging to different trace lines in the spliced trace line to a first tag value, and set the tag values of the trace points remaining in the spliced trace line to a second tag value, the first tag value being different from the second tag value. The terminal can generate boundary information corresponding to the spliced track line according to the label value of each track point in the spliced track line. It will be appreciated that the locus points adjacent and belonging to different loci are endpoints of the locus. The boundary information includes a label value for each track point.
And step 208, performing point expansion according to each track point in the spliced track line, and generating expansion points for drawing, wherein each track point corresponds to each expansion point.
Wherein the boundary information and the stitching trajectory are generated prior to rendering, the process of generating the boundary information and the stitching trajectory may be performed by a CPU (Central Processing Unit ) in the terminal. The rendering, i.e. drawing, process may be performed by a GPU (Graphics Processing Unit, graphics processor) in the terminal.
Specifically, after boundary information and a splicing track line are generated, a CPU in the terminal inputs the boundary information and the splicing track line into a GPU for rendering so as to draw each road marking line. In the rendering, i.e. drawing, the terminal generates a corresponding plurality of expansion points, namely at least two, for each track point in the spliced track line.
In some embodiments, the road marking is a line having a width, the trajectory line may be a centerline of the road marking, the trajectory line may be understood as a line without a width, each trajectory point corresponds to a width, the width of the trajectory point is according to the width of the road marking at the trajectory point, i.e., the width of the trajectory point, and is the length of a line segment intersecting the road marking in a straight line passing through the trajectory point and perpendicular to the road marking. In the rendering, i.e. drawing, the terminal may generate a corresponding plurality of expansion points, a plurality being at least two, for each track point in the spliced track line. The expansion point corresponding to the track point may be generated according to the track point and the width corresponding to the track point.
Taking the example of generating a plurality of expansion points corresponding to one track point, the terminal can determine a first direction and a second direction passing through the track point and perpendicular to a track line to which the track point belongs, wherein the first direction and the second direction are opposite. The terminal may take half the width corresponding to the track point as the offset distance. The terminal can move the track point along the first direction by the offset distance to obtain an expansion point corresponding to the track point, and move the track point along the second direction by the offset distance to obtain the expansion point corresponding to the track point.
In some embodiments, the terminal may further generate a new corresponding expansion point of the track point according to the expansion point corresponding to the track point. For example, the terminal may move the expansion point a predetermined distance along a direction parallel to the trajectory line, resulting in a new expansion point. The preset distance can be set as required. The track points in the track line can be uniformly distributed, the distances between adjacent track points are consistent, and the preset distance is smaller than the distance between the track points. As shown in fig. 4, it is shown that 3 track points are provided, the unfilled circle represents a track point, the filled circle represents an expansion point, each track point corresponds to 4 expansion points, and in the example of track point 1, expansion point 1_1 and expansion point 1_2 are generated by moving track point 1, expansion point 1_3 is generated by moving expansion point 1_1, and expansion point 1_4 is generated by moving expansion point 1_2.
Step 210, obtaining a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line.
The expansion point combination comprises at least three expansion points, for example, three expansion points. The track points corresponding to the expansion points in the expansion point combination belong to the same track line.
Specifically, the terminal may sequentially obtain the expansion point combinations from the expansion points according to the boundary information, and draw each road marking according to the expansion point combinations. The process of obtaining the expansion point combination may be performed in parallel with the process of drawing from the expansion point combination. For example, the drawing may be performed based on the last expansion point combination while the next expansion point combination is acquired.
In some embodiments, the terminal may first perform a process of acquiring a plurality of expansion point combinations from each expansion point according to the boundary information, and draw each road marking according to each expansion point combination after each expansion point combination is obtained.
In some embodiments, the boundary information includes a label value for each track point. For each track point in the spliced track line, the terminal can use the label value of the track point as the label value of each expansion point corresponding to the track point, for example, if the label value of the track point is 1, the label value of each expansion point corresponding to the track point is 1. A spliced track line can be understood as a sequence of track points arranged. The terminal can arrange the expansion points corresponding to the track points according to the arrangement sequence of the track points in the spliced track line, so as to generate an expansion point sequence. The terminal may acquire at least three consecutive expansion points from the expansion point sequence, and form the expansion point combination from the at least three expansion points when the acquired tag value of at least one expansion point is the second tag value.
And 212, drawing each road marking line according to each expansion point combination.
Specifically, the terminal may determine a geometric figure formed by connecting expansion points in the expansion point combination, where the geometric figure is a triangle when three expansion points are included in the expansion point combination and a quadrilateral when four expansion points are included in the expansion point combination.
In some embodiments, the terminal may perform rasterization processing on the geometric figure to generate a plurality of primitives, determine pixel points corresponding to the primitives in the map display screen area according to the color values of the primitives and the expansion points, and color the determined pixel points according to the color values of the expansion points, so as to display the road marking in the screen area. Specifically, the terminal may input the geometric figure and the color value of the expansion point in the geometric figure into a fragment shader, and rasterize the geometric figure and color the determined pixel point through the fragment shader, thereby displaying the road marking in the screen area. As shown in fig. 5, each road marking drawn, including a road boundary line, a lane boundary line, and a lane center line, is illustrated. It should be noted that fig. 5 is only a schematic diagram, and does not represent a road marking actually drawn.
In some embodiments, the plurality of road markings are road markings required to be drawn in a single frame image, and the terminal can draw the road markings according to each expansion point combination, so that the plurality of road markings can be drawn once in the single frame image drawing, the drawing efficiency is improved, and the computer resources occupied in the drawing process are saved.
In the map road drawing method, since the boundary information is used for identifying the track points of different track lines from the spliced track lines, the track points belonging to different track lines can be distinguished from the spliced track lines according to the boundary information in the rendering and drawing process, so that the track points belonging to the same track line can be generated into expansion point combinations, and each road mark can be drawn based on each expansion point combination, so that a plurality of road marks can be drawn in one rendering process, and the drawing efficiency of the map road is improved.
Therefore, the map road drawing method provided by the application realizes a batch rendering method. The batch rendering is a method for processing, integrating and packaging all data required to be rendered by an interface, and drawing a plurality of road marks at one time, so that the batch rendering can reduce the drawing performance cost and improve the drawing efficiency while ensuring the rendering effect.
In some embodiments, generating boundary information corresponding to the splice trajectory line includes: generating a tag value for each track point in the spliced track line; the label values of adjacent track points belonging to different track lines in the spliced track line are first label values, the label values of the rest track points in the spliced track line are second label values, and the first label values are different from the second label values; and generating boundary information corresponding to the spliced track line according to the label value of each track point in the spliced track line.
The boundary information comprises label values corresponding to each track point in the spliced track line. The remaining trace points refer to trace points other than those adjacent to and belonging to different trace lines in the spliced trace line. The first tag value and the second tag value are two preset different values, and the first tag value and the second tag value may be corresponding values according to needs, for example, the first tag value is 1, the second tag value is-1, or the first tag value is-1, the second tag value is 1, or the first tag value is 0, the second tag value is 1, or the first tag value is 1, the second tag value is 0, or the like.
Specifically, the terminal may determine, from the spliced track lines, track points that are adjacent and belong to different track lines, determine, as a first tag value, tag values of track points that are adjacent and belong to different track lines, and determine, as a second tag value, tag values of track points that remain in the spliced track lines. Taking the first label value as-1 and the second label value as 1 as an example, as shown in fig. 6, the spliced track lines are (a 1, a2, a3, b1, b2, b3, c1, c2, c 3), (a 1, a2, a 3), (b 1, b2, b 3) and (c 1, c2, c 3) as 3 track lines, the label values of a3 and b1 are both set to the first label value of-1 because a3 and b1 are adjacent and belong to different track lines, and the label values of b3 and c1 are both set to the first label value of-1 because b3 and c1 are adjacent and belong to different track lines, and the label values of the remaining a1, a2, b2, c2, c3 are both set to the second label value of-1.
In this embodiment, since the tag values of the adjacent track points belonging to different track lines in the spliced track line are the first tag values, and the tag values of the remaining track points in the spliced track line are the second tag values, the first tag values are different from the second tag values, so that the track points belonging to different road marks can be quickly identified from the spliced track line through the first tag values and the second tag values, and the processing efficiency is improved.
In some embodiments, obtaining a plurality of expansion point combinations from expansion points according to boundary information includes: acquiring a label value of each track point in the spliced track line from the boundary information; for each track point, taking the label value of the track point as the label value of the expansion point corresponding to the track point; according to the arrangement sequence of the track points in the spliced track line, arranging the expansion points corresponding to the track points respectively to generate an expansion point sequence; acquiring a plurality of expansion point combinations from the expansion point sequence; the expansion point combination comprises at least three continuous expansion points in the expansion point sequence, and the label value of at least one expansion point in the expansion point combination is a second label value.
The more the track points are located before the positions of the track points in the spliced track line, the more the positions of the expansion points corresponding to the track points are located before the positions of the expansion points in the expansion point sequence, and the arrangement sequence among the expansion points corresponding to the same track point can be arbitrary. For example, track point 1 is arranged before track point 2, track point 1 has 2 expansion points, namely expansion point 1 and expansion point 2, track point 2 has 2 expansion points, namely expansion point 3 and expansion point 4, respectively, then expansion point 1 and expansion point 2 are arranged before expansion point 3 and expansion point 4, expansion point 1 can be arranged before expansion point 2 or after expansion point 2, and expansion point 3 can be arranged before expansion point 4 or after expansion point 4.
Wherein each track point generates at least two expansion points, e.g. 3 or 4 expansion points per track point.
Specifically, the terminal may sequentially obtain at least three continuous expansion points from the expansion point sequence, and when the tag value of at least one expansion point of the obtained at least three expansion points is the second tag value, form an expansion point combination by using the at least three expansion points.
In some embodiments, the terminal may arrange the tag values of the expansion points according to the arrangement sequence of the expansion points in the expansion point sequence, so as to generate an expansion point tag sequence. The more forward the extension point is in the extension point sequence, the more forward the extension point's tag value is in the extension point tag sequence. As shown in fig. 6, the boundary information (1, -1, 1) corresponding to the spliced track lines (a 1, a2, a3, b1, b2, b3, c1, c2, c 3) is shown. As shown in fig. 7, the splicing track lines are (a 1, a2, a3, b1, b2, b3, c1, c2, c 3), 4 expansion points are generated for each track point, for example, a1 generates a11 to a14, b3 generates b31 to b34, c1 generates c11 to c14, the tag values of the track points are used as the tag values of the expansion points generated by the track points, the tag values of the expansion points are arranged into an expansion point tag sequence according to the tag values of the expansion points, as shown in fig. 7, the expansion point tag sequence is shown, and since the tag value of a1 is 1, the tag values of the expansion points a11 to a14 generated by a1 are all 1, and the more the expansion points are located before the expansion points in the expansion point sequence, the more the tag values of the expansion points are located before the expansion point tag sequence. For each expansion point in the expansion point sequence, the terminal can determine the label value consistent with the arrangement sequence of the expansion point from the expansion point label sequence to obtain the label value of the expansion point.
In this embodiment, since the tag value of at least one expansion point in the expansion point combination is the second tag value, the track points corresponding to the expansion points in the expansion point combination can be made to belong to the same track line, i.e. the expansion points in the expansion point combination are points for drawing the same road marking, so that the corresponding road marking can be drawn in the drawing process according to the expansion point combination.
In some embodiments, obtaining the tag value for each trace point in the spliced trace line from the boundary information includes: according to the arrangement sequence of the track points in the spliced track line, arranging the label values of the track points in the spliced track line to obtain boundary information corresponding to the spliced track line; and determining a label value consistent with the arrangement sequence of the track points from the boundary information for each track point in the spliced track line to obtain the label value of the track point.
Specifically, the terminal may arrange the tag values of the track points in the spliced track line according to the arrangement order of the track points in the spliced track line, and use the arranged sequence as boundary information. As shown in fig. 6, the splice traces are (a 1, a2, a3, b1, b2, b3, c1, c2, c 3), and the boundary information corresponding to (a 1, a2, a3, b1, b2, b3, c1, c2, c 3) is the sequence (1, -1, 1).
In this embodiment, the tag value consistent with the arrangement sequence of the track points is determined from the boundary information, so as to obtain the tag value of the track points, so that the tag value of the track points can be quickly and accurately determined, and the drawing efficiency is improved.
In some embodiments, obtaining a plurality of expansion point combinations from the expansion point sequence includes: acquiring at least three continuous expansion points from the expansion point sequence; under the condition that the obtained label value of at least one expansion point in the at least three expansion points is a second label value, forming an expansion point combination by the at least three expansion points; and returning to the step of acquiring at least three continuous expansion points from the expansion point sequence until the expansion point sequence is traversed to obtain a plurality of expansion point combinations.
Specifically, the terminal may acquire at least three consecutive expansion points from the expansion point sequence in the order from front to back. For example, the terminal may obtain three consecutive expansion points from the expansion point sequence in the order from front to back. The terminal can preset a number of expansion points at intervals, three continuous expansion points are obtained from the expansion point sequence, the preset number can be set according to the needs, and the preset data is greater than or equal to 1, for example, the preset number is 1 or 2.
Taking the expansion point sequence in fig. 7 as an example, 4 expansion points generated by a22 are a 21-a 24, and are arranged according to a 21-a 24 in the expansion point sequence, if the preset number is 1, the terminal firstly acquires a 11-a 13, then acquires a 12-a 14, then acquires a 13-a 21, and then acquires a 14-a 22, and the steps are continuously circulated until the expansion point sequence is traversed. The step of combining at least three expansion points into an expansion point combination is to use a set formed by the at least three expansion points as the expansion point combination, wherein the expansion point combination comprises each expansion point in the at least three expansion points.
In some embodiments, after each time the terminal obtains three expansion points, the terminal obtains the respective tag values of the three expansion points, and when the tag value of at least one expansion point in the three expansion points is the second tag value, the three expansion points are combined into an expansion point combination. For example, in fig. 7, if the three obtained expansion points are a11 to a13, the label values of a11 to a13 are all the second label values, so that a11 to a13 are combined into an expansion point combination; for example, in fig. 8, if the three obtained expansion points are b24, b31, and b32, the tag value of b24 is 1, which is the second tag value, so that b24, b31, and b32 are combined into an expansion point combination; for example, in fig. 7, if the obtained tag values of the three expansion points b33, b34 and c11 are all the first tag values, the expansion point combination is not generated according to b33, b34 and c11, so that when drawing, drawing is not performed according to the geometric figures formed by connecting b33, b34 and c11, so that the drawn road markings are mutually independent, according to the actual situation, and the drawing accuracy is improved.
In this embodiment, when the obtained tag value of at least one expansion point of the at least three expansion points is the second tag value, the at least three expansion points are combined to form an expansion point combination, so that the drawing is performed according to the expansion point combination, the drawn plurality of road marks are mutually independent, the actual situation is met, and the drawing accuracy is improved.
In some embodiments, the method further comprises: and returning to the step of acquiring the continuous at least three expansion points from the expansion point sequence under the condition that the acquired tag values of the at least three expansion points are all the first tag values.
Specifically, under the condition that the obtained tag values of at least three expansion points are all the first tag values, the terminal does not generate expansion point combinations according to the three expansion points. For example, in fig. 8, if the three expansion points are b33, b34, and c11, the terminal does not generate an expansion point combination from b33, b34, and c 11. It should be noted that, in the case that the track points corresponding to the at least three expansion points respectively belong to the same track line, the terminal may not generate the expansion point combination according to the at least three expansion points. For example, in fig. 8, the trace points corresponding to b31, b32, and b33 belong to the same trace line, but the tag values of b31, b32, and b33 are all-1, which is the first tag value, so the terminal does not generate an expansion point combination from the three expansion points. In the process of actually generating the expansion points, the positions of the generated expansion points can be flexibly adjusted, so that even if a plurality of expansion points at the edge cannot generate expansion point combinations, the drawn road marking has a good effect.
In this embodiment, when the obtained tag values of at least three expansion points are all the first tag values, the step of obtaining at least three continuous expansion points from the expansion point sequence is returned, and the expansion point combination is not formed according to the at least three expansion points, so that the drawn multiple road marks are mutually independent, according with the actual situation, and the drawing accuracy is improved.
In some embodiments, stitching the trajectory lines of the plurality of road markings to generate a stitched trajectory line includes: determining the splicing sequence of the track lines of the plurality of road marks according to the widths of the plurality of road marks; and splicing the track lines according to the splicing sequence of the track lines to generate spliced track lines.
Specifically, the terminal may determine the splicing order of the road markings according to the width of the road markings. For example, the larger the width, the earlier the splice order. Alternatively, the smaller the width, the more forward the splice order. For at least two road markings of the same width, the splice order between the track lines of the at least two road markings may be arbitrary.
In this embodiment, the splicing order of the road markings is determined according to the widths of the road markings, so that the road markings with the same width are close in rendering time, and thus the display time of the road markings with the same width is close, and the display effect is improved.
In some embodiments, acquiring the trajectory lines of a plurality of road markings in a map includes: displaying a map viewing area in a browser; the map reading area is used for displaying a map area in the map; determining a geographical range of a map area to be displayed in the map viewing area; acquiring track lines of a plurality of road marks in a geographic range; the method further comprises the steps of: and displaying the drawn road marks in the map reading area.
Wherein a browser is an application used to retrieve, display, and communicate Web information resources. The browser in this embodiment may be any browser supporting map drawing, and drawing may be implemented by rendering, so the browser may be a browser supporting rendering. For example, the browser in the present embodiment is a browser supporting WebGL and threjs. WebGL is a 3D (3 Dimensions) drawing protocol, which can provide hardware 3D accelerated rendering, and provides a drawing interface for scenes with large data volume, high performance requirements, and a need for three-dimensional scene operation. Threjs is a WebGL engine, which can be used to create three-dimensional scenes and various objects in the three-dimensional scenes, including objects such as cameras, shadows, materials, etc. The map viewing area is an area for displaying a map. The map area refers to an area in the map. The geographic extent of the map region represents the location of the map region in the map.
Specifically, the terminal may display the map viewing page in the browser and display the map viewing area in the map viewing page. The map viewing page provides a function of viewing a map, and may also provide a function of editing a road in the map.
In some embodiments, the terminal determines a geographic area of a map area to be displayed in the map viewing area, determines road markings included in the map area of the geographic area, and obtains respective trajectories of the road markings included in the geographic area.
In this embodiment, the map browsing area is displayed in the browser, the geographical range of the map area to be displayed in the map browsing area is determined, and the track lines of a plurality of road marks in the geographical range are obtained, so that a plurality of road marks can be drawn at one time at the browser, that is, the Web end, and the efficiency of drawing map roads at the Web end is improved, so that each drawn road mark can be rapidly displayed in the map browsing area, and the effect of browsing map roads in the browser is improved.
In some embodiments, determining a geographic area of a map region to be displayed in a map viewing area includes: receiving a geographic area changing operation for a map viewing area; responding to the geographic area changing operation, and updating the geographic coordinates of the reference points in the map reading area based on the geographic area changing operation to obtain updated geographic coordinates of the reference points; and determining the geographical range of the geographical area to be displayed in the map reading area according to the updated geographical coordinates of the reference points.
The geographical area change operation is an operation for instructing to update the geographical area displayed in the map viewing area, for example, to update from the geographical area displaying one geographical area to the geographical area displaying another geographical area. The geographical area changing operation may be, for example, a scale changing operation for changing a scale used for displaying a map in a map viewing area, for example, changing a map displayed on one scale to a map displayed on another scale. Changing the scale causes the map area displayed in the map viewing area to be updated. The geographic area changing operation may be triggered by the map viewing area, including but not limited to operations such as sliding, dragging, double clicking, etc. triggered in the map viewing area, the sliding or dragging may trigger movement of the map area, e.g., sliding or dragging upward, may remove all or part of the currently displayed map area from the map viewing area, and display a lower partial area of the currently displayed map area in the map viewing area, thereby enabling updating of the map area in the map viewing area.
The reference point belongs to a pixel point, and refers to a pixel point in a screen area occupied by the map viewing area, and the screen area occupied by the map viewing area is referred to as a map display screen area. The reference point may be any pixel point in the map display screen area, for example, may be a pixel point at a center position of the map display screen area, and the pixel point at the center position is referred to as a center pixel point. The reference point may also be a pixel point at a boundary position in the map display screen area, for example, in the case where the map display screen area is a rectangle, the reference point may be a pixel point at a corner point of the map display screen area, the corner point of the rectangle referring to 4 vertices of the rectangle.
The coordinates of the pixel points in the map display screen area may employ coordinates in a screen coordinate system. The coordinates in the screen coordinate system and the coordinates in the longitude and latitude coordinate system have a coordinate conversion relation, and the coordinates in the screen coordinate system can be converted into the coordinates in the longitude and latitude coordinate system through the coordinate conversion relation. The coordinates in the screen coordinate system may be referred to as screen coordinates, and the coordinates in the latitude and longitude coordinate system may be referred to as geographic coordinates.
Specifically, the terminal may record, at the current time, the screen coordinates of the reference point in the map display screen area as the current screen coordinates of the reference point, and record, as the current geographic coordinates of the reference point, the geographic coordinates corresponding to the screen coordinates of the reference point. Under the condition that the terminal receives the geographic area changing operation aiming at the map reading area, the terminal determines the longitude and latitude offset according to the geographic area changing operation, and offsets the current geographic coordinates of the reference point according to the longitude and latitude offset to obtain updated geographic coordinates of the reference point, and the terminal can determine the geographic range of the geographic area to be displayed according to the updated geographic coordinates of the reference point.
In some embodiments, the terminal may determine the geographic scope of the geographic area to be displayed according to the updated geographic coordinates of the reference point and the size of the map display screen area. Specifically, the terminal may determine the geographical coordinates of the pixel points at the at least two corner points in the map display screen area according to the updated geographical coordinates of the reference points, and determine the geographical range of the geographical area to be displayed according to the geographical coordinates of the pixel points at the at least two corner points. The at least two corner points may include two corner points on a diagonal line of the map display screen area, or the at least two corner points are any three corner points in the map display screen area, or the at least two corner points are all corner points, i.e., four corner points, in the map display screen area. Taking the reference point as a central pixel point as an example, the terminal can determine the geographic range of the geographic area to be displayed according to the following formula:
ptGeo.x=geo_center_.x+(ptWnd.x-see_center_.x)*resolution_;
ptGeo.y=geo_center_.y+(ptWnd.y-see_center_.y)*resolution_;
the screen coordinates are two-dimensional coordinates, and can be represented by (x, y), wherein x is an abscissa, and y is an ordinate. seecenter x is the abscissa in the screen coordinates of the center pixel, and seecenter y is the ordinate in the screen coordinates of the center pixel. geo_center_x and geo_center_y represent the geographic coordinates of the center pixel, and resolution_represents the scale. ptWnd represents a pixel point at an angle in the map display screen area, and ptGeo represents a geographic coordinate corresponding to the screen coordinate of the pixel point ptWnd. ptwnd.x and ptwnd.y represent screen coordinates of the pixel point ptWnd at the corner point, and ptgeo.x and ptgeo.y represent geographical coordinates corresponding to the screen coordinates of the pixel point ptWnd.
In some embodiments, the terminal may further update the current screen coordinate with the geographical coordinate obtained after the offset, that is, update the current screen coordinate to the geographical coordinate obtained after the offset, thereby implementing the update of the current screen coordinate of the reference point.
In this embodiment, a geographic region changing operation for a map viewing region is received, the geographic coordinates of reference points in the map viewing region are updated based on the geographic region changing operation in response to the geographic region changing operation, updated geographic coordinates of the reference points are obtained, and the geographic range of the geographic region to be displayed in the map viewing region is determined according to the updated geographic coordinates of the reference points, so that the efficiency of determining the geographic range is improved.
In some embodiments, the map is pre-divided into a plurality of unit geographic areas; acquiring the track line of a plurality of road marks in a geographic range comprises: determining a unit geographic range intersected with the geographic range to obtain at least one target unit geographic range; acquiring a track line of each road marking in at least one target unit geographic range; and obtaining the track line of each road marking in the geographic range from the track line of each road marking in the geographic range of at least one target unit.
The map may be divided into a plurality of unit geographic ranges in advance through a two-dimensional grid, wherein the two-dimensional grid includes a plurality of cells, and the geographic range occupied by each cell in the map is one unit geographic range. The size of the cells determines the size of the unit geographic area. As shown in fig. 9, each cell in the dashed two-dimensional grid corresponds to a unit geographic area.
In particular, the terminal may determine a unit geographic area intersecting the geographic area, the size of the geographic area being likely to be less than, greater than, or equal to the size of the unit geographic area. There may be at least one unit geographic area intersecting the geographic area, and the unit geographic area intersecting the geographic area may include a unit geographic area located in the geographic area, and a unit geographic area partially overlapping the geographic area. As shown in fig. 9, the rectangle box with solid lines represents the geographical range of the geographical area to be displayed, and it can be seen that the geographical range intersects with, i.e., overlaps with, 4 unit geographical ranges, so that all of the 4 unit geographical ranges are target unit geographical ranges.
In some embodiments, for each target unit geographic area, the terminal determines an overlapping area between the geographic area and the target unit geographic area, obtains the overlapping area, obtains a track line of each road marking located in the overlapping area from road network data of the target unit geographic area, and obtains track lines of each road marking in a plurality of the geographic areas.
In this embodiment, since the map is divided into a plurality of unit geographic ranges in advance, so that a unit geographic range intersecting with the geographic range is determined, a target unit geographic range is obtained, and the track line of each road marking in the target unit geographic range is obtained.
In some embodiments, obtaining the trajectory line of each road marking in the geographic area from the trajectory line of each road marking in the geographic area of at least one target unit comprises: determining a range overlapped with the geographic range from the target unit geographic range for each target unit geographic range to obtain an overlapped range; and acquiring the track line of each road marking in the corresponding overlapping range from the road network data of each target unit geographic range to obtain the track line of each road marking in the geographic range.
Specifically, after determining the target unit geographic range, the terminal may acquire road network data of the target unit geographic range, and determine a trajectory line of each road marking from the road network data of the target unit geographic range. In the case that the terminal locally stores the road network data of the target unit geographical range, the terminal can locally acquire the road network data of the target unit geographical range. In the case that the terminal does not store the road network data of the target unit geographical range locally, the terminal may send a road network data acquisition request carrying the target unit geographical range to the server, the server returns the road network data of the target unit geographical range to the terminal in response to the road network data acquisition request, and the terminal may store, for example cache, the road network data locally after receiving the road network data of the target unit geographical range.
In some embodiments, after the terminal obtains the road network data of the geographic range of the target unit, the rtree structure may be used to store the road network data. In the process of continuously triggering the geographic area change operation in the map browsing area, the terminal can acquire road network data of a plurality of unit geographic areas and store the road network data in rtrees. And, each time the terminal responds to the geographical area change operation, confirm the geographical scope of the target unit, judge whether there is road network data of the geographical scope of the target unit in rtre, if exist, find the path line of the road marking in the geographical scope from rtre, if not find, can obtain the road network data of the geographical scope of the target unit from the server, then obtain the path line of each road marking in the geographical scope from the obtained road network data.
In this embodiment, the track line of each road marking in the corresponding overlapping range is obtained from the road network data of each target unit geographical range, so as to obtain the track line of each road marking in the geographical range, thereby being capable of quickly obtaining the track line of each road marking in the geographical range and improving the efficiency of obtaining the track line.
In some embodiments, the method further comprises: acquiring respective color values of all track points in the spliced track line; determining the color value of the expansion point generated according to the track point according to the color value of the track point; drawing each road marking according to each expansion point combination, including: determining a geometric figure formed by connecting expansion points in the expansion point combination aiming at each expansion point combination; and drawing out each road marking according to each geometric figure and the color value of each expansion point in each geometric figure.
The geometric figure is a figure formed by connecting expansion points in the expansion point combination, and is triangular when the expansion point combination comprises three expansion points and quadrangular when the expansion point combination comprises four expansion points.
Specifically, before drawing, that is, before rendering, the terminal may obtain respective color values of each track point in the spliced track line, and may arrange the color values of each track point according to an arrangement sequence of track points in the spliced track line, to obtain a color value sequence. In the drawing process, the terminal can input the color value sequence into the GPU for rendering, and in the rendering process, the terminal can acquire the color value consistent with the position of the track point in the spliced track line from the color value sequence to acquire the color value of the track point. The terminal may determine the color value of the track point as the color value of the extension point generated from the track point.
In some embodiments, after obtaining the color values of the expansion points, the terminal may arrange the color values of the expansion points according to the arrangement order of the expansion points in the expansion point sequence, so as to generate an expansion point color value sequence. The terminal can obtain the color value of the expansion point from the color value of the expansion point at the same position according to the position of the expansion point in the expansion point sequence.
In some embodiments, each expansion point combination includes three expansion points, and the geometric figure generated by the expansion point combination is a triangle. As shown in fig. 10, a track line having three track points is illustrated, 6 expansion points are generated according to each track point in the track line, and if the arrangement order of the 6 expansion points is 1-6 (the numbers beside the expansion points in fig. 6 represent the arrangement order), the 1 st to 3 rd expansion points form expansion point combinations, the 2 nd to 4 th expansion points form expansion point combinations, the 3 rd to 5 th expansion points form expansion point combinations, and the 4 th to 6 th expansion points form expansion point combinations, thereby generating 4 triangles.
In some embodiments, the terminal may perform rasterization processing on the geometric figure to generate a plurality of primitives, determine pixel points corresponding to the primitives in the map display screen area according to the color values of the primitives and the expansion points, and color the determined pixel points according to the color values of the expansion points, so as to display the road marking in the screen area. Specifically, the terminal may input the geometric figure and the color value of the expansion point in the geometric figure into a fragment shader, and rasterize the geometric figure and color the determined pixel point through the fragment shader, thereby displaying the road marking in the screen area.
In this embodiment, the drawing is performed according to each expansion point combination, so that a plurality of road markings without connection relationship can be drawn in one rendering process, and the efficiency of drawing the road markings is improved.
In some embodiments, as shown in fig. 11, a map road drawing method is provided, which may be performed by a terminal, or may be performed by a terminal and a server together, and the method is described as applied to the terminal in fig. 1, including the following steps 1102 to 1128. Wherein:
step 1102, a map viewing area is displayed in a browser.
Wherein the map viewing area is for displaying a map area in the map.
Step 1104 determines a geographic area of the map area to be displayed in the map viewing area.
At step 1106, track lines of a plurality of road markings within a geographic area are acquired.
Step 1108, stitching the track lines of the plurality of road markings to generate a stitched track line.
In step 1110, the label values of the adjacent track points belonging to different track lines in the spliced track line are set as the first label value, the label values of the rest track points in the spliced track line are set as the second label value, and the boundary information corresponding to the spliced track line is generated according to the label value of each track point in the spliced track line.
Wherein the first tag value is different from the second tag value.
In step 1112, in single frame drawing, point expansion is performed according to each track point in the spliced track line, and expansion points for drawing corresponding to each track point are generated.
Step 1114, a tag value for each trace point in the spliced trace line is obtained from the boundary information.
Step 1116, regarding each track point, using the label value of the track point as the label value of the expansion point corresponding to the track point.
Step 1118, arranging the expansion points corresponding to the track points according to the arrangement sequence of the track points in the spliced track line, and generating an expansion point sequence.
Step 1120, obtaining at least three consecutive expansion points from the expansion point sequence.
Step 1122, it is determined whether the obtained tag value of at least one expansion point of the at least three expansion points is the second tag value, if yes, step 1124 is executed, and if no, step 1126 is executed.
Step 1124, the obtained at least three expansion points are combined into an expansion point combination, and the process proceeds to step 1126.
Step 1126, determining whether the expansion point sequence has been traversed, if not, returning to step 1120, if yes, proceeding to step 1128.
And 1128, drawing each road marking according to each expansion point combination, and displaying each drawn road marking in the map reading area.
The terminal can draw according to the expansion point combination after obtaining the expansion point combination. It is not necessary to draw after all the expansion point combinations are obtained. Alternatively, the terminal may draw after all the expansion points are combined.
In this embodiment, the track points of different road markings are distinguished by the tag values, so that in the rendering and drawing process, the specific required drawing content can be determined according to the tag values, and in single-frame drawing, the road marking lines (road boundary line, lane center line) and the like of multiple types of line of sight can be drawn at one time, and of course, facilities on the road can be drawn in addition to the road marking lines, thereby reducing the drawing times, improving the drawing efficiency and saving the computer resources consumed in the drawing process.
In some embodiments, as shown in fig. 12, a system architecture diagram corresponding to the map road drawing method provided by the application is shown, where the system architecture diagram includes 4 links, namely, data pulling, range clipping, data aggregation and rendering drawing. Data pulling, range clipping, data aggregation are performed in the CPU and rendering drawing is performed in the GPU. In the data pulling link, the terminal dynamically pulls the road network data of the unit geographic range from the server according to the geographic range required to be displayed, stores the pulled road network data, for example, stores the road network data by constructing rtrees, and when the road network data required to be used is pulled, namely stored locally, the terminal does not need to be pulled repeatedly from the server. In the range cutting link, the latitude and longitude range needing to be displayed is calculated, the screen range refers to the screen area occupied by the geographical viewing area, namely the map display screen area, and the latitude and longitude range refers to the geographical range needing to be displayed. In the range cutting link, road network data in the geographic range are also acquired, and the track line of each road marking in the geographic range is acquired from the road network data in the geographic range. In the data aggregation link, a position array is generated according to the position data, the position data comprises the track lines of all road marks in the geographic range acquired in the range cutting link, each track point in the track lines is represented by coordinates (namely, positions), the position array refers to a spliced track line, and the spliced track line can be stored through the array, so that the position array is called. In the data aggregation link, a non-connection identifier is also acquired, wherein the non-connection identifier refers to a first label value, namely in the link, label values are also generated for each track point in the spliced track line, namely boundary information is generated. In the data aggregation link, style data is also acquired, the style data comprises various types of information such as color values or widths corresponding to road marks respectively, each road mark in the geographic range to be displayed can be of any type, so that corresponding styles such as style values and widths can be matched for each road mark to be drawn, a corresponding color value sequence and a corresponding width sequence can be generated for the spliced track line, the color value sequence comprises the color value of each track point in the spliced track line, and the width sequence comprises the width corresponding to each track point in the spliced track line. In the data aggregation link, array data structure sharing can be instantiated, namely, splicing track lines, boundary information and related sequences of patterns, such as color value sequences and width sequences, are packaged, and data obtained by packaging are transmitted to a GPU for rendering and drawing. In the rendering and drawing link, the GPU generates an expansion point through a vertex shader, sets a corresponding label value for the expansion point, and carries out continuous and discontinuous special treatment on the expansion point, wherein the value is the corresponding label value set for the expansion point, and the vertex shader processes the expansion point with the width, namely, generates the expansion point according to the width of the track point. The pattern-related sequence may also include a transparency sequence including a transparency for each track point in the spliced track line. The vertex shader passes the generated extension points, the label values of the extension points, and the sequence related to the style into the fragment shader. And if the track points corresponding to at least two expansion points in the at least three expansion points belong to different track lines, generating expansion point combinations by not generating the at least three expansion points, so that the geometric figure formed by the at least three expansion points can not be drawn. Road markings of various samples are drawn in the fragment shader according to the sequence related to the transmitted pattern. The rendering and drawing link can also comprise a perspective projection and three-dimensional clipping process, the rendering and drawing link determines the color value of each pixel point in a single frame image, namely determines the color value of each pixel point in the map display screen area, and each road marking can be displayed by coloring the pixel point.
According to the map road drawing method provided by the application, the rendering capability is improved, the drawing element level is expanded from 10 ten thousand to 30 ten thousand under the condition of the same environmental condition, the drawing frame rate is improved from 20 to 50, the experience is more flow, and the storage level of the memory is reduced due to more single data object, so that the utilization rate of the GPU and the memory space can be improved.
The map road drawing method provided by the application can be applied to various application scenes, including but not limited to drawing a map in the real world, such as a map suitable for a large trip scene, or a map in a virtual scene, such as a map in a game scene.
Taking the example of making a high-precision map in the real world, the terminal can display a map reading area in a browser and display road marks in a preset geographical range in the map reading area, wherein the preset geographical range can be set according to the needs, and the preset geographical range is used for determining the geographical range initially displayed in the map reading area. In the process of manufacturing a high-precision map, the displayed geographic range is generally adjusted, so that in the process of manufacturing the high-precision map, a terminal receives geographic region changing operation aiming at a map reading region, in response to the geographic region changing operation, geographic coordinates of reference points in the map reading region are updated based on the geographic region changing operation to obtain updated geographic coordinates of the reference points, the geographic range of the high-precision map to be displayed in the map reading region is determined according to the updated geographic coordinates of the reference points, the track lines of a plurality of road marks in the geographic range are acquired, the track lines of the plurality of road marks are spliced to generate a spliced track line, label values of track points which are adjacent to each other and belong to different track lines in the spliced track line are set as first label values, label values of the track points which are remained in the spliced track line are set as second label values, boundary information corresponding to each track point in the spliced track line is generated, in a single frame, the track points are expanded according to the track points in the map reading region, the track points are respectively corresponding to the map reading region, the track points are used for the map reading region are acquired, the track lines in the map reading region are respectively arranged in the extended sequence according to the high-precision, the label values of the track points in the map reading region are respectively arranged in the extended track line sequence, and the label values of each track point is arranged in the extended track line, and the track points are respectively corresponding to each track point is extended in the track line, and the track point is extended, and the corresponding to the track point is extended, and the geographical point is correspondingly and the geographical. According to the map road drawing method provided by the application, in the process of making a high-precision map, a plurality of road marks can be drawn at one time in one rendering drawing process, and the efficiency of making or editing the map in the real world can be improved. Taking the example of making a virtual map in a game scene, the terminal can display a map reading area in a browser and display road marks in a preset geographical range in the map reading area, wherein the preset geographical range can be set according to the needs, and the preset geographical range is used for determining the geographical range initially displayed in the map reading area. In the process of manufacturing a high-precision map, the displayed geographic range is generally adjusted, so that in the process of manufacturing the high-precision map, a terminal receives geographic region changing operation aiming at a map reading region, in response to the geographic region changing operation, geographic coordinates of reference points in the map reading region are updated based on the geographic region changing operation to obtain updated geographic coordinates of the reference points, the geographic range of the virtual map required to be displayed in the map reading region is determined according to the updated geographic coordinates of the reference points, the track lines of a plurality of road marks in the geographic range are acquired, the track lines of the road marks are spliced to generate a spliced track line, label values of track points which are adjacent to each other and belong to different track lines in the spliced track line are set as first label values, label values of each track point in the spliced track line are set as second label values, boundary information corresponding to the spliced track points are generated, in a single frame, the track points are expanded according to the track points in the spliced track line, the map reading region are correspondingly used for generating the track points, the track points are respectively corresponding to the map reading region, the map track line is expanded according to the boundary information, the map track line expansion sequence is obtained, the track points in the map expansion sequence is respectively, and the track points in the map expansion sequence are respectively arranged according to the label values of the corresponding track points in the spliced track points. The map road drawing method provided by the application can improve the efficiency of manufacturing or editing the virtual map.
In the process of manufacturing a map (e.g., a high-precision map or a virtual map), it is generally necessary to edit road markings, including but not limited to at least one of deleting, adding, and adjusting road markings, in the case where the terminal has displayed road markings in the drawn map, the terminal may generate update data according to the road marking editing operation in response to the road marking editing operation, update locally stored road network data with the update data, and after updating, repeat the steps of: obtaining the track lines of a plurality of road marks in a geographic range, and then the following steps are carried out: and drawing each road marking in the geographical range in the map, and displaying the road marking in the drawn map in the map reading area, so that new rendering and drawing are completed, and the map in the map reading area is refreshed. If the road marking editing operation is an operation of deleting one or more displayed road markings, the updating data comprises the identification of the one or more road markings to be deleted; if the road marking editing operation is an operation of newly adding a road marking, the updating data comprises information of the road marking to be newly added, such as position information, track points and the like; if the road marking editing operation is to adjust the road marking, for example, to adjust the position information or length of the road marking, the update data includes the position information or length to which the road marking needs to be adjusted. The terminal can update the road network data stored in the server according to the update data, and the terminal can update the road network data stored in the server according to the update data in real time, or update the road network data stored in the server in batches by utilizing the locally cached road network data after the road marking in the map is manufactured. After the road marking in the map is manufactured, and after the road network data in the server is updated, the server can generate the upgrading data of the map according to the updated road network data, push upgrading prompt information to the terminal of the user, and send the upgrading data of the map to the terminal of the user after confirming to agree with upgrading so that the terminal of the user updates the installed map according to the upgrading data.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a map road drawing device for realizing the map road drawing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the map road mapping device provided below may refer to the limitation of the map road mapping method hereinabove, and will not be repeated herein.
In some embodiments, as shown in fig. 13, there is provided a map road drawing apparatus including: a trajectory acquisition module 1302, a trajectory stitching module 1304, a boundary information generation module 1306, an expansion point generation module 1308, an expansion point combination module 1310, and a road marking module 1312, wherein:
a trajectory line acquisition module 1302 is configured to acquire a trajectory line of a plurality of road markings in a map, each trajectory line including a plurality of trajectory points.
And the track line splicing module 1304 is used for splicing the track lines of the plurality of road marks to generate a spliced track line.
A boundary information generating module 1306, configured to generate boundary information corresponding to the spliced track line; boundary information for identifying the trace points of different trace lines from the spliced trace lines.
The expansion point generation module 1308 is configured to perform point expansion according to each track point in the spliced track line, and generate expansion points corresponding to each track point respectively for drawing.
An expansion point combination module 1310, configured to obtain a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line.
The road marking drawing module 1312 is configured to draw each road marking according to each expansion point combination.
In some embodiments, the boundary information generation module 1306 is further configured to: generating a tag value for each track point in the spliced track line; the label values of adjacent track points belonging to different track lines in the spliced track line are first label values, the label values of the rest track points in the spliced track line are second label values, and the first label values are different from the second label values; and generating boundary information corresponding to the spliced track line according to the label value of each track point in the spliced track line.
In some embodiments, the extension point combining module 1310 is further configured to: acquiring a label value of each track point in the spliced track line from the boundary information; for each track point, taking the label value of the track point as the label value of the expansion point corresponding to the track point; according to the arrangement sequence of the track points in the spliced track line, arranging the expansion points corresponding to the track points respectively to generate an expansion point sequence; acquiring a plurality of expansion point combinations from the expansion point sequence; the expansion point combination comprises at least three continuous expansion points in the expansion point sequence, and the label value of at least one expansion point in the expansion point combination is a second label value.
In some embodiments, the extension point combining module 1310 is further configured to: according to the arrangement sequence of the track points in the spliced track line, arranging the label values of the track points in the spliced track line to obtain boundary information corresponding to the spliced track line; and determining a label value consistent with the arrangement sequence of the track points from the boundary information for each track point in the spliced track line to obtain the label value of the track point.
In some embodiments, the extension point combining module 1310 is further configured to: acquiring at least three continuous expansion points from the expansion point sequence; under the condition that the obtained label value of at least one expansion point in the at least three expansion points is a second label value, forming an expansion point combination by the at least three expansion points; and returning to the step of acquiring at least three continuous expansion points from the expansion point sequence according to the sequence from front to back until the expansion point sequence is traversed, so as to obtain a plurality of expansion point combinations.
In some embodiments, the extension point combining module 1310 is further configured to: and returning to the step of acquiring the continuous at least three expansion points from the expansion point sequence according to the sequence from front to back under the condition that the acquired tag values of the at least three expansion points are all the first tag values.
In some embodiments, the trace splicing module 1304 is further configured to: determining the splicing sequence of the track lines of the plurality of road marks according to the widths of the plurality of road marks; and splicing the track lines according to the splicing sequence of the track lines to generate spliced track lines.
In some embodiments, the trajectory acquisition module 1302 is further configured to: displaying a map viewing area in a browser; the map reading area is used for displaying a map area in the map; determining a geographical range of a map area to be displayed in the map viewing area; acquiring track lines of a plurality of road marks in a geographic range; the device is also used for: and displaying the drawn road marks in the map reading area.
In some embodiments, the trajectory acquisition module 1302 is further configured to: receiving a geographic area changing operation for a map viewing area; responding to the geographic area changing operation, and updating the geographic coordinates of the reference points in the map reading area based on the geographic area changing operation to obtain updated geographic coordinates of the reference points; and determining the geographical range of the geographical area to be displayed in the map reading area according to the updated geographical coordinates of the reference points.
In some embodiments, the map is pre-divided into a plurality of unit geographic areas; the trajectory line acquisition module 1302 is further configured to: determining a unit geographic range intersected with the geographic range to obtain at least one target unit geographic range; acquiring a track line of each road marking in at least one target unit geographic range; and obtaining the track line of each road marking in the geographic range from the track line of each road marking in the geographic range of at least one target unit.
In some embodiments, the trajectory acquisition module 1302 is further configured to: determining a range overlapped with the geographic range from the target unit geographic range for each target unit geographic range to obtain an overlapped range; and acquiring the track line of each road marking in the corresponding overlapping range from the road network data of each target unit geographic range to obtain the track line of each road marking in the geographic range.
In some embodiments, the apparatus is further to: acquiring respective color values of all track points in the spliced track line; determining the color value of the expansion point generated according to the track point according to the color value of the track point; the road marking module 1312 is further configured to: determining a geometric figure formed by connecting expansion points in the expansion point combination aiming at each expansion point combination; and drawing out each road marking according to each geometric figure and the color value of each expansion point in each geometric figure.
The respective modules in the above-described map road drawing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In some embodiments, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 14. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data involved in the map road mapping method. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a map road mapping method.
In some embodiments, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 15. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a map road mapping method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 14 and 15 are merely block diagrams of portions of structures associated with aspects of the present application and are not intended to limit the computer apparatus to which aspects of the present application may be applied, and that a particular computer apparatus may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In some embodiments, a computer device is provided comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of the above-described map road mapping method.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, implements the steps of the above-described map road mapping method.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, implements the steps of the above-described map road mapping method.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random AccessMemory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (15)

1. A method of mapping a road, the method comprising:
acquiring a plurality of track lines of road markings in a map, wherein each track line comprises a plurality of track points;
splicing the track lines of the plurality of road marks to generate a spliced track line;
generating boundary information corresponding to the spliced track line; the boundary information is used for identifying track points of different track lines from the spliced track lines;
Performing point expansion according to each track point in the spliced track line, and generating expansion points which are respectively corresponding to each track point and used for drawing;
acquiring a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line;
and drawing each road marking line according to each expansion point combination.
2. The method of claim 1, wherein the generating boundary information corresponding to the spliced track line comprises:
generating a tag value for each track point in the spliced track line; the label values of the track points adjacent to each other and belonging to different track lines in the spliced track line are first label values, the label values of the rest track points in the spliced track line are second label values, and the first label values are different from the second label values;
and generating boundary information corresponding to the spliced track line according to the label value of each track point in the spliced track line.
3. The method of claim 2, wherein the obtaining a plurality of expansion point combinations from each of the expansion points based on the boundary information comprises:
Acquiring a label value of each track point in the spliced track line from the boundary information;
for each track point, taking the label value of the track point as the label value of the expansion point corresponding to the track point;
according to the arrangement sequence of the track points in the spliced track line, arranging expansion points corresponding to the track points respectively to generate an expansion point sequence;
acquiring a plurality of expansion point combinations from the expansion point sequence; the expansion point combination comprises at least three continuous expansion points in the expansion point sequence, and the label value of at least one expansion point in the expansion point combination is a second label value.
4. A method according to claim 3, wherein said obtaining a tag value for each trace point in the spliced trace line from the boundary information comprises:
according to the arrangement sequence of the track points in the spliced track line, arranging the label values of the track points in the spliced track line to obtain boundary information corresponding to the spliced track line;
and determining a label value consistent with the arrangement sequence of the track points from boundary information for each track point in the spliced track line to obtain the label value of the track point.
5. The method of claim 3, wherein the obtaining a plurality of expansion point combinations from the expansion point sequence comprises:
acquiring at least three continuous expansion points from the expansion point sequence;
under the condition that the obtained label value of at least one expansion point in the at least three expansion points is a second label value, forming an expansion point combination by the at least three expansion points;
and returning to the step of obtaining at least three continuous expansion points from the expansion point sequence until the expansion point sequence is traversed to obtain a plurality of expansion point combinations.
6. The method of claim 5, wherein the method further comprises:
and returning to the step of acquiring at least three continuous expansion points from the expansion point sequence under the condition that the acquired tag values of the at least three expansion points are all the first tag values.
7. The method of claim 1, wherein the stitching the plurality of road marking trajectories to generate a stitched trajectory comprises:
determining the splicing sequence of the track lines of the plurality of road marks according to the widths of the plurality of road marks;
And splicing the track lines according to the splicing sequence of the track lines to generate spliced track lines.
8. The method of any one of claims 1 to 7, wherein the acquiring the trajectory of the plurality of road markings in the map comprises:
displaying a map viewing area in a browser; the map reading area is used for displaying a map area in a map;
determining a geographical range of a map area to be displayed in the map viewing area;
acquiring the track lines of a plurality of road marks in the geographic range;
the method further comprises the steps of:
and displaying the drawn road marks in the map reading area.
9. The method of claim 8, wherein the determining the geographic extent of the map area to be displayed in the map viewing area comprises:
receiving a geographic area changing operation for the map viewing area;
responding to the geographic region changing operation, and updating the geographic coordinates of the reference point in the map reading region based on the geographic region changing operation to obtain updated geographic coordinates of the reference point;
and determining the geographic range of the geographic area to be displayed in the map reading area according to the updated geographic coordinates of the reference points.
10. The method of claim 8, wherein the map is pre-divided into a plurality of unit geographic areas;
the acquiring the track lines of the plurality of road marks in the geographic range comprises the following steps:
determining a unit geographic range intersected with the geographic range to obtain at least one target unit geographic range;
acquiring a track line of each road marking in the geographic range of the at least one target unit;
and acquiring the track line of each road marking in the geographic range from the track line of each road marking in the geographic range of the at least one target unit.
11. The method of claim 10, wherein the obtaining the trajectory of each road marking within the geographic area from the trajectory of each road marking within the geographic area of the at least one target unit comprises:
determining a range overlapped with the geographical range from the target unit geographical range for each target unit geographical range to obtain an overlapped range;
and obtaining the track line of each road marking in the corresponding overlapping range from the road network data of each target unit geographic range, and obtaining the track line of each road marking in the geographic range.
12. The method according to any one of claims 1 to 7, further comprising:
acquiring respective color values of all track points in the spliced track line;
determining the color value of an expansion point generated according to the track point according to the color value of the track point;
drawing each road marking according to each expansion point combination, including:
determining geometric figures formed by connecting expansion points in the expansion point combinations according to each expansion point combination;
and drawing each road marking according to each geometric figure and the color value of each expansion point in each geometric figure.
13. A map road mapping apparatus, the apparatus comprising:
the track line acquisition module is used for acquiring track lines of a plurality of road marks in the map, and each track line comprises a plurality of track points;
the track line splicing module is used for splicing the track lines of the plurality of road marks to generate spliced track lines;
the boundary information generation module is used for generating boundary information corresponding to the spliced track line; the boundary information is used for identifying track points of different track lines from the spliced track lines;
The expansion point generation module is used for carrying out point expansion according to each track point in the spliced track line, and generating expansion points which are respectively corresponding to each track point and used for drawing;
the expansion point combination module is used for acquiring a plurality of expansion point combinations from each expansion point according to the boundary information; the expansion point combination comprises at least three expansion points, and the track points corresponding to the expansion points in the expansion point combination belong to the same track line;
and the road marking drawing module is used for drawing each road marking according to each expansion point combination.
14. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 12 when the computer program is executed.
15. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 12.
CN202311388364.7A 2023-10-25 2023-10-25 Map road drawing method, device, computer equipment and storage medium Active CN117115382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311388364.7A CN117115382B (en) 2023-10-25 2023-10-25 Map road drawing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311388364.7A CN117115382B (en) 2023-10-25 2023-10-25 Map road drawing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117115382A true CN117115382A (en) 2023-11-24
CN117115382B CN117115382B (en) 2024-02-09

Family

ID=88809663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311388364.7A Active CN117115382B (en) 2023-10-25 2023-10-25 Map road drawing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117115382B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190301873A1 (en) * 2018-03-27 2019-10-03 Uber Technologies, Inc. Log trajectory estimation for globally consistent maps
CN110599570A (en) * 2019-09-17 2019-12-20 武汉中海庭数据技术有限公司 Map generation method and system based on crowdsourcing data open scene
US20200385020A1 (en) * 2019-05-17 2020-12-10 Honda Motor Co., Ltd. Vehicle control device, vehicle control method, and storage medium
CN112732860A (en) * 2021-01-26 2021-04-30 腾讯科技(深圳)有限公司 Road extraction method, device, readable storage medium and equipment
US20220058403A1 (en) * 2020-12-03 2022-02-24 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus of estimating road condition, and method and apparatus of establishing road condition estimation model
KR20220106894A (en) * 2021-01-22 2022-08-01 주식회사 드림티엔에스 Method of road symbol and text extraction
CN116080687A (en) * 2023-02-27 2023-05-09 重庆长安汽车股份有限公司 Predicted track post-processing method, system, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190301873A1 (en) * 2018-03-27 2019-10-03 Uber Technologies, Inc. Log trajectory estimation for globally consistent maps
US20200385020A1 (en) * 2019-05-17 2020-12-10 Honda Motor Co., Ltd. Vehicle control device, vehicle control method, and storage medium
CN110599570A (en) * 2019-09-17 2019-12-20 武汉中海庭数据技术有限公司 Map generation method and system based on crowdsourcing data open scene
US20220058403A1 (en) * 2020-12-03 2022-02-24 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus of estimating road condition, and method and apparatus of establishing road condition estimation model
KR20220106894A (en) * 2021-01-22 2022-08-01 주식회사 드림티엔에스 Method of road symbol and text extraction
CN112732860A (en) * 2021-01-26 2021-04-30 腾讯科技(深圳)有限公司 Road extraction method, device, readable storage medium and equipment
CN116080687A (en) * 2023-02-27 2023-05-09 重庆长安汽车股份有限公司 Predicted track post-processing method, system, equipment and medium

Also Published As

Publication number Publication date
CN117115382B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN107358649B (en) Processing method and device of terrain file
CN102117497B (en) Method and system for three-dimensional terrain modeling
US9495767B2 (en) Indexed uniform styles for stroke rendering
CN112884875A (en) Image rendering method and device, computer equipment and storage medium
US9275493B2 (en) Rendering vector maps in a geographic information system
CN110503718B (en) Three-dimensional engineering model lightweight display method
US9224233B2 (en) Blending 3D model textures by image projection
CN109544658B (en) Map rendering method and device, storage medium and electronic device
CN106611056B (en) Method and device for cutting three-dimensional simulation map
CN110910504A (en) Method and device for determining three-dimensional model of region
CN112907451A (en) Image processing method, image processing device, computer equipment and storage medium
US20160307294A1 (en) Systems and Methods for Displaying Patterns of Recurring Graphics on Digital Maps
US20180053345A1 (en) System and method for procedurally generated object distribution in regions of a three-dimensional virtual environment
CN113724331B (en) Video processing method, video processing apparatus, and non-transitory storage medium
CN114663324A (en) Fusion display method of BIM (building information modeling) model and GIS (geographic information system) information and related components
CN117115382B (en) Map road drawing method, device, computer equipment and storage medium
CN111815784A (en) Method and device for presenting reality model, electronic equipment and storage medium
US10657705B2 (en) System and method for rendering shadows for a virtual environment
WO2022100059A1 (en) Data storage management method, object rendering method, and device
CN113419806B (en) Image processing method, device, computer equipment and storage medium
CN114781140A (en) Laser radar point cloud simulation method and device and computer equipment
CN107885858A (en) Network panorama sketch labeling method
CN114429511A (en) Fusion rendering method and device, computer equipment and storage medium
US20240212282A1 (en) Image rendering method and apparatus, device, and medium
CN106875480B (en) Method for organizing urban three-dimensional data

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
GR01 Patent grant
GR01 Patent grant