CN116681843A - Map rendering method, apparatus, device, storage medium, and program product - Google Patents

Map rendering method, apparatus, device, storage medium, and program product Download PDF

Info

Publication number
CN116681843A
CN116681843A CN202310333289.8A CN202310333289A CN116681843A CN 116681843 A CN116681843 A CN 116681843A CN 202310333289 A CN202310333289 A CN 202310333289A CN 116681843 A CN116681843 A CN 116681843A
Authority
CN
China
Prior art keywords
vehicle
navigation
map
position coordinates
geographic position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310333289.8A
Other languages
Chinese (zh)
Inventor
闫云伟
章启鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202310333289.8A priority Critical patent/CN116681843A/en
Publication of CN116681843A publication Critical patent/CN116681843A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Abstract

The present disclosure relates to a map rendering method, apparatus, device, storage medium, and program product. In at least one embodiment of the disclosure, a car logo is taken as a zoom center, an electronic map is rendered in the screen, a navigation path and a navigation action point are rendered on the electronic map based on a map scale adjustment coefficient and a screen current map scale, along with the change of the position of the car, the pixel height value of the navigation action point is always fixed at a preset pixel height value, namely, a navigation guide arrow at the navigation action point is always positioned on a horizontal line of the screen where the preset pixel height value is positioned, the navigation guide arrow always moves back and forth on the horizontal line, the sight of a driver only needs to observe the navigation guide arrow on the horizontal line, and the navigation guide arrow is not required to be searched in the whole screen, so that the driver is convenient to observe the navigation guide arrow, clear steering prompts are given to the driver, and user experience is improved.

Description

Map rendering method, apparatus, device, storage medium, and program product
Technical Field
The embodiment of the disclosure relates to the technical field of map rendering, in particular to a map rendering method, a map rendering device, map rendering equipment, a storage medium and a program product.
Background
In order to ensure safe running of the vehicle, in the process of traveling by using application software with map navigation function, in the area where the user has branches on roads such as intersections or main and auxiliary roads, the application software needs to give clear navigation guidance prompts to the driver, the navigation guidance prompts comprise voice guidance prompts and picture guidance prompts, the picture guidance prompts are that navigation guidance information is displayed on a navigation path or in a guidance information display area of a navigation interface, for example, navigation guidance arrows are displayed at navigation action points (namely, vehicle steering action points) on the navigation path so as to prompt the driver to select correct running directions, such as left turn, right turn, straight run, left front, right front, left rear, right rear, head drop and the like.
At present, a vehicle position is usually displayed at a fixed position of a navigation interface, but in order to make map navigation information displayed by the navigation interface have no defect, the scale of an electronic map in the navigation interface can be dynamically adjusted along with the change of the vehicle position, and when the scale of the electronic map changes, the position of a navigation action point of the navigation path displayed on the electronic map in the navigation interface also changes, which can lead to a driver to need to search for a navigation guiding arrow in the navigation interface, and influence user experience.
Disclosure of Invention
At least one embodiment of the present disclosure provides a map rendering method, apparatus, device, storage medium, and program product.
In a first aspect, an embodiment of the present disclosure proposes a map rendering method, where the method is applied to a process that a vehicle travels along a pre-planned navigation path, the method includes:
acquiring geographic position coordinates of a vehicle and geographic position coordinates of a navigation action point positioned in front of the vehicle on a navigation path;
determining geographic position coordinates of two feature points based on geographic position coordinates of a vehicle, pixel coordinates corresponding to a logo displayed in a screen, a preset pixel height value for determining the feature points and a screen map display range;
determining map scale adjustment coefficients based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action points and the geographic position coordinates of the two feature points;
and taking the car logo as a zoom center, rendering an electronic map in the screen and rendering a navigation path and a navigation action point on the electronic map based on the map scale adjustment coefficient and the current map scale of the screen.
In a second aspect, an embodiment of the present disclosure further proposes a map rendering device, where the device is applied to a process that a vehicle travels along a pre-planned navigation path, and the device includes:
The acquisition unit is used for acquiring the geographic position coordinates of the vehicle and the geographic position coordinates of a navigation action point positioned in front of the vehicle on the navigation path;
a first determining unit, configured to determine geographic position coordinates of two feature points based on geographic position coordinates of a vehicle, pixel coordinates corresponding to a logo displayed in a screen, a preset pixel height value for determining the feature points, and a screen map display range;
a second determining unit for determining map scale adjustment coefficients based on the geographical position coordinates of the vehicle, the geographical position coordinates of the navigation action point, and the geographical position coordinates of the two feature points;
and the rendering unit is used for rendering the electronic map in the screen and rendering the navigation path and the navigation action point on the electronic map based on the map scale adjustment coefficient and the current map scale of the screen by taking the car logo as a zoom center.
In a third aspect, an embodiment of the present disclosure further proposes an electronic device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the map rendering method according to the first aspect.
In a fourth aspect, the disclosed embodiments also propose a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of the map rendering method according to the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product, wherein the computer program product comprises a computer program stored in a computer-readable storage medium, from which at least one processor of a computer reads and executes the computer program, causing the computer to perform the steps of the map rendering method according to the first aspect.
It can be seen that, in at least one embodiment of the present disclosure, after obtaining the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point located in front of the vehicle on the navigation path, the map scale adjustment coefficient may be determined by determining the two feature points and the geographic position coordinates of the two feature points in the screen map display range based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point, and the geographic position coordinates of the two feature points; and the vehicle logo is used as a zoom center, an electronic map is rendered in the screen, a navigation path and a navigation action point are rendered on the electronic map based on a map scale adjustment coefficient and a screen current map scale, along with the change of the vehicle position, the pixel height value of the navigation action point is always fixed at a preset pixel height value, namely, a navigation guide arrow at the navigation action point is always positioned on a horizontal line of the screen where the preset pixel height value is positioned, the navigation guide arrow always moves back and forth on the horizontal line, and the sight of a driver only needs to observe the navigation guide arrow on the horizontal line without searching the navigation guide arrow in the whole screen, so that the navigation guide arrow is convenient to observe by the driver, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings to those of ordinary skill in the art.
Fig. 1 is a flow chart of a map rendering method according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of an on-screen navigation interface coordinate system according to an embodiment of the present disclosure;
FIG. 3 is a schematic flowchart of determining geographic location coordinates of feature points according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of determining map scale adjustment coefficients according to an embodiment of the present disclosure;
fig. 5 is an application scenario schematic diagram of a navigation interface provided in an embodiment of the present disclosure;
FIG. 6 is a schematic view of an application scenario of the navigation interface obtained after map refreshing based on FIG. 5;
fig. 7 is a schematic diagram of a map rendering device according to an embodiment of the disclosure;
fig. 8 is an exemplary block diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
In order that the above-recited objects, features and advantages of the present disclosure may be more clearly understood, a more particular description of the disclosure will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It is to be understood that the described embodiments are some, but not all, of the embodiments of the present disclosure. The specific embodiments described herein are to be considered in an illustrative rather than a restrictive sense. All other embodiments derived by a person of ordinary skill in the art based on the described embodiments of the present disclosure fall within the scope of the present disclosure.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
At present, the scale of the electronic map displayed on the navigation interface can be dynamically adjusted along with the change of the position of the vehicle, so that the vehicle is kept at the fixed position of the navigation interface, and because the navigation path is rendered on the electronic map, when the scale of the electronic map is changed, the position of the navigation action point of the navigation path displayed on the electronic map in the navigation interface is also changed, and the vehicle is displayed at the fixed position of the navigation interface, the longitudinal distance between the navigation action point and the vehicle in the navigation interface is always changed, so that a driver needs to search for a navigation guiding arrow in the navigation interface, the driver is inconvenient to observe the navigation guiding arrow, and the user experience is affected.
In order to facilitate a driver to observe a navigation guidance arrow in a navigation interface, the embodiments of the present disclosure provide a map rendering method, apparatus, device, or storage medium, after obtaining a geographic position coordinate of a vehicle and a geographic position coordinate of a navigation action point located in front of the vehicle on a navigation path, determining two feature points and geographic position coordinates of the two feature points in a screen map display range, and determining a map scale adjustment coefficient based on the geographic position coordinate of the vehicle, the geographic position coordinates of the navigation action point, and the geographic position coordinates of the two feature points; and the vehicle logo is used as a zoom center, an electronic map is rendered in the screen, a navigation path and a navigation action point are rendered on the electronic map based on a map scale adjustment coefficient and a screen current map scale, along with the change of the vehicle position, the pixel height value of the navigation action point is always fixed at a preset pixel height value, namely, a navigation guide arrow at the navigation action point is always positioned on a horizontal line of the screen where the preset pixel height value is positioned, the navigation guide arrow always moves back and forth on the horizontal line, and the sight of a driver only needs to observe the navigation guide arrow on the horizontal line without searching the navigation guide arrow in the whole screen, so that the navigation guide arrow is convenient to observe by the driver, and the user experience is improved.
Fig. 1 is a schematic flow chart of a map rendering method provided by an embodiment of the present disclosure, where an execution main body of the map rendering method is an electronic device, and the electronic device includes, but is not limited to, a vehicle-mounted device, a smart phone, a palm computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an integrated machine, an intelligent home device, a server, and the like, where the server may be an independent server, or a cluster of multiple servers, or may include a server built locally and a server erected at a cloud.
As shown in fig. 1, the map rendering method is applied to a process that a vehicle travels along a pre-planned navigation path, and the method may include, but is not limited to, steps 101 to 104:
in step 101, the geographic position coordinates of the vehicle and the geographic position coordinates of a navigation action point located in front of the vehicle on the navigation path are acquired.
During the running process of the vehicle, the geographic position coordinates, namely longitude and latitude coordinates, of the vehicle can be obtained through a positioning system installed on the vehicle, wherein the positioning system is a GPS system (Global Positioning System, GPS), a Beidou system and the like. In the running process of the vehicle, a navigation interface can be displayed on a screen of the vehicle-mounted display screen, and an electronic map and a navigation path on the electronic map are displayed in the navigation interface, so that a driver can intuitively know the current position of the vehicle, wherein the navigation path is a path obtained by planning the path based on the departure place and the destination of the vehicle.
At least one navigation action point exists on a navigation path in a region where a road such as an intersection or a main/auxiliary road entrance/exit is branched, the navigation action point can be understood as a road branching point, and navigation application software needs to explicitly give a navigation guidance prompt to a driver, for example, a navigation guidance arrow is displayed at the navigation action point on the navigation path to prompt the driver to select a correct driving direction, for example, left turn, right turn, straight, left front, right front, left rear, right rear, head drop, and the like. After the navigation path is obtained by path planning based on the departure place and the destination of the vehicle, each navigation action point included in the navigation path and the geographic position coordinate of each navigation action point can be determined.
It should be noted that, since there may be a plurality of navigation action points on the navigation path, the navigation action points mentioned in the embodiments are all the closest navigation action points to the vehicle in the vehicle driving direction.
In step 102, geographic location coordinates of two feature points are determined based on geographic location coordinates of the vehicle, pixel coordinates corresponding to the emblem displayed in the screen, a preset pixel height value for determining the feature points, and a screen map display range.
Because the vehicles are displayed at the fixed positions of the navigation interfaces, and the screen sizes of the vehicle-mounted display screens of different vehicles are not completely the same, so that the navigation interfaces of different vehicles are different in size, namely, the screen map display ranges are different, the fixed display positions of the vehicle marks of the vehicles in the screen are required to be determined in advance, after the fixed display positions are determined, the pixel coordinates corresponding to the vehicle marks displayed in the screen can be further determined, in order to facilitate the use of the pixel coordinates corresponding to the vehicle marks, the pixel coordinates can be stored in a local or cloud, and the pixel coordinates can be directly obtained from the local or cloud whenever the pixel coordinates are required to be used.
In view of the fact that in the prior art, the car logo is kept at a fixed display position in the screen, in order to enable map navigation information displayed on the navigation interface to be sufficiently free of defects, the scale of the electronic map in the navigation interface can be dynamically adjusted along with the change of the position of the car, and because the navigation path is rendered on the electronic map, when the scale of the electronic map changes, the position of a navigation action point of the navigation path displayed on the electronic map in the navigation interface also changes, a driver needs to search for a navigation guiding arrow in the navigation interface, and the driver cannot observe the navigation guiding arrow conveniently. In order to facilitate the driver to observe the navigation guidance arrow in the navigation interface, the embodiment proposes to always fix the pixel height value of the navigation action point on the navigation path in the screen at the preset pixel height value, that is, the navigation guidance arrow at the navigation action point is always located on the horizontal line where the preset pixel height value is located in the screen, the navigation guidance arrow always moves back and forth on the horizontal line, the sight of the driver only needs to observe the navigation guidance arrow on the horizontal line, and the driver does not need to find the navigation guidance arrow in the whole screen, so that the driver is facilitated to observe the navigation guidance arrow, the driver is given explicit steering prompt, and the user experience is improved.
In consideration of the fact that the sizes of the electronic maps displayed in different screens are different, after the geographic position coordinates of the vehicle are obtained, the geographic coordinates of two feature points can be determined by combining the geographic position coordinates of the vehicle, the pixel coordinates corresponding to the vehicle marks displayed in the screen and the preset pixel height values for determining the feature points, and the two feature points are used for determining map scale adjustment coefficients. In order to facilitate the determination of the geographic coordinates of the two feature points, the pixel coordinates corresponding to the vehicle logo displayed in the screen and the preset pixel height value for determining the feature points can be stored in the local or cloud in advance, and the pixel coordinates corresponding to the vehicle logo and the preset pixel height value can be directly obtained from the local or cloud whenever the pixel coordinates corresponding to the vehicle logo and the preset pixel height value are needed. In some embodiments, the preset pixel height value used for determining the feature point is a user configurable parameter, so that the driver configures the preset pixel height value according to own driving habit, so that the navigation action point is fixed at the preset pixel height value, and the driver can observe the navigation guiding arrow at the navigation leading point more conveniently, and can clearly turn to prompt the driver.
In step 103, map scale adjustment coefficients are determined based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point, and the geographic position coordinates of the two feature points.
In order to fix the navigation action point on the navigation path at the preset pixel height value, a map scale adjustment coefficient needs to be determined so as to adjust the map scale based on the map scale adjustment coefficient, and the electronic map is zoomed, and meanwhile, the navigation action point is fixed at the preset pixel height value, and the longitudinal distance between the navigation action point and the car logo is fixed as the pixel coordinates corresponding to the car logo displayed in the screen are fixed, so that the longitudinal distance between the navigation guide arrow at the navigation action point and the car logo is fixed, and the driver can observe the navigation guide arrow conveniently. In this embodiment, the map scale adjustment coefficient is calculated based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point, and the geographic position coordinates of the two feature points.
For example, fig. 2 is a schematic diagram of a navigation interface coordinate system in a screen, in the navigation interface coordinate system shown in fig. 2, a horizontal axis of the navigation coordinate system is an X axis, a vertical axis is a Y axis, and a coordinate origin is in an upper left corner of the navigation interface. In fig. 2, the preset pixel height value for determining the feature point is y 0 A and B are values y based on a preset pixel height 0 Two feature points are determined, and the coordinates of the point A are (0, y 0 ) The method comprises the steps of carrying out a first treatment on the surface of the B is a point on the horizontal line where A is located in the navigation interface, for example, B is the right boundary point of the navigation interface; the navigation action point on the navigation path of the vehicle is C; the position of the logo displayed in the screen is D. Therefore, the intersection point P between the connecting line CD between the navigation action point C and the logo position D and the connecting line AB between the two feature points can be determined, and then the ratio of DP to DC in the geographic coordinate system (i.e., DP/DC) is used as the map scale adjustment coefficient.
In step 104, the car logo is used as a zoom center, and based on the map scale adjustment coefficient and the current map scale of the screen, an electronic map is rendered in the screen, and a navigation path and a navigation action point are rendered on the electronic map.
In this embodiment, a target map scale corresponding to a map scale adjustment coefficient may be determined based on a preset correspondence, where the preset correspondence is a correspondence between a map scale and a map scale, and since the map scale is a ratio of a length of a line segment on a map to a length of a corresponding line segment on the ground projected horizontally, and the map scale is a ratio of lengths of two field line segments, the correspondence between the map scale and the map scale may be obtained through mathematical conversion, which is a correspondence that may be understood and implemented by those skilled in the art, and is not described herein.
In this embodiment, after determining a target map scale corresponding to a map scale adjustment coefficient, updating a current map scale of a screen to the target map scale, and scaling an electronic map with a vehicle logo as a scaling center by using the target map scale until a pixel height value of a navigation action point of the vehicle is at a preset pixel height value.
As can be seen, in this embodiment, after obtaining the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point located in front of the vehicle on the navigation path, the map scale adjustment coefficient may be determined by determining two feature points and the geographic position coordinates of the two feature points in the screen map display range based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point and the geographic position coordinates of the two feature points; and the vehicle logo is used as a zoom center, an electronic map is rendered in the screen, a navigation path and a navigation action point are rendered on the electronic map based on a map scale adjustment coefficient and a screen current map scale, along with the change of the vehicle position, the pixel height value of the navigation action point is always fixed at a preset pixel height value, namely, a navigation guide arrow at the navigation action point is always positioned on a horizontal line of the screen where the preset pixel height value is positioned, the navigation guide arrow always moves back and forth on the horizontal line, and the sight of a driver only needs to observe the navigation guide arrow on the horizontal line without searching the navigation guide arrow in the whole screen, so that the navigation guide arrow is convenient to observe by the driver, and the user experience is improved.
Based on the above embodiment, step 102 in fig. 1: one embodiment of determining the geographical position coordinates of two feature points based on the geographical position coordinates of the vehicle, the pixel coordinates corresponding to the emblem displayed in the screen, the preset pixel height value for determining the feature points, and the screen map display range is shown in steps 301 to 303 of fig. 3:
in step 301, a first feature point is determined on the left boundary and a second feature point is determined on the right boundary of the screen map display range based on the preset pixel height value for determining the feature point.
For example, in the navigation interface coordinate system shown in fig. 2, the horizontal axis of the navigation coordinate system is the X-axis, the vertical axis is the Y-axis, and the origin of coordinates is in the upper left corner of the navigation interface. In fig. 2, a first feature point a is determined on the left boundary of the screen map display range, and the coordinates of the point a are (0, y 0 ),y 0 The pixel height value is preset; the second feature point B is determined on the right boundary of the screen map display range.
In this embodiment, the line between the first feature point and the second feature point is parallel to the transverse axis of the navigation interface coordinate system. For example, in the navigation interface coordinate system shown in fig. 2, the horizontal axis of the navigation coordinate system is the X-axis, the vertical axis is the Y-axis, and the origin of coordinates is in the upper left corner of the navigation interface. In fig. 2, a line AB between the first feature point a and the second feature point B is parallel to a horizontal axis (i.e., X-axis) of the navigation coordinate system.
In step 302, a first relative distance and a first relative orientation between the first feature point and the emblem, and a second relative distance and a second relative orientation between the second feature point and the emblem are determined based on the pixel coordinates corresponding to the emblem, the pixel coordinates corresponding to the first feature point, and the pixel coordinates corresponding to the second feature point displayed in the screen.
For example, in the navigation interface coordinate system shown in fig. 2, a first relative distance (i.e., a length of a line between a and D) between the vehicle logo position D and the first feature point a in the navigation interface coordinate system may be determined, and the first relative position is a direction pointing from D to a. In addition, a second relative distance (i.e., a length of a line connecting the B and the D) between the landmark position D and the second feature point B in the navigation interface coordinate system may be determined, and the second relative position is a direction pointing from the D to the B.
In step 303, determining geographic location coordinates of the first feature point based on the first relative distance and the first relative position and geographic location coordinates of the vehicle; the geographic location coordinates of the second feature point are determined based on the second relative distance and the second relative position and the geographic location coordinates of the vehicle.
In this embodiment, since the current map scale of the screen is the ratio of the length of the line segment on the electronic map currently displayed by the navigation interface to the length of the corresponding line segment on the spot projected horizontally, the map scale is based on the pixel coordinates (0, y) corresponding to the position of the logo (e.g., D in fig. 2) and the pixel coordinates (0, y) of the first feature point (e.g., a point in fig. 2) 0 ) The first relative distance (for example, the first relative distance in fig. 2, that is, the length of the connecting line between a and D) and the current map scale of the screen in the navigation interface coordinate system can be calculated to obtain the relative distance between the logo position (for example, D in fig. 2) and the first feature point (for example, the point a in fig. 2) in the geographic coordinate system, that is, the relative distance in the real world. In combination with the geographic location coordinates of the vehicle in the geographic coordinate system and the first relative orientation (pointing from D to the direction of a) between the logo location (e.g., D in fig. 2) and the first feature point (e.g., point a in fig. 2), the geography of the first feature point (e.g., point a in fig. 2) in the geographic coordinate system can be determinedAnd (5) position coordinates.
Similarly, based on the second relative distance (for example, the second relative distance in fig. 2, that is, the length of the connecting line between B and D) of the pixel coordinates of the second feature point (for example, the point B in fig. 2) in the navigation interface coordinate system and the current map scale of the screen, the relative distance between the vehicle logo position (for example, the point D in fig. 2) and the second feature point (for example, the point B in fig. 2) in the geographic coordinate system, that is, the relative distance in the real world, can be calculated. In combination with the geographic location coordinates of the vehicle in the geographic coordinate system and the second relative orientation (pointing from D in the direction of B) between the logo location (e.g., D in fig. 2) and the second feature point (e.g., B in fig. 2), the geographic location coordinates of the second feature point (e.g., B in fig. 2) in the geographic coordinate system can be determined.
It should be noted that, other existing conversion manners of pixel coordinates and geographic coordinates may be used to determine geographic position coordinates of the first feature point (e.g., point a in fig. 2) and the second feature point (e.g., point B in fig. 2) in the geographic coordinate system, which will not be described herein.
Based on the above embodiment, step 103 in fig. 1: one embodiment of determining map scale adjustment coefficients based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point, and the geographic position coordinates of the two feature points is as shown in steps 401 and 402 of fig. 4:
in step 401, the geographic position coordinates of the intersection point of the first link and the second link are determined based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point and the geographic position coordinates of the two feature points, wherein the first link is a link between the two feature points, and the second link is a link between the vehicle and the navigation action point.
For example, in the navigation interface coordinate system shown in fig. 2, a connection line AB between the first feature point a and the second feature point B is a first connection line, and a connection line CD between the navigation action point C and the logo position D on the navigation path of the vehicle is a second connection line, so that an intersection point of the first connection line AB and the second connection line CD is P. Based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point C, the geographic position coordinates of the first feature point a, and the geographic position coordinates of the second feature point B, the geographic position coordinates of the intersection point P of the first link AB and the second link CD may be calculated in the geographic coordinate system.
In some embodiments, if the navigation action point C is located below the first connection line AB, the intersection point P is an intersection point of extension lines of the first connection line AB and the second connection line DC.
In step 402, map scale adjustment coefficients are determined based on the geographic position coordinates of the vehicle, the geographic position coordinates of the intersection, and the geographic position coordinates of the navigation action point.
For example, in the navigation interface coordinate system shown in fig. 2, based on the geographic position coordinates of the vehicle (i.e., the geographic position coordinates of the logo position D in the screen) and the geographic position coordinates of the intersection point P, a first distance between the vehicle and the intersection point P in the geographic coordinate system may be determined, denoted as DP, where the first distance DP is a real distance in the geographic coordinate system but is not a distance in the navigation interface coordinate system; in addition, based on the geographic position coordinates of the logo position D and the geographic position coordinates of the navigation action point C, a second distance between the vehicle and the navigation action point C in the geographic coordinate system may be determined and denoted as DC, where the second distance DC is a real distance in the geographic coordinate system but not a distance in the navigation interface coordinate system. Thus, the ratio between the first distance DP and the second distance DC (i.e., DP/DC) is taken as a map scale adjustment factor.
Based on the above embodiment, step 104 in fig. 1: the map rendering method shown in fig. 1 further includes the step of updating the map scale after the electronic map is rendered in the screen and the navigation path and the navigation action point are rendered on the electronic map based on the map scale adjustment coefficient and the current map scale of the screen by taking the car logo as the zoom center, specifically as follows:
determining a target map scale corresponding to the map scaling based on a preset corresponding relation, wherein the preset corresponding relation is the corresponding relation between the map scaling and the map scale; and updating the current map scale of the screen to the target map scale.
After the map scale is updated, the updated map scale is used the next time the map scale is needed for the map rendering method embodiment shown in fig. 1 or a related embodiment.
Based on the above embodiment, step 101 in fig. 1: the acquisition timing of the "acquisition of the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point located in front of the vehicle on the navigation path" is as follows:
and each time map refreshing is carried out, the geographic position coordinates of the vehicle and the geographic position coordinates of a navigation action point positioned in front of the vehicle on the navigation path are obtained.
Typically, in the navigation process, 10 to 60 map refreshes are performed every second, and each time the map refreshes are performed, the geographical position coordinates of the vehicle and the geographical position coordinates of the navigation action point located in front of the vehicle on the navigation path are acquired. Each time the map refreshing is performed, the map rendering method shown in fig. 1 is triggered, that is, after the geographical position coordinates of the vehicle and the geographical position coordinates of the navigation action points are obtained each time, the map scale adjustment coefficient is determined, the vehicle mark is taken as a zoom center, and the electronic map is rendered in the screen and the navigation path and the navigation action points are rendered on the electronic map based on the map scale adjustment coefficient and the current map scale of the screen.
For example, fig. 5 is an application scenario schematic diagram of a navigation interface provided by an embodiment of the present disclosure, in fig. 5, a dotted line corresponds to an AB line segment in fig. 2, and a navigation action point C in fig. 2 is fixed on the dotted line. Fig. 5 shows an effect diagram after the foregoing map rendering method embodiment is processed, and it can be seen that the navigation guiding arrow is located on the dashed line, and the vehicle is fixedly displayed at the preset display position of the navigation interface, corresponding to the point D in fig. 2.
After the map refreshing is performed once in the application scene of the navigation interface shown in fig. 5, the map rendering method embodiment shown in fig. 1 is performed to obtain the application scene of the navigation interface shown in fig. 6, the position of a dotted line in fig. 6 is the same as that of the dotted line in fig. 5, the electronic map is enlarged based on the map scale adjustment coefficient and the current map scale of the screen, after the electronic map is re-rendered, the navigation action point is still fixed on the dotted line, and the vehicle is fixedly displayed at the preset display position of the navigation interface and corresponds to the point D in fig. 2, so that the longitudinal distance between the navigation action point and the vehicle is always kept unchanged, the sight of the driver only needs to observe the navigation guide arrow on the dotted line, and the navigation guide arrow is not required to be found in the whole navigation interface, so that the driver is convenient to observe the navigation guide arrow, and clear steering prompt is given to the driver, and user experience is prompted.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but those skilled in the art can appreciate that the disclosed embodiments are not limited by the order of actions described, as some steps may occur in other orders or concurrently in accordance with the disclosed embodiments. In addition, those skilled in the art will appreciate that the embodiments described in the specification are all alternatives.
Fig. 7 is a schematic diagram of a map rendering device provided by an embodiment of the present disclosure, where the map rendering device may be applied to an electronic device, and the electronic device includes, but is not limited to, a vehicle-mounted device, a smart phone, a palm computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an integrated machine, an intelligent home device, a server, and the like, where the server may be an independent server, or a cluster of multiple servers, or may include a server built locally and a server erected at a cloud. The map rendering device provided by the embodiments of the present disclosure may execute the processing flow provided by each embodiment of the map rendering method, as shown in fig. 7, where the map rendering device includes, but is not limited to: an acquisition unit 71, a first determination unit 72, a second determination unit 73, and a rendering unit 74. The functions of each unit are described as follows:
An acquisition unit 71 for acquiring geographic position coordinates of a vehicle and geographic position coordinates of a navigation action point located in front of the vehicle on a navigation path;
a first determining unit 72 for determining geographic position coordinates of two feature points based on geographic position coordinates of the vehicle, pixel coordinates corresponding to the emblem displayed in the screen, a preset pixel height value for determining the feature points, and a screen map display range;
a second determining unit 73 for determining map scale adjustment coefficients based on the geographical position coordinates of the vehicle, the geographical position coordinates of the navigation action point, and the geographical position coordinates of the two feature points;
and a rendering unit 74 for rendering the electronic map in the screen and the navigation path and the navigation action point on the electronic map based on the map scale adjustment coefficient and the current map scale of the screen with the car logo as the zoom center.
In some embodiments, the first determining unit 72 is configured to:
determining a first feature point on a left boundary and a second feature point on a right boundary of a display range of the screen map based on a preset pixel height value for determining the feature point;
determining a first relative distance and a first relative azimuth between the first feature point and the car logo, and a second relative distance and a second relative azimuth between the second feature point and the car logo based on pixel coordinates corresponding to the car logo, pixel coordinates corresponding to the first feature point and pixel coordinates corresponding to the second feature point displayed in the screen;
Determining geographic location coordinates of the first feature point based on the first relative distance and the first relative position and the geographic location coordinates of the vehicle; the geographic location coordinates of the second feature point are determined based on the second relative distance and the second relative position and the geographic location coordinates of the vehicle.
In some embodiments, the second determining unit 73 is configured to:
determining the geographic position coordinates of an intersection point of a first connecting line and a second connecting line based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point and the geographic position coordinates of the two feature points, wherein the first connecting line is a connecting line between the two feature points, and the second connecting line is a connecting line between the vehicle and the navigation action point;
the map scale adjustment coefficient is determined based on the geographic position coordinates of the vehicle, the geographic position coordinates of the intersection point, and the geographic position coordinates of the navigation action point.
In some embodiments, the second determining unit 73 determines map scale adjustment coefficients based on the geographic position coordinates of the vehicle, the geographic position coordinates of the intersection point, and the geographic position coordinates of the navigation action point, including:
determining a first distance between the vehicle and the intersection under a geographic coordinate system based on the geographic position coordinates of the vehicle and the geographic position coordinates of the intersection;
Determining a second distance between the vehicle and the navigation action point under a geographic coordinate system based on the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point;
the ratio between the first distance and the second distance is used as a map scale adjustment coefficient.
In some embodiments, the map rendering apparatus further comprises an updating unit for:
determining a target map scale corresponding to the map scale adjustment coefficient based on a preset corresponding relation, wherein the preset corresponding relation is the corresponding relation between the map scale adjustment coefficient and the map scale;
and updating the current map scale of the screen to the target map scale.
In some embodiments, the obtaining unit 71 is configured to obtain, each time a map is refreshed, a geographical position coordinate of the vehicle and a geographical position coordinate of a navigation action point located in front of the vehicle on the navigation path. A first determining unit 72, configured to determine the geographic position coordinates of two feature points after the acquiring unit 71 acquires the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point each time; a second determining unit 72, configured to determine map scale adjustment coefficients after the acquiring unit 71 acquires the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point each time; and a rendering unit 74 for rendering the electronic map in the screen and the navigation path and the navigation action point on the electronic map based on the map scale adjustment coefficient and the screen current map scale with the vehicle logo as the zoom center after the map scale adjustment coefficient is determined by the second determining unit 72.
As can be seen, in at least one embodiment of the map rendering device of the present disclosure, after obtaining the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action points located in front of the vehicle on the navigation path, the map scale adjustment coefficient may be determined by determining the two feature points and the geographic position coordinates of the two feature points in the screen map display range based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action points, and the geographic position coordinates of the two feature points; and the vehicle logo is used as a zoom center, an electronic map is rendered in the screen, a navigation path and a navigation action point are rendered on the electronic map based on a map scale adjustment coefficient and a screen current map scale, along with the change of the vehicle position, the pixel height value of the navigation action point is always fixed at a preset pixel height value, namely, a navigation guide arrow at the navigation action point is always positioned on a horizontal line of the screen where the preset pixel height value is positioned, the navigation guide arrow always moves back and forth on the horizontal line, and the sight of a driver only needs to observe the navigation guide arrow on the horizontal line without searching the navigation guide arrow in the whole screen, so that the navigation guide arrow is convenient to observe by the driver, and the user experience is improved.
Fig. 8 is an exemplary block diagram of an electronic device provided by an embodiment of the present disclosure. As shown in fig. 8, the electronic device includes: a memory 801, a processor 802, and a computer program stored on the memory 801. It is to be understood that the memory 801 in this embodiment may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
In some implementations, the memory 801 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.
The operating system includes various system programs, such as a framework layer, a core library layer, a driving layer, and the like, and is used for realizing various basic tasks and processing hardware-based tasks. Applications, including various applications such as Media players (Media players), browsers (browses), etc., are used to implement various application tasks. A program implementing the map rendering method provided by the embodiment of the present disclosure may be included in an application program.
In the embodiments of the present disclosure, the at least one processor 802 is configured to execute the steps of the embodiments of the map rendering method provided in the embodiments of the present disclosure by calling a program or an instruction stored in the at least one memory 801, specifically, a program or an instruction stored in an application program.
The map rendering method provided by the embodiment of the present disclosure may be applied to the processor 802 or implemented by the processor 802. The processor 802 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the methods described above may be performed by integrated logic circuitry in hardware or instructions in software in the processor 802. The processor 802 described above may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of the map rendering method provided in the embodiments of the present disclosure may be directly embodied and executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 801 and the processor 802 reads the information in the memory 801 and performs the steps of the method in combination with its hardware.
The embodiments of the present disclosure further provide a computer-readable storage medium storing a program or instructions that cause a computer to perform steps such as the embodiments of the map rendering method, and for avoiding repetition of the description, the description will not be repeated here. Wherein the computer readable storage medium may be a non-transitory computer readable storage medium.
The disclosed embodiments also provide a computer program product comprising a computer program stored in a computer readable storage medium, which may be a non-transitory computer readable storage medium. At least one processor of the computer reads and executes the computer program from the computer-readable storage medium, so that the computer performs steps such as the map rendering method embodiments, which are not described herein again for avoiding repetition of the description.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
Those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the disclosure and form different embodiments.
Those skilled in the art will appreciate that the descriptions of the various embodiments are each focused on, and that portions of one embodiment that are not described in detail may be referred to as related descriptions of other embodiments.
Although embodiments of the present disclosure have been described with reference to the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A map rendering method, wherein the method is applied to a process of a vehicle traveling along a pre-planned navigation path, the method comprising:
acquiring geographic position coordinates of a vehicle and geographic position coordinates of a navigation action point positioned in front of the vehicle on the navigation path;
determining geographic position coordinates of two feature points based on the geographic position coordinates of the vehicle, pixel coordinates corresponding to the vehicle logo displayed in the screen, a preset pixel height value for determining the feature points and a screen map display range;
Determining map scale adjustment coefficients based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action points and the geographic position coordinates of the two feature points;
and taking the car logo as a zoom center, rendering an electronic map in a screen based on the map scale adjustment coefficient and the current map scale of the screen, and rendering the navigation path and the navigation action point on the electronic map.
2. The method of claim 1, wherein the determining the geographic location coordinates of the two feature points based on the geographic location coordinates of the vehicle, the pixel coordinates corresponding to the emblem displayed in the screen, the preset pixel height value for determining the feature points, and the screen map display range comprises:
determining a first feature point on a left boundary and a second feature point on a right boundary of a screen map display range based on the preset pixel height value for determining the feature point;
determining a first relative distance and a first relative azimuth between the first feature point and the logo, and a second relative distance and a second relative azimuth between the second feature point and the logo based on pixel coordinates corresponding to the logo, pixel coordinates corresponding to the first feature point and pixel coordinates corresponding to the second feature point displayed in the screen;
Determining geographic location coordinates of the first feature point based on the first relative distance and first relative position and geographic location coordinates of the vehicle;
determining geographic location coordinates of the second feature point based on the second relative distance and second relative position and geographic location coordinates of the vehicle.
3. The method of claim 1, wherein the determining map scale adjustment coefficients based on the geographic location coordinates of the vehicle, the geographic location coordinates of the navigational action point and the geographic location coordinates of the two feature points comprises:
determining geographic position coordinates of an intersection point of a first connecting line and a second connecting line based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point and the geographic position coordinates of the two feature points, wherein the first connecting line is a connecting line between the two feature points, and the second connecting line is a connecting line between the vehicle and the navigation action point;
and determining map scale adjustment coefficients based on the geographic position coordinates of the vehicle, the geographic position coordinates of the intersection point and the geographic position coordinates of the navigation action point.
4. The method of claim 3, wherein the determining map scale adjustment coefficients based on the geographic location coordinates of the vehicle, the geographic location coordinates of the intersection, and the geographic location coordinates of the navigational action point comprises:
determining a first distance between the vehicle and the intersection under a geographic coordinate system based on the geographic position coordinates of the vehicle and the geographic position coordinates of the intersection;
determining a second distance between the vehicle and the navigation action point under a geographic coordinate system based on the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action point;
and taking the ratio between the first distance and the second distance as a map scale adjustment coefficient.
5. The method of any of claims 1-4, wherein the method further comprises:
determining a target map scale corresponding to the map scale adjustment coefficient based on a preset corresponding relation, wherein the preset corresponding relation is the corresponding relation between the map scale adjustment coefficient and the map scale;
and updating the current map scale of the screen to the target map scale.
6. The method of any of claims 1-4, wherein the obtaining the geographic location coordinates of the vehicle and the geographic location coordinates of a navigation action point located in front of the vehicle on the navigation path comprises:
And when the map refreshing is carried out each time, the geographic position coordinates of the vehicle and the geographic position coordinates of the navigation action points positioned in front of the vehicle on the navigation path are obtained.
7. A map rendering device, wherein the device is applied to a process of a vehicle traveling along a pre-planned navigation path, the device comprising:
the acquisition unit is used for acquiring geographic position coordinates of a vehicle and geographic position coordinates of a navigation action point positioned in front of the vehicle on the navigation path;
a first determining unit, configured to determine geographic position coordinates of two feature points based on geographic position coordinates of the vehicle, pixel coordinates corresponding to the vehicle logo displayed in the screen, a preset pixel height value for determining the feature points, and a screen map display range;
a second determining unit, configured to determine a map scale adjustment coefficient based on the geographic position coordinates of the vehicle, the geographic position coordinates of the navigation action point, and the geographic position coordinates of the two feature points;
and the rendering unit is used for taking the car logo as a zoom center, rendering an electronic map in the screen and rendering the navigation path and the navigation action point on the electronic map based on the map scale adjustment coefficient and the current map scale of the screen.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the map rendering method of any one of claims 1 to 6.
9. A computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the map rendering method according to any one of claims 1 to 6.
10. A computer program product, wherein the computer program product comprises a computer program stored in a computer readable storage medium, from which at least one processor of a computer reads and executes the computer program, such that the computer performs the steps of the map rendering method according to any one of claims 1 to 6.
CN202310333289.8A 2023-03-30 2023-03-30 Map rendering method, apparatus, device, storage medium, and program product Pending CN116681843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310333289.8A CN116681843A (en) 2023-03-30 2023-03-30 Map rendering method, apparatus, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310333289.8A CN116681843A (en) 2023-03-30 2023-03-30 Map rendering method, apparatus, device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN116681843A true CN116681843A (en) 2023-09-01

Family

ID=87779746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310333289.8A Pending CN116681843A (en) 2023-03-30 2023-03-30 Map rendering method, apparatus, device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN116681843A (en)

Similar Documents

Publication Publication Date Title
US10282915B1 (en) Superimposition device of virtual guiding indication and reality image and the superimposition method thereof
JP4705170B2 (en) Navigation device and method for scrolling map data displayed on navigation device
JP4921462B2 (en) Navigation device with camera information
CN111311902B (en) Data processing method, device, equipment and machine readable medium
US8730244B2 (en) Method and device for generating character data, method and control device for displaying character data, and navigation apparatus
CA2964693C (en) Street-level guidance via route path
US20130162665A1 (en) Image view in mapping
US9528845B2 (en) Occlusion-reduced 3D routing for 3D city maps
US20090244100A1 (en) Gradually changing perspective map
JP2002098538A (en) Navigation system and method for displaying information of pseudo three dimensional map
CN109345015B (en) Method and device for selecting route
EP3566024B1 (en) Generating routes from lines based on zoom levels
KR20140000488A (en) Method for guiding turn point of crossroad and navigation system
US9846819B2 (en) Map image display device, navigation device, and map image display method
RU2375756C2 (en) Navigation device with information received from camera
CN116681843A (en) Map rendering method, apparatus, device, storage medium, and program product
EP4176233A1 (en) Navigation directions preview
US9915549B2 (en) Information processing apparatus, information processing method, and program causing computer to execute processing in information processing apparatus
CN106940191A (en) Guider and its vehicle location display methods
JP6247456B2 (en) Navigation device and map drawing method
JP2004333155A (en) Information presenting device, information presenting method, and computer program
US9574900B2 (en) Navigation apparatus and method for drawing map
US11536584B2 (en) Map display system and map display program
JPH04305116A (en) Method for drawing guide map of intersection
JP2008209506A (en) Graphic system and mask deformation method

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