Method and device for generating route in panoramic map
By obtaining route coordinate points based on the first curve in the panoramic map, determining the second line segment of the preset length, determining the triangle face sheet based on these line segments, and then generating a strip-shaped target route, the problem of insufficient display of routes in the panoramic map in the prior art is solved, and a higher user experience and route readability are achieved.
Patent Information
- Application Number
- CN202411921736.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-24
AI Technical Summary
When generating a road map, it is difficult to effectively display routes with obvious curvature changes, resulting in the route being displayed in the panoramic map without obvious enough and the user experience is poor.
By obtaining the route coordinate points based on the first curve in the panoramic map, a second line segment of a preset length is determined, and a triangle face sheet is determined based on these line segments, thereby generating a band-shaped target route. This method ensures that the triangle panels do not overlap by expanding the route width and replacing the cross sections, thereby improving the readability and display of the route.
It realizes that the route is displayed more clearly in the panoramic map, improves the readability and user experience of the route, and has better display effect compared to the original route curve.
Smart Images

Figure CN119779332A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to Internet technology, and in particular to a method and device for generating a route in a panoramic map. Background Art
[0002] In the existing map track display process, the track data is usually converted into geojson format, and then loaded and rendered through JSSDK to generate and display the track route map. Summary of the invention
[0003] Embodiments of the present disclosure provide a method and device for generating a route in a panoramic map.
[0004] According to one aspect of an embodiment of the present disclosure, a method for generating a route in a panoramic map is provided, comprising:
[0005] Based on a first curve included in the panoramic map, obtaining a first number of route coordinate points;
[0006] Determine a first number of second line segments of preset lengths according to the first number of route coordinate points;
[0007] determining a second number of triangular facets based on the first number of the second line segments;
[0008] Based on the second number of triangular facets, a strip target route corresponding to the first curve is determined; wherein a width of the strip target route is the preset length.
[0009] Optionally, determining the second number of triangular facets based on the first number of the second line segments comprises:
[0010] determining whether there is an adjacent second line segment having an intersection point;
[0011] In response to the presence of intersections between multiple adjacent second line segments, the multiple second line segments with intersections are replaced with multiple third line segments, and the second number of triangular facets are determined based on the multiple third line segments and the second line segments without intersections.
[0012] Optionally, the determining the second number of triangular facets based on the first number of the second line segments further includes:
[0013] In response to the absence of intersections between adjacent second line segments, determining a quadrilateral based on every two adjacent second line segments to obtain a third number of quadrilaterals;
[0014] Based on the third number of quadrilaterals, the second number of triangular patches is determined.
[0015] Optionally, replacing the plurality of second line segments having intersections based on the plurality of third line segments, and determining the second number of triangular facets based on the plurality of third line segments and the second line segments having no intersections, comprises:
[0016] Determine that the endpoints on one side close to the center of the curvature of the plurality of second line segments with intersection points are inner endpoints, and the endpoints on the other side are outer endpoints;
[0017] determining a target point based on a plurality of said inner endpoints;
[0018] Respectively connecting the plurality of outer endpoints and the target point to determine the plurality of third line segments;
[0019] The second number of triangular patches is determined based on the plurality of third line segments and the second line segments having no intersection points.
[0020] Optionally, determining the target point based on the multiple inner endpoints includes:
[0021] Connecting the plurality of inner endpoints in the order of the route coordinate points corresponding to the plurality of inner endpoints in the first curve to obtain a second curve;
[0022] The target point is determined based on an intersection point of the second curve.
[0023] Optionally, the determining the second number of triangular facets based on the plurality of third line segments and the second line segments having no intersections comprises:
[0024] Connecting outer endpoints of adjacent third line segments among the plurality of third line segments to obtain at least one of the triangular facets;
[0025] Determine a quadrilateral based on every two adjacent second line segments that do not have an intersection, to obtain a plurality of the quadrilaterals;
[0026] The second number of triangular facets is determined based on the plurality of quadrilaterals and the at least one triangular facet.
[0027] Optionally, the determining, based on the second number of triangular facets, a strip target route corresponding to the first curve includes:
[0028] Determining a route direction based on the direction information corresponding to the first curve;
[0029] Determine a corresponding direction mark and color information corresponding to the direction mark from a preset mark library according to the route direction;
[0030] Based on the vertex coordinate information corresponding to the triangular facet, the frame coordinate information and frame color information of the strip target route are determined.
[0031] Based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information, a strip target route corresponding to the first curve is determined.
[0032] Optionally, the determining the strip target route corresponding to the first curve based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information includes:
[0033] Rendering the direction mark based on the color information of the direction mark to obtain a target direction mark;
[0034] Paste the target direction mark map in the first layer corresponding to the strip target route;
[0035] Determine two frames corresponding to the strip target route based on the frame coordinates, and render the two frames based on the frame color information to obtain a target frame;
[0036] Mapping the target frame in the second layer corresponding to the strip target route;
[0037] The first layer and the second layer are superimposed to obtain the strip-shaped target route.
[0038] Optionally, the determining the strip target route corresponding to the first curve based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information further includes:
[0039] Determine the background area corresponding to the strip target route and the background color information based on the frame coordinates;
[0040] Rendering the background area based on the background color information to obtain a target background area;
[0041] Mapping the target background area in the third layer corresponding to the strip target route;
[0042] The superimposing the first layer and the second layer to obtain the strip target route includes:
[0043] The first layer, the second layer and the third layer are superimposed to obtain the strip-shaped target route.
[0044] Optionally, obtaining a first number of route coordinate points based on a first curve included in the panoramic map includes:
[0045] Coordinate points of the first curve are sampled to obtain a first number of the route coordinate points; wherein a preset number of coordinate points are sampled per unit length of the first curve as the route coordinate points.
[0046] Optionally, determining a first number of second line segments of preset lengths according to the first number of route coordinate points includes:
[0047] For each of the route coordinate points in the first number of route coordinate points, determining a normal of the first curve at the route coordinate point;
[0048] Taking the route coordinate point as the midpoint, a second line segment of the preset length is generated along the normal direction. According to another aspect of an embodiment of the present disclosure, a route generation device in a panoramic map is provided, comprising:
[0049] A coordinate point determination module, configured to obtain a first number of route coordinate points based on a first curve included in the panoramic map;
[0050] A second line segment module, configured to determine a first number of second line segments of a preset length according to the first number of route coordinate points;
[0051] A triangle patch module, configured to determine a second number of triangle patches based on the first number of the second line segments;
[0052] A route generation module is used to determine a strip target route corresponding to the first curve based on the second number of triangular facets; wherein the width of the strip target route is the preset length.
[0053] Optionally, the triangle patch module includes:
[0054] An intersection confirmation unit, used to determine whether there are adjacent second line segments having an intersection;
[0055] A first facet determination unit is configured to, in response to the presence of intersections between multiple adjacent second line segments, replace the multiple second line segments having intersections based on multiple third line segments, and determine the second number of triangular facets based on the multiple third line segments and the second line segments having no intersections.
[0056] Optionally, the triangle patch module further includes:
[0057] The second facet determination unit is used to determine a quadrilateral based on every two adjacent second line segments in response to the absence of intersections between adjacent second line segments, so as to obtain the third number of quadrilaterals; and determine the second number of triangular facets based on the third number of quadrilaterals.
[0058] Optionally, the first face patch determination unit is specifically used to determine the endpoints on one side of the multiple second line segments with intersections close to the center of curvature as inner endpoints, and the endpoints on the other side as outer endpoints; determine the target point based on the multiple inner endpoints; respectively connect the multiple outer endpoints and the target point to determine the multiple third line segments; determine the second number of triangular face patches based on the multiple third line segments and the second line segments without intersections.
[0059] Optionally, when determining the target point based on the multiple inner endpoints, the first patch determination unit is used to connect the multiple inner endpoints in the order of the route coordinate points corresponding to the multiple inner endpoints in the first curve to obtain a second curve; and determine the target point based on the intersection of the second curve.
[0060] Optionally, when determining the second number of triangular facets based on the multiple third line segments and the second line segments without intersection points, the first facet determination unit is used to connect the outer endpoints of adjacent third line segments among the multiple third line segments to obtain at least one triangular facet; determine a quadrilateral based on every two adjacent second line segments without intersection points to obtain a plurality of quadrilaterals; and determine the second number of triangular facets based on the plurality of quadrilaterals and at least one triangular facet.
[0061] Optionally, the route generation module includes:
[0062] a direction determining unit, configured to determine a route direction based on the direction information corresponding to the first curve;
[0063] A first color determination unit, configured to determine a corresponding direction mark and color information corresponding to the direction mark from a preset mark library according to the route direction;
[0064] The second color determination unit is used to determine the frame coordinate information and frame color information of the strip target route based on the vertex coordinate information corresponding to the triangular face.
[0065] A route color determination unit is used to determine the strip target route corresponding to the first curve based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information.
[0066] Optionally, the route color determination unit is specifically used to render the direction marker based on the color information of the direction marker to obtain a target direction marker; map the target direction marker in a first layer corresponding to the strip target route; determine two borders corresponding to the strip target route based on the border coordinates, and render the two borders based on the border color information to obtain a target border; map the target border in a second layer corresponding to the strip target route; and superimpose the first layer and the second layer to obtain the strip target route.
[0067] Optionally, the route color determination unit is also used to determine the background area corresponding to the strip-shaped target route and the background color information based on the border coordinates; render the background area based on the background color information to obtain the target background area; map the target background area in the third layer corresponding to the strip-shaped target route; and superimpose the first layer, the second layer and the third layer to obtain the strip-shaped target route.
[0068] Optionally, the coordinate point determination module is specifically used to sample coordinate points of the first curve to obtain a first number of route coordinate points; wherein a preset number of coordinate points are sampled per unit length of the first curve as the route coordinate points.
[0069] Optionally, the second line segment module is specifically used to determine, for each of the first number of route coordinate points, a normal of the first curve at the route coordinate point; and generate a second line segment of the preset length along the normal direction with the route coordinate point as the midpoint.
[0070] According to another aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0071] A memory for storing a computer program product;
[0072] The processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the route generation method in the panoramic map described in any one of the above embodiments is implemented.
[0073] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the route generation method in the panoramic map described in any of the above embodiments is implemented.
[0074] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including computer program instructions, which, when executed by a processor, implement the method for generating a route in a panoramic map described in any of the above embodiments.
[0075] The method and device for generating a route in a panoramic map provided based on the above-mentioned embodiment of the present disclosure include: obtaining a first number of route coordinate points based on a first curve included in the panoramic map; determining a first number of second line segments of a preset length based on the first number of route coordinate points; determining a second number of triangular facets based on the first number of the second line segments; determining a strip target route corresponding to the first curve based on the second number of triangular facets; wherein the width of the strip target route is the preset length; the embodiment of the present disclosure expands the originally given first curve into a first number of second line segments, determines a second number of triangular facets based on the second line segments, and obtains the strip target route through the triangular facets, so that the route is displayed more clearly in the panoramic map, and the strip target route is more readable in display relative to the original first curve, thereby improving the user experience.
[0076] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0078] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0079] Figure 1 is a flowchart of a method for generating a route in a panoramic map provided by an exemplary embodiment of the present disclosure;
[0080] Figure 2 This disclosure Figure 1 A schematic flow chart of step 104 in the embodiment shown;
[0081] Figure 3 is a schematic diagram of determining a normal line in a method for generating a route in a panoramic map provided by an exemplary embodiment of the present disclosure;
[0082] Figure 4 This disclosure Figure 1 A schematic flow chart of step 106 in the embodiment shown;
[0083] Figure 5a is a schematic diagram of two second line segments in an optional example of the present disclosure;
[0084] Figure 5b is a schematic diagram of two second line segments in another optional example of the present disclosure;
[0085] Figure 6 This disclosure Figure 4 A schematic flow chart of step 1062 in the embodiment shown;
[0086] Figure 7a is a schematic diagram of recording a plurality of continuous second line segments having intersection points in another optional example of the present disclosure;
[0087] Figure 7b Yes Figure 7a A schematic diagram showing marking the inner endpoints of the second line segment in the embodiment shown;
[0088] Figure 7c Yes Figure 7b Schematic diagram of the second curve obtained by connecting the endpoints in the red circle;
[0089] Figure 8a This disclosure Figure 1 A schematic flow chart of step 108 in the embodiment shown;
[0090] Figure 8b is a target direction identifier obtained by color rendering the target identifier in another optional example of the present disclosure;
[0091] Figure 8c is a schematic diagram of UV coordinates obtained by performing coordinate transformation on vertices of a triangular face in another optional example of the present disclosure;
[0092] Figure 8d is a schematic diagram of a strip target route obtained in yet another optional example of the present disclosure;
[0093] Fig. 9 is a schematic structural diagram of a route generating device in a panoramic map provided by an exemplary embodiment of the present disclosure;
[0094] Fig.10 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated. DETAILED DESCRIPTION
[0095] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0096] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0097] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0098] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0099] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0100] In addition, the term "and / or" in this disclosure is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this disclosure generally indicates that the previous and next associated objects are in an "or" relationship. The data referred to in this disclosure may include unstructured data such as text, images, and videos, and may also be structured data.
[0101] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0102] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0103] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0104] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0105] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0106] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0107] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0108] Exemplary Methods
[0109] Figure 1 FIG. 1 is a flow chart of a method for generating a route in a panoramic map provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices such as Figure 1 As shown, the following steps are included:
[0110] Step 102: Obtain a first number of route coordinate points based on a first curve included in the panoramic map.
[0111] In this embodiment, the first curve is a route with known length and coordinates already in the panoramic map, and the first curve includes multiple panoramic points with large intervals, and each panoramic point has known three-dimensional coordinates (x, y, z); a first number of route coordinate points are determined from the first curve through sampling and other operations. Optionally, a certain number (for example, 100) of route coordinate points are obtained for each first curve of a preset length. Combined with the known length of the first curve, the first number of route coordinate points can be obtained. For example, 100 route coordinate points are generated for every 1-meter curve, and 500 route coordinate points can be obtained for a 5-meter first curve.
[0112] Step 104: Determine a first number of second line segments of preset lengths according to a first number of route coordinate points.
[0113] In one embodiment, in order to generate a strip route with a certain width, width expansion is performed on each route coordinate point, and a second line segment of a preset length is determined at the position of each route coordinate point, so as to facilitate the subsequent generation of a strip route with the preset length as the width, wherein the preset length can be set according to a specific application scenario.
[0114] Step 106: Determine a second number of triangular facets based on the first number of second line segments.
[0115] A triangle is a two-dimensional geometric figure consisting of three vertices and three edges. Each edge connects two vertices, eventually forming a closed triangle. Triangles are usually used to describe the surface of three-dimensional objects. Complex shapes can be constructed by combining a large number of adjacent triangles. Based on the characteristics of triangles, all edges and vertices in a triangle are guaranteed to be in the same plane. In panoramic maps, it is easier to determine strip routes based on triangles.
[0116] Step 108: Determine a strip target route corresponding to the first curve based on the second number of triangular facets.
[0117] The width of the strip target route is a preset length.
[0118] In this embodiment, a strip-shaped target route can be obtained by connecting a second number of continuous triangular facets. Optionally, the second number is associated with the first number, for example, n represents the second number, and m represents the first number, where n=(m-1)×2.
[0119] The route generation method in the panoramic map provided by the above-mentioned embodiment of the present disclosure obtains a first number of route coordinate points based on a first curve included in the panoramic map; determines a first number of second line segments of a preset length based on the first number of route coordinate points; determines a second number of triangular facets based on the first number of the second line segments; determines a strip target route corresponding to the first curve based on the second number of triangular facets; wherein the width of the strip target route is the preset length; the embodiment of the present disclosure expands the originally given first curve into a first number of second line segments, determines a second number of triangular facets based on the second line segments, and obtains the strip target route through the triangular facets, so that the route is more clearly displayed in the panoramic map, and the strip target route is more readable in display than the original first curve, thereby improving the user experience.
[0120] In some optional embodiments, step 102 in the above embodiment may include:
[0121] Coordinate point sampling is performed on the first curve to obtain a first number of route coordinate points.
[0122] A preset number of coordinate points are sampled from the first curve per unit length as route coordinate points.
[0123] Optionally, the first curve in this embodiment can be converted into a smooth curve with a relatively sparse set of known three-dimensional coordinate points in the panoramic map through the method provided by the THREE.js library (used to simplify the process of creating and displaying 3D graphics on web pages), which is recorded as the first curve, for example, curve = new THREE.CatmullRomCurve3(pos it ions); then the first curve is converted into multiple route coordinate points through the method provided by the THREE.js library, for example, the route coordinate point set is recorded as L, L = curve.length*100; it means that 100 route coordinate points are generated for every 1 meter of the curve in the first curve, and the total number of coordinate points required to be generated for calculating the complete first curve (corresponding to the first number in this embodiment) is achieved. The number of route coordinate points generated in this embodiment is much larger than the points with initial known three-dimensional coordinates, that is, continuous, small-spaced, and smooth route coordinate points are generated through sparse panoramic points with large spacing, and the strip route generated with the first number of route coordinate points is smoother and the display effect is more beautiful.
[0124] like Figure 2 As shown in the above Figure 1 Based on the illustrated embodiment, in step 104, for each route coordinate point in the first number of route coordinate points, the following steps may be performed:
[0125] Step 1041, determining the normal line of the first curve at the route coordinate point.
[0126] A normal line is a line that is always perpendicular to a plane. In geometry, a normal line is a line on a plane that is perpendicular to the tangent line of a curve at a certain point.
[0127] In an alternative example, Figure 3 As shown, at the route coordinate point P, the tangent line L1 is determined, and through the point P, the normal line L2 perpendicular to the tangent line L1 is determined.
[0128] Step 1042 , taking the route coordinate point as the midpoint, generating a second line segment of a preset length along the normal direction.
[0129] In this embodiment, the direction corresponding to the second line segment is determined based on the normal line corresponding to the route coordinate point. In order to determine the second line segment with a preset length, the route coordinate point is taken as the midpoint, and half of the preset length is intercepted on the normal lines on both sides of the route coordinate point to obtain the second line segment corresponding to the route coordinate point. For example, Figure 3The line segments p1p2 in the illustrated embodiment. Based on the method provided in this embodiment, the corresponding second line segments can be determined for each route coordinate point, that is, the first number of second line segments can be obtained. In this embodiment, by intercepting the second line segments in the normal direction, the width of the strip route is extended in the normal direction of each route coordinate point, ensuring that each angle in the subsequently obtained strip route is consistent with the first curve.
[0130] like Figure 4 As shown in the above Figure 1 Based on the illustrated embodiment, step 106 may include the following steps:
[0131] Step 1061 , determining whether there are adjacent second line segments having an intersection. If there are multiple adjacent second line segments having an intersection, executing step 1062 ; otherwise, executing step 1063 .
[0132] Optionally, whether two adjacent second line segments intersect can be determined by the curvature corresponding to each route coordinate point. Curvature is the rotation rate of the tangent direction angle to the arc length at a certain point on the curve (the route coordinate point in this embodiment), which is defined by differentiation and indicates the degree to which the curve deviates from a straight line. The larger the curvature, the greater the curvature of the curve.
[0133] If the curvature of the first curve at two adjacent route coordinate points (e.g., the first route coordinate point and the second route coordinate point, since the route coordinate point density of the embodiment of the present disclosure is relatively large, the curvature difference between the two adjacent route coordinate points is relatively small) is less than a preset curvature (the preset curvature is related to the preset length), the two adjacent second line segments (corresponding to the first route coordinate point and the second route coordinate point) do not intersect, for example, Figure 5a In the example shown, the curvatures corresponding to the two second line segments: p1p2 and p3p4 are both less than the preset curvature, and there is no intersection between p1p2 and p3p4; and when the curvatures of the first route coordinate point and the second route coordinate point are greater than or equal to the preset curvature, there is an intersection between the two adjacent second line segments, for example, Figure 5b In the example shown, the curvatures corresponding to the two second line segments: p5p6 and p7p8 are greater than the preset curvature, and there is an intersection point between p5p6 and p7p8.
[0134] Step 1062: Replace the plurality of second line segments having intersection points based on the plurality of third line segments, and determine a second number of triangular facets based on the plurality of third line segments and the second line segments having no intersection points.
[0135] When there are intersections between multiple second line segments, it is impossible to directly determine triangular patches based on the multiple second line segments. Therefore, this embodiment proposes to replace the second line segments with third line segments. The corresponding triangular patches can be determined based on the multiple third line segments, and the second number of triangular patches can be obtained by combining with other second line segments that do not have intersections. Optionally, the method of determining triangular patches based on second line segments that do not have intersections can refer to steps 1063 and 1064.
[0136] Step 1063 , determine a quadrilateral based on every two adjacent second line segments to obtain a third number of quadrilaterals; and execute step 1064 .
[0137] Optionally, two adjacent second line segments are connected at two vertices on the same side of the first curve to obtain a rectangle, such as Figure 5a In the illustrated embodiment, by connecting p1p3 and p2p4, a rectangle p1p2p4p3 can be obtained.
[0138] Step 1064: Determine a second number of triangular facets based on the third number of quadrilaterals.
[0139] Optionally, a corresponding triangular facet can be obtained based on a diagonal line of a rectangle, and two corresponding triangles (for example, p1p4 or p2p3) can be obtained by connecting any diagonal line of the rectangle (for example, p1p4 or p2p3), and a second number of triangular facets can be obtained by using these two triangles as triangular facets. This embodiment overcomes the problem of overlapping triangular facets when determining triangular facets on the second line segment with an intersection point by the same processing by performing different processing on the second line segment with an intersection point and the second line segment without an intersection point, and determines the corresponding triangular facet in combination with the replaced third line segment, so that all the obtained triangular facets do not overlap, thereby improving the accuracy of the obtained strip route.
[0140] like Figure 6 As shown in the above Figure 4 Based on the illustrated embodiment, step 1062 may include the following steps:
[0141] Step 601: Determine, among a plurality of second line segments having intersection points, that the endpoint on one side close to the center of the curvature circle is an inner endpoint, and the endpoint on the other side is an outer endpoint.
[0142] Optionally, the reciprocal of the curvature at point M on the curve is called the radius of curvature ρ of the curve at this point. Based on the radius of curvature and the curvature, a point D can be determined, satisfying DM equal to the radius of curvature ρ. A circle is constructed with point D as the center and the radius of curvature ρ as the radius. This circle is called the curvature circle of the curve at point M, and the center D is called the center of curvature of the curve at M. And near point M, there is the same concave direction as the curve, so the centers of curvature corresponding to the multiple second line segments with consecutive intersections are on the same side of the first curve.
[0143] Step 602: determine a target point based on a plurality of inner endpoints.
[0144] In some optional embodiments, step 602 may include: connecting multiple inner endpoints in the order of route coordinate points corresponding to the multiple inner endpoints in the first curve to obtain a second curve; and determining the target point based on the intersection of the second curve.
[0145] Optionally, when two tangent lines generated by adjacent route coordinate points have a large angle (for example, the first curve has a turn), two second line segments will intersect, and because the first curve is smooth, the change in the angle between the two adjacent tangent lines is also smooth, so it can be known that multiple second line segments with intersection points are continuous. Figure 7a As shown; in this embodiment, multiple continuous second line segments with intersections are recorded, and multiple continuous second line segments with intersections are processed uniformly, such as Figure 7b As shown in FIG. 1 , all inner endpoints are connected in the order of the route coordinate points corresponding to each inner endpoint in the first curve to obtain a second curve. For example, Figure 7b Connect the endpoints in the red circle to get the following Figure 7c The second curve shown must have an intersection point, and the intersection point is used as the target point.
[0146] Step 603: Connect multiple outer endpoints and the target point respectively to determine multiple third line segments.
[0147] In this embodiment, a plurality of non-overlapping triangular facets can be obtained by replacing all the inner endpoints with the target point and connecting a plurality of outer endpoints with the target point, thereby ensuring that all the triangular facets in the generated strip route do not overlap with each other.
[0148] Step 604 : determining a second number of triangular facets based on a plurality of third line segments and second line segments having no intersection points.
[0149] Optionally, in some optional examples, outer endpoints of adjacent third line segments among the plurality of third line segments are connected to obtain at least one triangular facet.
[0150] Since the plurality of third line segments have the same inner endpoint (target point), it is only necessary to connect the outer endpoints of two adjacent third line segments to obtain a triangular face based on the two third line segments and the connecting line.
[0151] A quadrilateral is determined based on every two adjacent second line segments having no intersection, thereby obtaining a plurality of quadrilaterals.
[0152] Based on the plurality of quadrilaterals and the at least one triangular patch, a second number of triangular patches is determined.
[0153] In this embodiment, the method of obtaining triangular facets based on quadrilaterals can refer to steps 1063 and 1064 in the above embodiment, which will not be repeated here. The second number of triangular facets can be determined by combining the triangular facets obtained based on the target point and the triangular facets obtained from the quadrilateral. In this embodiment, by replacing the inner endpoints of the second line segment with the intersection with the target point, the second number of triangular facets obtained do not overlap, thereby achieving an improved display effect of the strip route.
[0154] like Figure 8a As shown in the above Figure 1 Based on the illustrated embodiment, step 108 may include the following steps:
[0155] Step 1081, determining the route direction based on the direction information corresponding to the first curve.
[0156] In addition to the known length and coordinates, the first curve also has known direction information, which indicates that one end of the first curve is the starting point and the other end is the end point. Based on the direction information, the route direction corresponding to the strip route can be determined. Optionally, since the first curve has different directions at different positions, a set of route directions can be obtained.
[0157] Step 1082, determining the corresponding direction sign and the color information corresponding to the direction sign from a preset sign library according to the route direction.
[0158] Optionally, a preset identification library stores direction identifications of multiple modes (e.g., arrow mode, icon mode, etc.), multiple directions, and multiple colors. According to the route direction, the direction identification of the corresponding direction can be screened from the preset identification library, or a direction identification of any direction can be obtained, and the direction of the direction identification can be adjusted based on the route direction (e.g., arrows of a unified direction are obtained, and the arrow direction is adjusted based on the route direction corresponding to different positions of the strip route). Optionally, the direction identification and the color information of the direction identification can be determined based on a specific application scenario, or according to the received instruction information.
[0159] Step 1083, based on the vertex coordinate information corresponding to the triangular facet, determine the border coordinate information and border color information of the strip target route.
[0160] Optionally, in the strip target route formed by connecting triangular facets, its border is obtained by connecting one edge in each triangular facet in sequence. Therefore, after determining the vertex coordinates of the triangular facets, the border coordinate information of the strip target route can be determined. In addition, in order to highlight the display effect of the strip target route, the border color and the background color can be set to different colors. This embodiment can determine the border color information according to the application scenario, or determine the border color information according to the received instruction information.
[0161] Step 1084, determining the strip target route corresponding to the first curve based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information.
[0162] Any model is composed of a geometric body and a texture. The geometric body describes the shape of the model (determined based on the connection of the second number of triangular facets in this embodiment), and the texture describes the color and / or style of the geometric body. Any geometric body is composed of a number of triangles (corresponding to triangular facets), and each triangle has three vertices and their three-dimensional coordinates. Based on the geometric body determined by the triangular facets determined in the above embodiment, this embodiment adds direction information and color information, so that the obtained strip target route includes more visual information, thereby improving the readability of the strip target route.
[0163] In some optional embodiments, step 1084 may include:
[0164] Step a1: Render the direction marker based on the color information of the direction marker to obtain a target direction marker.
[0165] Optionally, color rendering of the direction mark is implemented based on a fragment shader. After the rendering is completed, a target direction mark with color is obtained, for example, Figure 8b As shown, it is a schematic diagram of a direction mark obtained after color rendering (white).
[0166] Step a2, map the target direction mark in the first layer corresponding to the strip target route.
[0167] In this embodiment, since the direction mark, border and background included in the strip target route have different color information, in order to avoid unclear recognition caused by color mixing, the direction mark is mapped in the first layer to distinguish it from the border and background.
[0168] Step a3: determine two borders corresponding to the strip target route based on the border coordinates, render the two borders based on the border color information, and obtain the target border.
[0169] UV mapping is a technology that matches 2D texture coordinates (U, V) with points on the surface of a 3D model (corresponding to the vertices of a triangle in this embodiment). The range of UV coordinates is 0-1. When a computer GPU draws a triangle, in addition to the spatial position of the triangle, the color of the triangle is also required. In this embodiment, the vertex of each triangle is first mapped to a UV coordinate through UV mapping, that is, the UV of each vertex of the triangle is defined. When the computer processes the triangle, it will calculate the UV coordinates of each pixel in the triangle according to the predefined vertex UV coordinates (such as: 0.1, 0.2, etc.), and output the desired color of the pixel according to the UV coordinates provided by the computer to achieve the desired effect.
[0170] In some optional examples, the UV coordinates corresponding to the vertices of each triangular face are preset. In this example, Figure 8c As shown: the uv coordinates of the three vertices of the lower triangle are (0,0)(1,0)(1,1), and the uv coordinates of the three vertices of the upper triangle are (0,0)(0,1)(1,1).
[0171] Step a4, mapping the target border in the second layer corresponding to the strip target route.
[0172] Step a5, superimposing the first layer and the second layer to obtain a strip-shaped target route.
[0173] Optionally, the first layer is on top and the second layer is on the bottom.
[0174] In this embodiment, the direction mark and the target frame are mapped in different layers respectively, and the first layer is set above the second layer, so that the shape and color of the direction mark are not blocked, the display effect of the obtained strip target route is better, and the user can see the route direction at a glance.
[0175] Optionally, step 1084 may further include:
[0176] Step b1, determining the background area and background color information corresponding to the strip target route based on the frame coordinates.
[0177] In this embodiment, the background area can be determined based on the frame coordinates converted to UV coordinates. For example, the background area color confirmation and the frame color determination are implemented based on the following pseudo code:
[0178] Calculate the background color of the current uv coordinate and set it to background:
[0179] fl oat u=uv.x;
[0180] if(u>borderWidth&&u<1.0-borderWidth){ / / If not on the border, output the background color return vec4(backgroundColor,backgroundOpacity);
[0181] }
[0182] Calculate the border color of the current uv coordinate and set it to border:
[0183] fl oat u=uv.x;
[0184] if(u<borderWi dth||u> 1.0-borderWidth){ / / If on the border, output the border color return vec4(borderColor,borderOpacity);
[0185] }
[0186] Among them, borderWidth represents the ratio of the set border width to the strip route. For example, if it is set to 0.2, 1.0 represents the full width of the strip route, and 0.2 represents that the border on one side occupies 1 / 5 of the strip route.
[0187] Step b2: Rendering the background area based on the background color information to obtain the target background area.
[0188] Optionally, color rendering of the background area is implemented based on a fragment shader, and after the rendering is completed, a target background area with color is obtained.
[0189] Step b3, mapping the target background area in the third layer corresponding to the strip target route.
[0190] Step a5 may include:
[0191] The first layer, the second layer and the third layer are superimposed to obtain a ribbon-shaped target route.
[0192] In this embodiment, the colors of the areas not to be removed have different priorities. For example, the border color covers the background color; the direction indicator color covers the border and background colors. In order to realize the visualization of this priority, this embodiment maps the target direction indicator, target border, and target background area after rendering color to different layers, and superimposes the layers according to the priority. For example, the first layer is on the top layer, the second layer is between the first and third layers, and the third layer is on the bottom layer. In an optional example, the following can be obtained by rendering, mapping, and layer superposition: Figure 8d Schematic diagram of the ribbon target route shown. Figure 8d In the illustrated embodiment, the direction mark is in the shape of an arrow, is white in color, has a white border, and has a blue background.
[0193] Any method for generating a route in a panoramic map provided by the embodiments of the present disclosure may be executed by any appropriate device with data processing capabilities, including but not limited to: a terminal device and a server, etc. Alternatively, any method for generating a route in a panoramic map provided by the embodiments of the present disclosure may be executed by a processor, such as the processor executing any method for generating a route in a panoramic map mentioned in the embodiments of the present disclosure by calling corresponding instructions stored in a memory. This will not be described in detail below.
[0194] Exemplary Devices
[0195] Fig. 9 FIG. 1 is a schematic diagram of a structure of a route generating device in a panoramic map provided by an exemplary embodiment of the present disclosure. Fig. 9 As shown, the device provided in this embodiment includes:
[0196] The coordinate point determination module 91 is used to obtain a first number of route coordinate points based on a first curve included in the panoramic map.
[0197] The second line segment module 92 is used to determine a first number of second line segments of preset lengths according to a first number of route coordinate points.
[0198] The triangle patch module 93 is configured to determine a second number of triangle patches based on the first number of second line segments.
[0199] The route generating module 94 is configured to determine the strip target route corresponding to the first curve based on the second number of triangular facets.
[0200] The width of the strip target route is a preset length.
[0201] The route generation device in the panoramic map provided by the above-mentioned embodiment of the present disclosure obtains a first number of route coordinate points based on a first curve included in the panoramic map; determines a first number of second line segments of preset length based on the first number of route coordinate points; determines a second number of triangular facets based on the first number of the second line segments; determines a strip target route corresponding to the first curve based on the second number of triangular facets; wherein the width of the strip target route is the preset length; the embodiment of the present disclosure expands the originally given first curve into a first number of second line segments, determines a second number of triangular facets based on the second line segments, and obtains the strip target route through the triangular facets, so that the route is more clearly displayed in the panoramic map, and the strip target route is more readable in display than the original first curve, thereby improving the user experience.
[0202] In some optional embodiments, the coordinate point determination module 91 is specifically configured to perform coordinate point sampling on the first curve to obtain a first number of route coordinate points.
[0203] A preset number of coordinate points are sampled from the first curve per unit length as route coordinate points.
[0204] In some optional embodiments, the second line segment module 92 is specifically used to determine the normal of the first curve at the route coordinate point for each route coordinate point in the first number of route coordinate points; and generate a second line segment of a preset length along the normal direction with the route coordinate point as the midpoint.
[0205] In some optional embodiments, the triangle patch module 93 includes:
[0206] The intersection confirmation unit is used to determine whether there is an adjacent second line segment with an intersection.
[0207] The first facet determination unit is used to replace the plurality of second line segments having intersections based on a plurality of third line segments in response to the presence of intersections between the plurality of adjacent second line segments, and determine a second number of triangular facets based on the plurality of third line segments and the second line segments having no intersections.
[0208] Optionally, the triangle patch module 93 further includes:
[0209] The second facet determination unit is used to determine a quadrilateral based on every two adjacent second line segments in response to the absence of intersections between adjacent second line segments to obtain a third number of quadrilaterals; and determine a second number of triangular facets based on the third number of quadrilaterals.
[0210] Optionally, the first face patch determination unit is specifically used to determine, among multiple second line segments having intersection points, the endpoints on one side close to the center of curvature as inner endpoints, and the endpoints on the other side as outer endpoints; determine a target point based on the multiple inner endpoints; respectively connect the multiple outer endpoints and the target point to determine multiple third line segments; and determine a second number of triangular face patches based on the multiple third line segments and the second line segments having no intersection points.
[0211] Optionally, when determining the target point based on multiple inner endpoints, the first patch determination unit is used to connect the multiple inner endpoints in the order of the route coordinate points corresponding to the multiple inner endpoints in the first curve to obtain a second curve; and determine the target point based on the intersection of the second curve.
[0212] Optionally, when the first facet determination unit determines the second number of triangular facets based on multiple third line segments and second line segments without intersection points, it is used to connect the outer endpoints of adjacent third line segments in the multiple third line segments to obtain at least one triangular facet; determine a quadrilateral based on every two adjacent second line segments without intersection points to obtain multiple quadrilaterals; and determine the second number of triangular facets based on the multiple quadrilaterals and at least one triangular facet.
[0213] In some optional embodiments, the route generation module 94 includes:
[0214] The direction determining unit is used to determine the route direction based on the direction information corresponding to the first curve.
[0215] The first color determination unit is used to determine a corresponding direction mark and color information corresponding to the direction mark from a preset mark library according to the route direction.
[0216] The second color determination unit is used to determine the frame coordinate information and frame color information of the strip target route based on the vertex coordinate information corresponding to the triangular face.
[0217] The route color determination unit is used to determine the strip target route corresponding to the first curve based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information.
[0218] Optionally, the route color determination unit is specifically used to render the direction marker based on the color information of the direction marker to obtain the target direction marker; map the target direction marker in a first layer corresponding to the strip target route; determine two borders corresponding to the strip target route based on the border coordinates, and render the two borders based on the border color information to obtain the target border; map the target border in a second layer corresponding to the strip target route; and superimpose the first layer and the second layer to obtain the strip target route.
[0219] Optionally, the route color determination unit is also used to determine the background area and background color information corresponding to the strip target route based on the border coordinates; render the background area based on the background color information to obtain the target background area; map the target background area in the third layer corresponding to the strip target route; and superimpose the first layer, the second layer and the third layer to obtain the strip target route.
[0220] Exemplary Electronic Devices
[0221] Below, reference Fig.10 The electronic device according to the embodiment of the present disclosure is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them.
[0222] Fig.10 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.
[0223] like Fig.10 As shown, the electronic device includes one or more processors and memory.
[0224] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0225] The memory may store one or more computer program products, and the memory may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program products may be stored on the computer-readable storage medium, and the processor may run the computer program product to implement the route generation method in the panoramic map of each embodiment of the present disclosure described above and / or other desired functions.
[0226] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0227] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.
[0228] The output device can output various information to the outside, including determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0229] Of course, to simplify, Fig.10 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.
[0230] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the route generation method in the panoramic map according to various embodiments of the present disclosure described in the above part of this specification.
[0231] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0232] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method for generating a route in a panoramic map according to various embodiments of the present disclosure described in the above part of this specification.
[0233] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0234] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0235] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0236] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0237] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0238] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0239] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0240] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for generating a route in a panoramic map, characterized in that: include: Based on a first curve included in the panoramic map, obtaining a first number of route coordinate points; Determine a first number of second line segments of preset lengths according to the first number of route coordinate points; determining a second number of triangular facets based on the first number of the second line segments; Based on the second number of triangular facets, a strip target route corresponding to the first curve is determined; wherein a width of the strip target route is the preset length.
2. The method according to claim 1, characterized in that The determining a second number of triangular facets based on the first number of the second line segments comprises: determining whether there is an adjacent second line segment having an intersection point; In response to the presence of intersections between multiple adjacent second line segments, the multiple second line segments with intersections are replaced with multiple third line segments, and the second number of triangular facets are determined based on the multiple third line segments and the second line segments without intersections.
3. The method according to claim 2, characterized in that The determining of the second number of triangular facets based on the first number of the second line segments further includes: In response to the absence of intersections between adjacent second line segments, determining a quadrilateral based on every two adjacent second line segments to obtain a third number of quadrilaterals; Based on the third number of quadrilaterals, the second number of triangular patches is determined.
4. The method according to claim 2 or 3, characterized in that: The replacing the plurality of second line segments having intersections based on the plurality of third line segments, and determining the second number of triangular facets based on the plurality of third line segments and the second line segments having no intersections, comprises: Determine that the endpoints on one side close to the center of the curvature of the plurality of second line segments with intersection points are inner endpoints, and the endpoints on the other side are outer endpoints; determining a target point based on a plurality of said inner endpoints; Respectively connecting the plurality of outer endpoints and the target point to determine the plurality of third line segments; determining the second number of triangular facets based on the plurality of third line segments and the second line segments having no intersection points; The determining of the target point based on the plurality of inner endpoints comprises: Connecting the plurality of inner endpoints in the order of the route coordinate points corresponding to the plurality of inner endpoints in the first curve to obtain a second curve; The target point is determined based on an intersection point of the second curve.
5. The method according to claim 4, characterized in that The determining the second number of triangular facets based on the plurality of third line segments and the second line segments having no intersections comprises: Connecting outer endpoints of adjacent third line segments among the plurality of third line segments to obtain at least one of the triangular facets; Determine a quadrilateral based on every two adjacent second line segments that do not have an intersection, to obtain a plurality of the quadrilaterals; The second number of triangular facets is determined based on the plurality of quadrilaterals and the at least one triangular facet.
6. The method according to any one of claims 1 to 5, characterized in that: The determining, based on the second number of triangular facets, a strip target route corresponding to the first curve includes: Determining a route direction based on the direction information corresponding to the first curve; Determine a corresponding direction mark and color information corresponding to the direction mark from a preset mark library according to the route direction; Based on the vertex coordinate information corresponding to the triangular facet, determining the frame coordinate information and frame color information of the strip target route; Based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information, a strip target route corresponding to the first curve is determined.
7. The method according to claim 6, characterized in that The determining, based on the direction mark, the color information of the direction mark, the frame coordinates, and the frame color information, of the strip target route corresponding to the first curve includes: Rendering the direction mark based on the color information of the direction mark to obtain a target direction mark; Paste the target direction mark map in the first layer corresponding to the strip target route; Determine two frames corresponding to the strip target route based on the frame coordinates, and render the two frames based on the frame color information to obtain a target frame; Mapping the target frame in the second layer corresponding to the strip target route; The first layer and the second layer are superimposed to obtain the strip-shaped target route.
8. The method according to claim 7, characterized in that The determining of the strip target route corresponding to the first curve based on the direction mark, the color information of the direction mark, the frame coordinates and the frame color information further includes: Determine the background area corresponding to the strip target route and the background color information based on the frame coordinates; Rendering the background area based on the background color information to obtain a target background area; Mapping the target background area in the third layer corresponding to the strip target route; The superimposing the first layer and the second layer to obtain the strip target route includes: The first layer, the second layer and the third layer are superimposed to obtain the strip-shaped target route.
9. The method according to any one of claims 1 to 8, characterized in that: The obtaining a first number of route coordinate points based on a first curve included in the panoramic map includes: Sampling coordinate points of the first curve to obtain a first number of coordinate points of the route; wherein a preset number of coordinate points are sampled per unit length of the first curve as the coordinate points of the route; The step of determining a first number of second line segments of preset lengths according to the first number of route coordinate points includes: For each of the route coordinate points in the first number of route coordinate points, determining a normal of the first curve at the route coordinate point; A second line segment of the preset length is generated along the normal direction with the route coordinate point as the midpoint.
10. A route generation device in a panoramic map, characterized in that: include: A coordinate point determination module, configured to obtain a first number of route coordinate points based on a first curve included in the panoramic map; A second line segment module, configured to determine a first number of second line segments of preset lengths according to the first number of route coordinate points; A triangle patch module, configured to determine a second number of triangle patches based on the first number of the second line segments; A route generation module is used to determine a strip target route corresponding to the first curve based on the second number of triangular facets; wherein the width of the strip target route is the preset length.
Citation Information
Patent Citations
Inclination model and multivariate model dynamic fusion-based adaptive network visualization method
CN106898047A
Road depicting method and device and computer storage medium
CN111598970A
Map data processing method and device, equipment and storage medium
CN113066179A
Three-dimensional path display method and device, readable storage medium and electronic equipment
CN114170381A
Virtual road model generation method and device, computer equipment and storage medium
CN116229004A