Micro map direction distance system
By designing a micromap direction distance system, providing detailed direction and distance information, the problem of ignoring direction and distance information in the prior art is solved, and more efficient calculations and better user experience is achieved.
Patent Information
- Application Number
- CN202410214122.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-02-27
AI Technical Summary
The existing micromap assisted pathfinding technology focuses on building landmark libraries, ignoring direction and distance information, resulting in computational redundancy and failure to meet the needs of the public with weak sense of direction.
A micromap direction distance system is designed to provide detailed direction and distance information through the classification of path data constituent elements, the development of spatial direction relationship calculation model and the calculation of spatial distance relationship.
It effectively avoids computing redundancy, provides detailed direction and distance information, and meets the needs of micromaps to assist pathfinding, especially for the public with weak sense of direction.
Smart Images

Figure CN118051576B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of micro-map assisted path finding, and more particularly to a micro-map direction distance system. Background Art
[0002] We-Map, a new type of map in the era of self-media, aims to make up for the shortcomings of traditional maps in production and dissemination. Compared with traditional maps, it is easy to disseminate, the content is neither redundant nor insufficient, and there is almost no threshold requirement for cartographers. However, due to the low threshold of micro-maps, the map production process is relatively casual, and it is unable to provide reasonable and accurate routes when assisting users in finding their way, which seriously affects the user experience of using micro-maps.
[0003] Research on micromap-assisted pathfinding focuses on building a landmark library to serve personalized pathfinding and micromap orientation methods, while other research on micromaps focuses on production and dissemination. For production, it involves the construction of a micromap symbol library, micromap mapping methods in specific scenarios, and evaluation methods for micromap road network data; for dissemination, it mainly involves micromap user modeling, micromap recommendations, and the existence characteristics of micromaps from a philosophical perspective.
[0004] Research on production and dissemination may provide support for micro-map assisted wayfinding, but it is more about how to produce and disseminate micro-maps, while micro-map assisted wayfinding focuses on the application of micro-maps and the user experience. However, research on micro-map assisted wayfinding either focuses on building a landmark library or on theoretical assumptions. One ignores other information for assisted wayfinding (such as direction and distance), and the other lacks experimental evidence. The missing information in the assisted wayfinding process needs to be supplemented.
[0005] Therefore, how to supplement the missing direction and distance information in the pathfinding process is an urgent problem to be solved in micro-map assisted pathfinding. Summary of the invention
[0006] In view of this, the present invention provides a micro-map direction and distance system to provide detailed direction and distance information for micro-map assisted pathfinding, effectively avoiding the limitation that the existing micro-map assisted pathfinding technology only focuses on building a landmark library while ignoring the limitations of direction and distance, and solves the problems that the spatial direction relationship calculation model needs to be constructed multiple times during the pathfinding process, resulting in calculation redundancy, and the group of people with weak sense of direction is not considered while describing distance information.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A micro-map direction distance system includes three parts: classification of path data constituent elements, development of spatial direction relationship calculation model and calculation of spatial distance relationship:
[0009] The components of route data are classified as follows:
[0010] S1: Acquisition of path data and road segment data, i.e. reading path data L = {R1, R2, …, R n}, n represents the index of the road segment data;
[0011] S2: Obtain the road segment data R by traversing the path data n , which consists of two types: points without geometric figures and points with geometric figures;
[0012] S3: Read the road segment data without geometric points and with geometric points respectively. The road segment without geometric points is recorded as P i = {1 ≤ j < i | M j}, where M j = {1 ≤ n < j | v n = (x n , y n )}; The road segment containing the geometric point is recorded as Q i , then Q i = {1 ≤ j < i | M j}, where M j = {1 ≤ k < j | G k}, G k = {1 ≤ n < k | v n = (x n , y n )}; M j Indicates a node, i is the index value of the road segment data, j is the index value of the node data, k is the index value of the geometric point data, and n is the index value of the coordinate data;
[0013] S4: Get coordinates v n = (x n , y n ), read the data containing the features attribute from the JSON file, store it in a list form, record it as Features, and its elements are composed of dictionary types; traverse Features, obtain the elements containing the attributes attribute from each element of Features, and then retrieve the elements containing the OBJECTID attribute from them to obtain v n At the same time, get the feature containing the geometry attribute from each element of Features, and then retrieve the element containing the path attribute from it to get v n The specific coordinates (xn , y n );
[0014] The development of the computational model of spatial orientation relations consists of calculating P i and Q i The spatial direction relationship is composed of two parts. The specific steps are as follows:
[0015] P i Calculation of spatial direction relationship:
[0016] S5: Calculate the node M j-1 is the reference object, node M j is the spatial direction relationship Dir(M j-1 , M j ), j is the index value of the node;
[0017] S6: Construct a quantitative calculation model of spatial direction relationship, that is, a quantitative expression of spatial direction relationship, Dir(M j-1 , M j ) = { 1 ≤ j < Num(M0, M end ) | β j},Num(M0, M end ) represents the initial node M0 to the terminal node M end The function for calculating the number of nodes between j represents the node, β j Indicates azimuth;
[0018] Q i Calculation of spatial direction relationship:
[0019] S7: Read road segment data Q i The node M j (j≥1); where, due to Q i Contains geometric points, so in the adjacent node M j-1 and M j There are k geometric points between them, denoted by G k (k ≥ 1);
[0020] S8: Take the geometric points as reference objects and source targets, that is, calculate the j-1 As the reference object, Dir(M j-1 , M j ) = { 1 ≤ j ≤ Num(M j-1 , M j ) | {1 ≤ k < Num(G k-1 , G k ) | dir(G k-1 ,Gk )}}, where Num(G0, G end ) represents the initial geometry point G0 and the last geometry point G end The number of geometric points between G k Represents a geometric point;
[0021] S9: Construction of a quantitative result model for calculating spatial direction relations, namely Dir(M j-1 , M j ) = { 1 ≤ j <Num(M j-1 , M j ) | {1 ≤ k < Num(G k-1 , G k ) | dir(G k-1 , G k ) = β k}};
[0022] Calculation of spatial distance relationship:
[0023] S10: Distance Dis (P i ) = Dis(v1, v n ) = Sum (len(R1), len(R2), …, len(R n )), where v1 = (x1, y1), v n = (x n , y n ), Sum() represents the sum function, and len() represents the function for calculating the length of a road section;
[0024] S11: R n The components of the node v do not contain geometric points. n-1 and v n Therefore, the function len(R n ) =Dis(v n-1 ,v n ), where Dis(v n-1 ,v n ) indicates v n-1 and v n The distance between n-1 = (x n-1 , y n-1 ), v n =(x n , y n ), n≥2;
[0025] S12: P iThe spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, and the road segment data in the path data does not contain geometric points;
[0026] S13: Q i The spatial distance calculation is better than P i The spatial distance is calculated in multiple steps, because the road segment R n The components of R include geometric points, namely n = {r1, r2, …, r n}, so R n The distance len(R n ) = Sum(len(r1), len(r2), …, len(r n )); where r n Represents a segment, consisting of a geometric point v n-1 and v n Composition, r n The distance len(r n ) =Dis(v n-1 ,v n );
[0027] S14: Q i The spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, denoted as Dis(v n-1 ,v n ), the components of the road segments in the path include geometric points;
[0028] S15: End.
[0029] Preferably, in steps S11 and S13, it also includes calculating the distance between two points (v n-1 and v n ) distance.
[0030] Preferably, in steps S6 and S9, after obtaining the quantitative results of the spatial direction relationship, the method further includes: qualitatively describing the calculated quantitative expression based on the eight-direction cone model, specifically, if β j ∈ [0, π / 8] ∪ (15π / 8, 2π], then it is recorded as north; if β j ∈ (π / 8, 3π / 8], then it is recorded as northeast; if β j ∈ (3π / 8, 5π / 8], then it is recorded as East; if β j ∈ (5π / 8, 7π / 8], then it is recorded as southeast; if β j ∈ (7π / 8, 9π / 8], then it is recorded as South; if β j ∈ (9π / 8,11π / 8], then it is recorded as southwest; if β j∈ (11π / 8, 13π / 8], then it is recorded as West; if β j ∈ (13π / 8, 15π / 8], then it is recorded as northwest.
[0031] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a micro-map direction and distance system, which is easy to implement and effectively avoids the limitation that the existing micro-map assisted pathfinding technology only focuses on building a landmark library while ignoring the direction and distance. It solves the problems that the spatial direction relationship calculation model needs to be constructed multiple times during the pathfinding process, resulting in calculation redundancy, and the group of people with weak sense of direction is not considered while describing the distance information, and provides detailed direction and distance information for micro-map assisted pathfinding. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0033] Figure 1 A schematic diagram of the definitions of related terms provided by the present invention;
[0034] Figure 2 A schematic diagram of the direction distance model provided by the present invention;
[0035] Figure 3 A schematic diagram of a spatial direction relationship calculation model without geometric figure points provided by the present invention;
[0036] Figure 4 A schematic diagram of a spatial direction relationship calculation model including geometric figure points provided by the present invention;
[0037] Figure 5 The effect diagram of the calculation results provided by the present invention; DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The embodiment of the present invention discloses a micro-map direction distance system, which includes three parts: classification of path data constituent elements, development of a spatial direction relationship calculation model, and calculation of a spatial distance relationship:
[0040] The components of route data are classified as follows:
[0041] S1: Acquisition of path data and road segment data, i.e. reading path data L = {R1, R2, …, R n}, n represents the index of the road segment data;
[0042] S2: Obtain the road segment data R by traversing the path data n , which consists of two types: points without geometric figures and points with geometric figures;
[0043] S3: Read the road segment data without geometric points and with geometric points respectively. The road segment without geometric points is recorded as P i = {1 ≤ j < i | M j}, where M j = {1 ≤ n < j | v n = (x n , y n )}; The road segment containing the geometric point is recorded as Q i , then Q i = {1 ≤ j < i | M j}, where M j = {1 ≤ k < j | G k}, G k = {1 ≤ n < k | v n = (x n , y n )}; M j Indicates a node, i is the index value of the road segment data, j is the index value of the node data, k is the index value of the geometric point data, and n is the index value of the coordinate data;
[0044] S4: Get coordinates v n = (x n , y n ), read the data containing the features attribute from the JSON file, store it in a list form, record it as Features, and its elements are composed of dictionary types; traverse Features, obtain the elements containing the attributes attribute from each element of Features, and then retrieve the elements containing the OBJECTID attribute from them to obtain v n At the same time, get the feature containing the geometry attribute from each element of Features, and then retrieve the element containing the path attribute from it to get v n The specific coordinates (x n , yn );
[0045] The development of the computational model of spatial orientation relations consists of calculating P i and Q i The spatial direction relationship is composed of two parts. The specific steps are as follows:
[0046] P i Calculation of spatial direction relationship:
[0047] S5: Calculate the node M j-1 is the reference object, node M j is the spatial direction relationship Dir(M j-1 , M j ), j is the index value of the node;
[0048] S6: Construct a quantitative calculation model of spatial direction relationship, that is, a quantitative expression of spatial direction relationship, Dir(M j-1 , M j ) = { 1 ≤ j < Num(M0, M end ) | β j},Num(M0, M end ) represents the initial node M0 to the terminal node M end The function for calculating the number of nodes between j represents the node, β j Indicates azimuth;
[0049] Q i Calculation of spatial direction relationship:
[0050] S7: Read road segment data Q i The node M j (j≥1); where, due to Q i Contains geometric points, so in the adjacent node M j-1 and M j There are k geometric points between them, denoted by G k (k ≥ 1);
[0051] S8: Take the geometric points as reference objects and source targets, that is, calculate the j-1 As the reference object, Dir(M j-1 , M j ) = { 1 ≤ j ≤ Num(M j-1 , M j ) | {1 ≤ k < Num(G k-1 , G k ) | dir(G k-1 ,G k)}}, where Num(G0, G end ) represents the initial geometry point G0 and the last geometry point G end The number of geometric points between G k Represents a geometric point;
[0052] S9: Construction of a quantitative result model for calculating spatial direction relations, namely Dir(M j-1 , M j ) = { 1 ≤ j <Num(M j-1 , M j ) | {1 ≤ k < Num(G k-1 , G k ) | dir(G k-1 , G k ) = β k}};
[0053] Calculation of spatial distance relationship:
[0054] S10: Distance Dis (P i ) = Dis(v1, v n ) = Sum (len(R1), len(R2), …, len(R n )), where v1 = (x1, y1), v n = (x n , y n ), Sum() represents the sum function, and len() represents the function for calculating the length of a road section;
[0055] S11: R n The components of the node v do not contain geometric points. n-1 and v n Therefore, the function len(R n ) =Dis(v n-1 ,v n ), where Dis(v n-1 ,v n ) indicates v n-1 and v n The distance between n-1 = (x n-1 , y n-1 ), v n =(x n , y n ), n≥2;
[0056] S12: P iThe spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, and the road segment data in the path data does not contain geometric points;
[0057] S13: Q i The spatial distance calculation is better than P i The spatial distance calculation of multiple steps, because the road segment R n The components of R include geometric points, namely n = {r1, r2, …, r n}, so R n The distance len(R n ) = Sum(len(r1), len(r2), …, len(r n )); where r n Represents a segment, consisting of a geometric point v n-1 and v n Composition, r n The distance len(r n ) =Dis(v n-1 ,v n );
[0058] S14: Q i The spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, denoted as Dis(v n-1 ,v n ), the components of the road segments in the path include geometric points;
[0059] S15: End.
[0060] Preferably, in steps S11 and S13, the Euclidean distance between two points (v n-1 and v n ) distance.
[0061] Preferably, in steps S6 and S9, after obtaining the quantitative results of the spatial direction relationship, the method further includes: qualitatively describing the calculated quantitative expression based on the eight-direction cone model, specifically, if β j ∈ [0, π / 8] ∪ (15π / 8, 2π], then it is recorded as north; if β j ∈ (π / 8, 3π / 8], then it is recorded as northeast; if β j ∈ (3π / 8, 5π / 8], then it is recorded as East; if β j ∈ (5π / 8, 7π / 8], then it is recorded as southeast; if β j ∈ (7π / 8, 9π / 8], then it is recorded as South; if β j ∈ (9π / 8,11π / 8], then it is recorded as southwest; if β j∈ (11π / 8, 13π / 8], then it is recorded as West; if β j ∈ (13π / 8, 15π / 8], then it is recorded as northwest.
[0062] The method involved in the present invention is further described below.
[0063] Before classifying the constituent elements of path data, the present invention first needs to clarify the definition of the constituent elements of path data and related concepts of the present invention:
[0064] Definition 1: A set of road segments is called a path. Figure 1 Then it is a complete path, that is, L ={R1, R2, …, R6};
[0065] Definition 2: A road segment is composed of one or a series of segments. The road segments are connected end to end, and there is no situation where two road segments are connected by a node, such as Figure 1 As shown, except for the section R2, R1 to R6 are also referred to as sections, each consisting of a segment, and the section R2 consists of a series of segments;
[0066] Definition 3: A segment is composed of geometric points or nodes;
[0067] Definition 4: A node represents the connection point between two road segments;
[0068] Definition 5: The turning points and geometric shapes of the segments on multiple line segments are called geometric points;
[0069] Definition 6: The direction is from the path starting point v1 to the end point v n The set of spatial direction relationships between all nodes, nodes and geometric points, or geometric points and geometric points;
[0070] Definition 7: The angle between a road segment and a node or between a segment and a geometric point meridian is the azimuth, which is used to accurately describe the spatial direction relationship between nodes, nodes and geometric points, or geometric points and geometric points. Figure 1 β in represents the azimuth angle of segment r1;
[0071] Definition 8: Represents the path from the starting point v1 to the end point v n The length of a path between them, that is, the distance.
[0072] After clarifying the composition of path elements and the definitions of the concepts related to the present invention, the direction distance system is designed. Since some sections of road elements contain geometric points, while some sections do not, the present invention is mainly divided into two parts for discussion: the calculation model of the spatial direction relationship and distance relationship containing geometric points, and the calculation model of the spatial direction relationship and distance relationship without geometric points, such as Figure 2 shown.
[0073] like Figure 3 As shown in the figure, the user starts from the initial node N0 and eventually reaches the destination N2. During the user's path finding, the direction relationship is respectively based on N0 as the reference object and N1 as the source target, and N1 as the reference object and N2 as the source target. The spatial direction relationship is recorded to help the user determine the spatial direction when finding the path. Specifically, it is recorded as Dir(N0, N2) = {dir(N0, N1), dir(N1,N2)} = {E, SE}, which means that N1 is to the east of N0 and N2 is to the southeast of N1. Secondly, the spatial direction relationship is quantitatively expressed. By using the road segment E i The node coordinates of N can be calculated j-1 and N j The azimuth angle β j , azimuth angle β j The calculation of is shown in formula (1), where N j-1 = (x j-1 , y j-1 ), N j = (x j , y j ).exist Figure 3 In the above, the quantitative expression of the spatial direction relationship is Dir(N0, N2) = {β1, β2}, i.e., steps S5 to S7.
[0074] (1)
[0075] like Figure 4 It is a schematic diagram of the spatial direction relationship calculation model containing geometric points. There are 6 geometric points between adjacent nodes N1 and N2, namely G k = { G0, G1, G2, G3, G4, G5}; then, assuming that the user wants to start from the initial node N0 and eventually reach the destination N3, during the user's path-finding period, the directional relationship between N0 and N1, and the directional relationship between N2 and N3 belong to the spatial relationship calculation without geometric points, which will not be discussed here. Instead, the focus is on the calculation of the spatial directional relationship between the adjacent nodes N1 and N2.
[0076] Take N1 as the reference object and G0 as the source target, take G0 as the reference object and G1 as the source target, …, take G5 as the reference object and N2 as the source target, and record the spatial direction relationship to help users judge the spatial direction when finding the path. Specifically, it is recorded as Dir(N1,N2) = {dir(N1, G0), dir(G0, G1), …, dir(G5, N2)} = {SE, SE, …, SW}.
[0077] Similar to calculating spatial direction relationships without geometric points, spatial direction relationships require not only qualitative but also quantitative expressions. By using node coordinates and geometric point coordinates, N can be calculated. j-1 and N j The azimuth angle β k .
[0078] Therefore, in Figure 4 In the above equation, the spatial direction relationship of the path from N0 to N3 is expressed as Dir(N0, N3) = {dir(N0, N1), dir(N1, N2), …, dir(N2, N3)}, where dir(N1, N2) is different from dir(N0, N1) and dir(N2, N3). The former is a set, that is, dir(N1, N2) = {1 ≤ k < 8 | β k}={β1, β2, β3, β4,β5, β6, β7}, and the latter is a specific value, such as the values of dir(N0, N1) and dir(N2, N3) are β1 and β3 respectively. This is steps S8 and S9.
[0079] When calculating the spatial distance relationship, steps S11 and S13 both involve v n-1 and v n Distance Dis(v n-1 ,v n ), where v n-1 = (x n-1 , y n-1 ), v n = (x n , y n ), n≥2; therefore, it is necessary to further optimize Dis(v n-1 ,v n ), the specific calculation process refers to formula (2).
[0080] (2)
[0081] like Figure 5As shown, the present invention obtains the technical effect diagram of the present invention based on the vector road network data in JSON format.
[0082] The method provided by the present invention includes three parts: classification of path data constituent elements, development of spatial direction relationship calculation model and calculation of spatial distance relationship:
[0083] The components of route data are classified as follows:
[0084] S1: Acquisition of path data and road segment data, i.e. reading path data L = {R1, R2, …, R n}, n represents the index of the road segment data;
[0085] S2: Obtain the road segment data R by traversing the path data n , which consists of two types: points without geometric figures and points with geometric figures;
[0086] S3: Read the road segment data without geometric points and with geometric points respectively. The road segment without geometric points is recorded as P i = {1 ≤ j < i | M j}, where M j = {1 ≤ n < j | v n = (x n , y n )}; The road segment containing the geometric point is recorded as Q i , then Q i = {1 ≤ j < i | M j}, where M j = {1 ≤ k < j | G k}, G k = {1 ≤ n < k | v n = (x n , y n )}; M j Indicates a node, i is the index value of the road segment data, j is the index value of the node data, k is the index value of the geometric point data, and n is the index value of the coordinate data;
[0087] S4: Get coordinates v n = (x n , y n), read the data containing the features attribute from the JSON file, store it in a list form, record it as Features, and its elements are composed of dictionary types; traverse Features, obtain the elements containing the attributes attribute from each element of Features, and then retrieve the elements containing the OBJECTID attribute from them to obtain v n At the same time, get the feature containing the geometry attribute from each element of Features, and then retrieve the element containing the path attribute from it to get v n The specific coordinates (x n , y n );
[0088] The development of the computational model of spatial orientation relations consists of calculating P i and Q i The spatial direction relationship is composed of two parts. The specific steps are as follows:
[0089] P i Calculation of spatial direction relationship:
[0090] S5: Calculate the node M j-1 is the reference object, node M j is the spatial direction relationship Dir(M j-1 , M j ), j is the index value of the node;
[0091] S6: Construct a quantitative calculation model of spatial direction relationship, that is, a quantitative expression of spatial direction relationship, Dir(M j-1 , M j ) = { 1 ≤ j < Num(M0, M end ) | β j},Num(M0, M end ) represents the initial node M0 to the terminal node M end The function for calculating the number of nodes between j represents the node, β j Indicates azimuth;
[0092] Q i Calculation of spatial direction relationship:
[0093] S7: Read road segment data Q i The node M j (j≥1); where, due to Q i Contains geometric points, so in the adjacent node M j-1 and M j There are k geometric points between them, denoted by G k (k ≥ 1);
[0094] S8: Take the geometric points as reference objects and source targets, that is, calculate the j-1 As the reference object, Dir(M j-1 , M j ) = { 1 ≤ j ≤ Num(M j-1 , M j ) | {1 ≤ k < Num(G k-1 , G k ) | dir(G k-1 ,G k )}}, where Num(G0, G end ) represents the initial geometry point G0 and the last geometry point G end The number of geometric points between G k Represents a geometric point;
[0095] S9: Construction of a quantitative result model for calculating spatial direction relations, namely Dir(M j-1 , M j ) = { 1 ≤ j <Num(M j-1 , M j ) | {1 ≤ k < Num(G k-1 , G k ) | dir(G k-1 , G k ) = β k}};
[0096] Calculation of spatial distance relationship:
[0097] S10: Distance Dis (P i ) = Dis(v1, v n ) = Sum (len(R1), len(R2), …, len(R n )), where v1 = (x1, y1), v n = (x n , y n ), Sum() represents the sum function, and len() represents the function for calculating the length of a road section;
[0098] S11: R n The components of the node v do not contain geometric points. n-1 and v n Therefore, the function len(R n ) =Dis(v n-1 ,v n ), where Dis(vn-1 ,v n ) indicates v n-1 and v n The distance between n-1 = (x n-1 , y n-1 ), v n =(x n , y n ), n≥2;
[0099] S12: P i The spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, and the road segment data in the path data does not contain geometric points;
[0100] S13: Q i The spatial distance calculation is better than P i The spatial distance calculation of multiple steps, because the road segment R n The components of R include geometric points, namely n = {r1, r2, …, r n}, so R n The distance len(R n ) = Sum(len(r1), len(r2), …, len(r n )); where r n Represents a segment, consisting of a geometric point v n-1 and v n Composition, r n The distance len(r n ) =Dis(v n-1 ,v n );
[0101] S14: Q i The spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, denoted as Dis(v n-1 ,v n ), the components of the road segments in the path include geometric points;
[0102] S15: End.
[0103] Preferably, in steps S11 and S13, it also includes calculating the distance between two points (v n-1 and v n ) distance.
[0104] Preferably, in steps S6 and S9, after obtaining the quantitative results of the spatial direction relationship, the method further includes: qualitatively describing the calculated quantitative expression based on the eight-direction cone model, specifically, if β j∈ [0, π / 8] ∪ (15π / 8, 2π], then it is recorded as north; if β j ∈ (π / 8, 3π / 8], then it is recorded as northeast; if β j ∈ (3π / 8, 5π / 8], then it is recorded as East; if β j ∈ (5π / 8, 7π / 8], then it is recorded as southeast; if β j ∈ (7π / 8, 9π / 8], then it is recorded as South; if β j ∈ (9π / 8,11π / 8], then it is recorded as southwest; if β j ∈ (11π / 8, 13π / 8], then it is recorded as West; if β j ∈ (13π / 8, 15π / 8], then it is recorded as northwest.
[0105] The micro-map direction distance system provided by the present invention has the following characteristics:
[0106] (1) Effectively avoid the limitations of existing micro-map-assisted pathfinding technologies that only focus on building a landmark library while ignoring the limitations of direction and distance;
[0107] (2) It solves the computational redundancy problem caused by the need to construct the spatial direction relationship calculation model multiple times during the pathfinding process;
[0108] (3) When describing distance information, the general public with a weak sense of direction is not taken into consideration, and detailed direction and distance information is not provided for micro-map-assisted path finding.
[0109] In this specification, each embodiment 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 device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0110] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. The micro-map direction distance system is characterized by: It includes three parts: classification of path data components, development of spatial direction relationship calculation model and calculation of spatial distance relationship: The components of route data are classified as follows: S1: Acquisition of path data and road segment data, i.e., reading path data L = {R1, R2, ..., R n }, n represents the index of the road segment data; S2: Obtain the road segment data R by traversing the path data n , which consists of two types: points without geometric figures and points with geometric figures; S3: Read the road segment data without geometric points and with geometric points respectively. The road segment without geometric points is recorded as P i ={1≤j<i|M j }, where M j ={1≤n<j|v n =(x n ,y n )}; The road segment containing the geometric point is recorded as Q i , then Q i ={1≤j<i|M j }, where M j ={1≤k<j|G k }, G k ={1≤n<k|v n =(x n ,y n )};M j Represents a node, i is the index value of the road segment data, j is the index value of the node data, k is the index value of the geometric point data, and n is the index value of the coordinate data; S4: Get coordinates v n =(x n ,y n ), read the data containing the features attribute from the JSON file, store it in a list form, record it as Features, and its elements are composed of dictionary types; traverse Features, obtain the elements containing the attributes attribute from each element of Features, and then retrieve the elements containing the OBJECTID attribute from them to obtain v n At the same time, get the feature containing the geometry attribute from each element of Features, and then retrieve the element containing the path attribute from it to get v n The specific coordinates (x n ,y n ); The development of the computational model of spatial orientation relations consists of calculating P i and Q i The spatial direction relationship is composed of two parts. The specific steps are as follows: P i Calculation of spatial direction relationship: S5: Calculate the node M j-1 is the reference object, node M j is the spatial direction relationship Dir(M j-1 ,M j ), j is the index value of the node; S6: Construct a quantitative calculation model of spatial direction relationship, that is, a quantitative expression of spatial direction relationship, Dir(M j-1 ,M j )={1≤j<Num(M0,M end )|β j },Num(M0,M end ) represents the initial node M0 to the terminal node M end The function for calculating the number of nodes between j represents the node, β j Indicates azimuth; Q i Calculation of spatial direction relationship: S7: Read road segment data Q i The node M j , j≥1; among them, due to Q i Contains geometric points, so in the adjacent node M j-1 and M j There are k geometric points between them, denoted by G k , k ≥ 1; S8: Take the geometric points as reference objects and source targets, that is, calculate the j-1 As the reference object, Dir(M j-1 ,M j )={1≤j≤Num(M j-1 ,M j )|{1≤k<Num(G k-1 ,G k )|dir(G k-1 ,G k )}}, where Num(G0,G end ) represents the initial geometry point G0 and the last geometry point G end The number of geometric points between G k Represents a geometric point; S9: Construction of a quantitative result model for calculating spatial direction relations, namely Dir(M j-1 ,M j )={1≤j<Num(M j-1 ,M j )|{1≤k<Num(G k-1 ,G k )|dir(G k-1 ,G k )=β k }}; Calculation of spatial distance relationship: S10: Distance Dis (P i )=Dis(v1,v n )=Sum(len(R1),len(R2),…,len(R n )),in, v1=(x1,y1),v n =(x n ,y n ), Sum() represents the sum function, and len() represents the function for calculating the length of a road section; S11: R n The components of the node v do not contain geometric points. n-1 and v n Therefore, the function len(R n )=Dis(v n-1 ,v n ), where Dis(v n-1 ,v n ) indicates v n-1 and v n The distance between n-1 =(x n-1 ,y n-1 ), v n =(x n ,y n ), n≥2; S12: P i The spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, and the road segment data in the path data does not contain geometric points; S13: Q i The spatial distance calculation is better than P i The spatial distance calculation of multiple steps, because the road segment R n The components of R include geometric points, namely n ={r1,r2,…,r n }, so R n The distance len(R n )=Sum(len(r1),len(r2),…,len(r n )); where r n Represents a segment, consisting of a geometric point v n-1 and v n Composition, r n The distance len(r n )=Dis(v n-1 ,v n ); S14: Q i The spatial distance calculation is completed, that is, the distance calculation of the i-th path is completed, denoted as Dis(v n-1 ,v n ), the components of the road segments in the path include geometric points; S15: End.
2. The micro-map direction distance system according to claim 1, characterized in that: In steps S11 and S13, the Euclidean distance is used to calculate v n-1 and v n The distance between.
3. The micro-map direction distance model system according to claim 1 or 2, characterized in that: In steps S6 and S9, after obtaining the quantitative results of the spatial direction relationship, the method further includes: qualitatively describing the calculated quantitative expression based on the eight-direction cone model, specifically, if β j ∈[0,π / 8]∪(15π / 8,2π], then it is recorded as north; if β j ∈(π / 8,3π / 8], then it is recorded as northeast; if β j ∈(3π / 8,5π / 8], then it is recorded as East; if β j ∈(5π / 8,7π / 8], then it is recorded as southeast; if β j ∈(7π / 8,9π / 8], then it is recorded as South; if β j ∈(9π / 8,11π / 8], then it is recorded as southwest; if β j ∈(11π / 8,13π / 8], then record it as West; if β j ∈(13π / 8,15π / 8], then it is recorded as northwest.
Citation Information
Patent Citations
Tourism attribute path planning method
CN114580796A
Construction method of micro map direction system
CN115588062A