Interconversion method and system for pile numbers, longitudes and latitudes of expressway
By combining GeoHash grouping and dual-sequence indexing with angle calculation, the problem of low computational efficiency and poor accuracy in converting highway station numbers to latitude and longitude under complex road conditions is solved, achieving real-time positioning with meter-level accuracy, which is suitable for embedded devices and complex road scenarios.
Patent Information
- Application Number
- CN202511652471.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-10
AI Technical Summary
Existing methods for converting highway station numbers to latitude and longitude are computationally intensive, inefficient, and inaccurate in complex road conditions, failing to achieve real-time positioning with meter-level accuracy, and are prone to introducing errors, especially in curved road scenarios.
GeoHash grouping and dual-sequence indexing are adopted. By combining road number and station index, the three closest consecutive highway stations are selected as reference points. The curvature of the road is determined by the angle calculation. Trigonometric functions or interpolation methods are dynamically selected for calculation to realize the conversion of target latitude and longitude or station number.
It achieves meter-level accuracy in stationing on both straight and curved roads, reduces data redundancy and computational complexity, is highly adaptable, suitable for embedded devices, supports parallel processing of multiple roads and lanes, and only requires updating the index when adding new road segments.
Smart Images

Figure CN121498731A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of transportation information technology, specifically to a method and system for converting between highway mileage markers and latitude and longitude. Background Technology
[0002] As a crucial component of transportation infrastructure, highways typically use mileage markers for location identification. Before construction, foundation piles are uniformly numbered to indicate the vehicle's location along the highway, along with its latitude and longitude. This marking method is simple and intuitive. However, due to maintenance cost considerations, mileage markers are generally only used at full mileage points; highway mileage markers are typically in kilometer increments, with "hundred-meter markers" used only on certain special sections. With the widespread application of highway mileage markers in highway operation management, emergency rescue, and intelligent monitoring, the accuracy of highway pile location information, down to the meter level, is increasingly demanding. This is crucial for improving highway service efficiency and safety. However, the implementation and maintenance costs of high-precision highway pile positioning technology are very high. Furthermore, the complexity and numerous curves of highway routes necessitate precise curve fitting algorithms to ensure accurate latitude and longitude conversion. The processing and storage of large amounts of mileage marker and latitude / longitude data also pose challenges to data processing capabilities and storage technologies.
[0003] Therefore, existing methods for converting highway station numbers to latitude and longitude have gradually evolved into research on highway station number positioning with smaller intervals. For example, Chinese patent CN115329147A describes a method for accurately matching highway latitude and longitude with station numbers. This method collects station number information of structures on the highway (such as toll stations, tunnel entrances, etc.), performs GIS processing, constructs a linked list structure, calculates station distances in segments, generates segmentation points based on the segmented structure segments, and establishes a basic mapping relationship between station numbers and geographic coordinates by persistently storing the segmentation point information. However, this technical solution relies on a persistent mapping table of segmentation points. During the conversion, it uses a binary search method to find the three nearest segmentation points from the entire mapping table, with a time complexity of O(log n). It does not involve handling complex road conditions at all, and mainly relies on linear interpolation of segmentation points. The accuracy depends on the step size of the segmentation points. The smaller the step size, the higher the accuracy, but it requires high data collection costs due to dense point marking, and the computational cost is also higher. At the same time, it requires complex operations such as preprocessing station information into GIS, calculating station distances in segments, and segmentation step size to obtain segmentation point information. When adding new road segments or structures, the segmentation points need to be recalculated.
[0004] For example, Chinese patent CN116501816A describes a method and device for converting highway latitude and longitude station numbers. This method merges lane coordinates through multiple clustering iterations, deletes non-highway segment data, and uses average merging when processing bifurcation lanes to obtain a set of lane centerline latitude and longitude coordinates. It then generates a dictionary relating mileage and coordinates using the differential principle. However, this technical solution requires traversing the entire dictionary to calculate the shortest distance during conversion, resulting in a time complexity of O(n), low online efficiency, and a discrete relational dictionary that can only convert whole-kilometer station numbers. It relies primarily on linear mapping of the average interval of coordinate points, which cannot meet the positioning accuracy requirements of complex roads. Furthermore, it requires pre-processing complex operations such as cluster center iteration and lane merging to obtain the lane centerline latitude and longitude coordinate set, which not only easily introduces bias during the average merging of bifurcation lanes but also necessitates recalculating the entire dataset when adding new road data. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes a method and system for converting highway station numbers to latitude and longitude, aiming to significantly simplify calculations, improve conversion efficiency, and flexibly handle complex road conditions, achieving real-time station positioning with meter-level accuracy on both straight and curved roads.
[0006] Firstly, this application provides a method for converting between highway station numbers and latitude and longitude, including the following steps:
[0007] Collect highway station numbers and their corresponding latitude and longitude coordinates and road numbers;
[0008] Convert latitude and longitude coordinates to GeoHash values, and group latitude and longitude coordinates with the same GeoHash value into the same set to obtain several sets of latitude and longitude coordinates;
[0009] Establish sequence indexes for GeoHash values and latitude / longitude coordinate sets, as well as sequence indexes for road numbers and highway station numbers;
[0010] Based on the target latitude and longitude or target station number, and combined with the sequence index, select the three closest consecutive highway stations as reference points;
[0011] The degree of road curvature is determined based on the selected benchmark point. If the road curvature is determined to be a straight road, the station number corresponding to the target latitude and longitude is calculated using the right-angled sides of the trigonometric function, or the latitude and longitude corresponding to the target station number. If the road curvature is determined to be a curve, the station number corresponding to the target latitude and longitude is calculated using the interpolation method, or the latitude and longitude corresponding to the target station number.
[0012] The technical concept of this invention is as follows:
[0013] First, it is only necessary to collect the kilometer markers or 100-meter markers on the highway and their corresponding latitude and longitude coordinates and road codes. Then, GeoHash is used to convert the latitude and longitude coordinates into strings. Latitude and longitude coordinates with the same GeoHash value are put into the same set, which reduces data redundancy, improves conversion efficiency, and avoids the high collection cost of dense point collection and the high computational load of clustering iteration in existing technologies.
[0014] However, relying solely on GeoHash can lead to problems such as ambiguous boundaries and insufficient accuracy. To address this, this embodiment establishes a dual-sequence index of GeoHash and latitude and longitude coordinates, as well as road number and station number, giving GeoHash grouping a structured semantic. Specifically, the GeoHash index can quickly lock the candidate coordinate set (time complexity reduced to O(1)), while the road number index is associated with the mileage order of the station number, avoiding full table traversal, which helps to meet the real-time positioning requirements of the highway network. Moreover, the two form a spatial-semantic dual constraint, which makes the selection of benchmark points not only based on geographical proximity but also implicitly contains road topology logic, cleverly realizing the accurate extraction of local linear features of roads and avoiding mismatches. Therefore, the index structure can support parallel processing of multiple roads and multiple lanes, is suitable for processing complex road conditions, and only requires updating the index when adding road segments or highway station numbers, which greatly improves scalability.
[0015] Then, relying directly on the reference points selected by combining the dual-sequence index, the curvature of the road is accurately determined by the angle calculation. Different lightweight algorithms are dynamically selected in conjunction with the road curvature to calculate the station number corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station number. For straight roads, trigonometric functions are used for calculation, and for curves, interpolation is used to calculate, which flexibly copes with different complex road conditions. The station number positioning can be achieved with meter-level accuracy on both straight and curved roads by using five decimal places of latitude and longitude coordinates. This eliminates the accuracy problem of GeoHash and avoids the complex clustering and differential calculations used in existing technologies. It is especially suitable for embedded devices or low computing power scenarios (such as vehicle terminals and mobile applications). At the same time, it avoids the interference introduced by cross-road or long-distance reference points and improves the calculation accuracy of station number positioning. Specifically, in the curve scenario, if the reference point crosses different roads due to index error, the interpolation method will produce significant deviation. However, this embodiment ensures that the reference point comes from the continuous station number of the same road through the cooperative constraint of the dual-sequence index, so that the interpolation ratio truly reflects the relationship between the curve length and the station number increment.
[0016] In some embodiments, based on the target latitude and longitude and combined with a sequence index, the three closest consecutive road stakes are selected as reference points, including:
[0017] Convert the target latitude and longitude to GeoHash values;
[0018] Find the sequence index of GeoHash value and latitude / longitude coordinate set, as well as the sequence index of road number and highway station number, to determine the latitude / longitude coordinate set that corresponds to the GeoHash value of the target latitude / longitude and is on the same road, and record it as the candidate coordinate set;
[0019] Select the three consecutive road piles closest to the target latitude and longitude from the set of candidate coordinates as reference points.
[0020] In some embodiments, based on the target station number and in conjunction with a sequence index, the three closest consecutive highway stations are selected as reference points, including:
[0021] Determine the road number where the target station is located based on the target station number;
[0022] Find the sequence index of road number and highway station number, determine the highway station number corresponding to the road number of the target station number, and record it as the set of candidate station numbers;
[0023] Select the three consecutive highway piles closest to the target pile from the pool of candidate piles as reference points.
[0024] In some embodiments, the reference points include continuous highway stakes A, B, and C, where reference point A is the minimum mileage highway stake along the current highway direction. Determining the road curvature based on the selected reference point includes:
[0025] Based on the latitude and longitude coordinates of reference points A, B, and C, the angle CAB is calculated and used as the road curvature angle.
[0026] Set an initial included angle threshold and use a dynamic adjustment strategy to adjust the included angle threshold;
[0027] Determine if the road curvature angle is less than the current angle threshold. If the road curvature angle is less than the current angle threshold, the road is determined to be a straight road. If the road curvature angle is greater than or equal to the current angle threshold, the road is determined to be a curve.
[0028] In some embodiments, a dynamic adjustment strategy is used to adjust the included angle threshold, including:
[0029] When the road curvature angle is detected to be less than the first preset angle threshold N times in a row, the current included angle threshold is increased by the first preset increment to obtain the adjusted included angle threshold.
[0030] When a road curvature angle is detected to be greater than the second preset angle threshold in a single instance, the current included angle threshold is reduced by the second preset increment to obtain the adjusted included angle threshold.
[0031] The degree of road curvature is determined based on the adjusted included angle threshold.
[0032] In some embodiments, the reference points include continuous highway stakes A, B, and C, where reference point A is the minimum mileage highway stake along the current highway direction. If the road curvature is determined to be straight, the target latitude and longitude are calculated using trigonometric functions with right-angled sides, including:
[0033] Draw a perpendicular line from the point T corresponding to the target latitude and longitude to the line connecting the reference points A and B. The intersection point is denoted as T1. Then, points A, T, and T1 form a right triangle.
[0034] Based on the latitude and longitude coordinates corresponding to T, A, and B, the distance d of the line connecting T and A and the angle TAB are calculated.
[0035] Based on the distance d and the angle TAB, the distance s between the lines T1 and A is calculated.
[0036] Calculate the sum of the station number corresponding to the benchmark point A and the distance s to obtain the station number corresponding to the target latitude and longitude.
[0037] In some embodiments, the reference points include continuous highway stakes A, B, and C, where reference point A is the minimum mileage highway stake along the current highway direction. If the road curvature is determined to be straight, the latitude and longitude corresponding to the target stake are calculated using trigonometric functions with right-angled sides, including:
[0038] Calculate the difference between the target station number and the corresponding station number of the benchmark point A to obtain the distance h;
[0039] Based on the latitude and longitude coordinates of A and B and the distance h, the latitude and longitude of the target station are calculated after moving a distance h along the line connecting A and B with reference point A as the center.
[0040] In some embodiments, the reference points include continuous highway stakes A, B, and C, where reference point A is the minimum mileage highway stake along the current highway direction. The road curvature is then determined to be a curve, and the target latitude and longitude are calculated using interpolation, including:
[0041] Based on the latitude and longitude coordinates corresponding to the benchmark point, the longitude road segment curve and the latitude road segment curve where the benchmark point is located are fitted.
[0042] Based on the longitude and latitude road segment curves, the actual arc length from reference point A to the target longitude and latitude corresponding point T and the actual arc length from reference point A to reference point B are obtained by integral calculation.
[0043] The station correction ratio is obtained by quoting the actual arc length from benchmark point A to the target latitude and longitude point T and the actual arc length from benchmark point A to benchmark point B.
[0044] Multiply the difference between the station number corresponding to benchmark point A and the station number corresponding to benchmark point B by the station number correction ratio, and then add it to the station number corresponding to benchmark point A to obtain the station number corresponding to the target latitude and longitude.
[0045] In some embodiments, the reference points include continuous highway stakes A, B, and C, where reference point A is the minimum mileage highway stake along the current highway direction. The road curvature is then determined to be a curve, and the latitude and longitude corresponding to the target stake number are calculated using interpolation, including:
[0046] The latitude and longitude correction ratio is obtained by quoting the difference between the target station and the corresponding station of benchmark point A, and the difference between the corresponding station of benchmark point B and the corresponding station of benchmark point A.
[0047] Multiply the difference between the longitude coordinates corresponding to benchmark point B and the longitude coordinates corresponding to benchmark point A by the latitude and longitude correction ratio, and then add it to the longitude coordinates corresponding to benchmark point A to obtain the longitude corresponding to the target station number.
[0048] Multiply the difference between the latitude coordinates of reference point B and the latitude coordinates of reference point A by the latitude and longitude correction ratio, and then add it to the latitude coordinates of reference point A to obtain the latitude corresponding to the target station number.
[0049] Secondly, this application provides a system for converting between highway station numbers and latitude and longitude, including:
[0050] The data acquisition module is used to collect highway station numbers and their corresponding latitude and longitude coordinates and road numbers;
[0051] The coordinate aggregation module is used to convert latitude and longitude coordinates into GeoHash values, and to group latitude and longitude coordinates with the same GeoHash value into the same set, resulting in several latitude and longitude coordinate sets;
[0052] The sequence index building module is used to build sequence indexes of GeoHash values and latitude and longitude coordinate sets, as well as sequence indexes of road numbers and highway station numbers;
[0053] The benchmark point determination module is used to select the three closest consecutive highway stakes as benchmark points based on the target latitude and longitude or the target station number and in combination with the sequence index.
[0054] The conversion processing module is used to determine the degree of road curvature based on the selected reference point. If the road curvature is determined to be a straight road, the station number corresponding to the target latitude and longitude is calculated using trigonometric functions with right angles, or the latitude and longitude corresponding to the target station number. If the road curvature is determined to be a curve, the station number corresponding to the target latitude and longitude is calculated using interpolation, or the latitude and longitude corresponding to the target station number.
[0055] The beneficial technical effects of the present invention include at least the following:
[0056] 1. A method and system for converting highway station numbers to latitude and longitude coordinates is adopted. Through the organic synergy of a series of technical features, such as GeoHash grouping, establishing a dual-sequence index, selecting three reference points based on the dual-sequence index, judging the degree of road curvature based on the selected reference points, and dynamically applying different algorithms to calculate the station number corresponding to the target latitude and longitude coordinates or the latitude and longitude coordinates corresponding to the target station number based on the degree of road curvature, an efficient, accurate and highly adaptable "highway station number - latitude and longitude coordinates" conversion scheme is constructed. The deep coupling between technical features solves the pain points of existing station number positioning methods, such as data redundancy, inefficient indexing, inability to be applied to complex roads, and poor positioning accuracy. It also overcomes technical obstacles such as the accuracy limitations of GeoHash, road topology association, and computing power constraints, and realizes real-time bidirectional conversion of "highway station number - latitude and longitude coordinates" with meter-level accuracy under large-scale highway networks.
[0057] 2. In practical applications, due to the varying degrees of curvature of roads, reference point B may not be located exactly between A and C. Therefore, using the included angle ABC with B as the vertex only reflects the local curvature, not the overall path, which can easily introduce more errors (for example, in the same curve, the included angle ABC is smaller when B is closer to A, and larger when B is closer to C). To address this, this application uses the angle CAB with the minimum mileage road stake A as the vertex as the criterion for judging the degree of road curvature. The direction from A to C represents the main axis of the road extension, which can more stably and consistently reflect the overall degree of road curvature, reduce the interference of the offset of the intermediate stake position, and at the same time, the calculation of the curvature angle is consistent with the mileage logic of the station system, which is more in line with the actual needs of engineering.
[0058] 3. By proposing an adaptive dynamic adjustment strategy for the included angle threshold based on road dynamic characteristics, the differentiated adjustment logic for gentle curves and sharp curves is clarified. The system is dynamically adjusted according to the detection results to form a closed-loop control, which adapts to different road characteristics (such as straight sections of highways and sharp curves in mountainous areas). This avoids the limitations of fixed thresholds under complex road conditions, improves the accuracy and adaptability of road curvature judgment, and helps to further achieve accurate positioning of highway station numbers.
[0059] 4. By combining parametric curve modeling with bidirectional arc length-proportional interpolation, we ensure a one-to-one correspondence between mileage markers and latitude and longitude, avoiding the "cutting curve" error caused by traditional linear interpolation. In curve scenarios, we further realize high-precision bidirectional conversion between latitude and longitude and station number. Specifically, when calculating the station number corresponding to the target latitude and longitude, we use integral calculation to calculate the actual arc length, accurately capturing the geometric characteristics of the curve. When calculating the latitude corresponding to the target station number, we use linear proportional interpolation, reducing the computational complexity while ensuring reasonable accuracy.
[0060] Other features and advantages of the present invention will be disclosed in detail in the following detailed description and accompanying drawings. Attached Figure Description
[0061] The invention will be further described below with reference to the accompanying drawings:
[0062] Figure 1 This is a flowchart illustrating the method for converting highway station numbers to latitude and longitude in an embodiment of the present invention.
[0063] Figure 2 This is a schematic diagram of a scenario under a curve according to an embodiment of the present invention.
[0064] Figure 3 This is a schematic diagram illustrating the principle of calculating the station number corresponding to the latitude and longitude of a target in a straight road scenario according to an embodiment of the present invention.
[0065] Figure 4 This is a schematic diagram illustrating the principle of calculating the latitude and longitude corresponding to the target station number in a straight road scenario according to an embodiment of the present invention.
[0066] Figure 5 This is a schematic diagram of the system for converting highway station numbers to latitude and longitude according to an embodiment of the present invention. Detailed Implementation
[0067] The technical solutions of the embodiments of the present invention will be explained and described below with reference to the accompanying drawings. However, the following embodiments are only preferred embodiments of the present invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments in the implementation methods without creative effort are all within the protection scope of the present invention.
[0068] In the following description, terms such as “inner,” “outer,” “upper,” “lower,” “left,” and “right” are used only to indicate orientation or positional relationship for the convenience of describing the embodiments and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
[0069] Example 1:
[0070] Please see the appendix Figure 1 , Figure 1 This document illustrates a flowchart of a method for converting highway station numbers to latitude and longitude according to an embodiment of this specification.
[0071] like Figure 1 As shown, the method for converting highway station numbers to latitude and longitude may include at least the following steps:
[0072] S1 collects the highway station number and its corresponding latitude and longitude coordinates and road number.
[0073] It is understood that this embodiment uses maps or commercial map services provided by the National Geomatics Center of China to collect highway station numbers and their corresponding latitude and longitude coordinates and road numbers. The highway station numbers collected are only the previously known "kilometer station numbers" and the "hundred-meter station numbers" used in some special road sections (such as sharp bends), and do not include the station number information of structures on the highway (such as toll stations, tunnel entrances, tunnel exits, etc. on both sides of the road).
[0074] For example, in the highway mileage marker "G92 K023+800", G92 is the road number, where "G" indicates a national highway and "92" is the specific route number, meaning "G92" represents the 92nd route of the national highway. K023 is the kilometer marker, where "K" represents kilometers, and "023" indicates the distance in kilometers from the current road's starting point along the current highway direction. "K023" represents the 23rd kilometer mark from the current road's starting point along the current highway direction. +800 is the mileage marker, where "+" indicates the additional distance from the nearest kilometer marker (K023), and "800" indicates 800 meters from kilometer marker K023. "K023+800" represents the position 23 kilometers plus 800 meters from the current road's starting point along the current highway direction. If it were a kilometer marker, it would be "G92 K023+000".
[0075] S2 converts latitude and longitude coordinates into GeoHash values, and groups latitude and longitude coordinates with the same GeoHash value into the same set, resulting in several sets of latitude and longitude coordinates.
[0076] GeoHash is a method that encodes latitude and longitude coordinates into short strings. It can map location information on the Earth's surface into a finite space, so that data points with similar locations have similar codes.
[0077] However, GeoHash also has its limitations, such as boundary issues: GeoHash cells are rectangular, which can lead to inaccurate boundary representations of certain geographic features. Therefore, in this embodiment, converting latitude and longitude coordinates to GeoHash values is only used for initial screening. Typically, a 6-digit GeoHash value is sufficient at the kilometer level; the stationing accuracy to the meter level is obtained through subsequent calculations, thus avoiding the boundary issues inherent in GeoHash itself. For example, in this embodiment, the GeoHash value after latitude and longitude coordinate conversion can use a 6-digit prefix as the standard for the set, placing latitude and longitude coordinates with the same prefix into the same set.
[0078] S3, establish a sequence index of GeoHash values and latitude / longitude coordinate sets, as well as a sequence index of road numbers and highway station numbers.
[0079] For example, the sequential index of GeoHash values and latitude / longitude coordinate sets is established as follows: using the GeoHash value as the key and the latitude / longitude coordinate sets with the same GeoHash value as the value, an inverted index is created. The sequential index of road numbers and highway markers is established as follows: using the road number as the key and the ordered set of kilometer markers or hexagonal markers on the same road (sorted by marker size) as the value, an inverted index is created.
[0080] S4, based on the target latitude and longitude or target station number, combined with the sequence index, selects the three closest consecutive highway stations as reference points.
[0081] It is understood that in this embodiment, based on the target latitude and longitude or target station number, and combined with the corresponding sequence index in the dual sequence index, the three consecutive highway piles closest to the target latitude and longitude or target station number are selected as reference points.
[0082] Specifically, in this embodiment, based on the target latitude and longitude and combined with the sequence index, the three closest consecutive highway stakes are selected as reference points, including:
[0083] Convert the target latitude and longitude to GeoHash values;
[0084] Find the sequence index of GeoHash value and latitude / longitude coordinate set, as well as the sequence index of road number and highway station number, to determine the latitude / longitude coordinate set that corresponds to the GeoHash value of the target latitude / longitude and is on the same road, and record it as the candidate coordinate set;
[0085] Select the three consecutive road piles closest to the target latitude and longitude from the set of candidate coordinates as reference points.
[0086] Understandably, the GeoHash value and the sequence index of the latitude and longitude coordinate set can be used to quickly determine the candidate coordinate set with the same GeoHash value as the target latitude and longitude, with a time complexity of only O(1). Since the candidate coordinate set with the same GeoHash value (such as when taking a prefix of 6 or more digits) usually only contains latitude and longitude coordinates corresponding to a small number of road stakes, the efficiency of selecting the three closest consecutive road stakes from the candidate coordinate set is still high.
[0087] In this embodiment, the dual-sequence index from GeoHash to latitude and longitude coordinate set and from road number to station number forms a spatial-semantic dual constraint, which makes the selection of benchmark points not only based on geographical proximity, but also implicitly includes road topology logic. For example, when the target latitude and longitude is located at the intersection of two parallel highways, GeoHash may group the station numbers of different roads into the same set, while the road number index can further filter the station numbers of unrelated roads to avoid mismatches.
[0088] Since the three road stakes A1, B1, and C1 are consecutive and closest to the target latitude and longitude, and road stake A1 is the road stake with the minimum mileage along the current road direction, it can be known that road stake B1 is the middle road stake among the three consecutive road stakes and is closest to the target latitude and longitude, and road stake C1 is the road stake with the maximum mileage along the current road direction.
[0089] On the other hand, in this embodiment, based on the target station number and combined with the sequence index, the three closest consecutive highway stations are selected as reference points, including:
[0090] Determine the road number where the target station is located based on the target station number;
[0091] Find the sequence index of road number and highway station number, determine the highway station number corresponding to the road number of the target station number, and record it as the set of candidate station numbers;
[0092] Select the three consecutive highway piles closest to the target pile from the pool of candidate piles as reference points.
[0093] Understandably, the ordered kilometer or 100-meter markers on the same road as the target marker can be quickly determined by the sequence index of the road number and the highway marker, with a time complexity of only O(1). Since the candidate marker set with the same road number (e.g., when taking a prefix of 6 or more digits) usually only contains a few highway markers (mostly kilometer markers, with only a few sections containing 100-meter markers), the efficiency of using binary search to select the three closest consecutive highway markers from the candidate marker set is still high.
[0094] The meanings of the three selected highway stakes are similar to those mentioned above, and will not be repeated here.
[0095] S5. Based on the selected benchmark point, determine the degree of road curvature. If the road curvature is determined to be a straight road, the station number corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station number is calculated using trigonometric functions with right angles. If the road curvature is determined to be a curve, the station number corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station number is calculated using interpolation.
[0096] Specifically, in this embodiment, the method for determining the degree of road curvature based on the selected reference point is as follows:
[0097] Based on the latitude and longitude coordinates of reference points A, B, and C, the angle CAB is calculated and used as the road curvature angle.
[0098] Determine if the road curvature angle is less than a preset angle threshold. If the road curvature angle is less than the preset angle threshold, the road is determined to be a straight road. If the road curvature angle is greater than or equal to the preset angle threshold, the road is determined to be a curve.
[0099] The preset included angle threshold is the empirical boundary between straight sections and curves, and its value ranges from 10° to 20°, preferably 15°. Please refer to the appendix for a scene diagram of a curve. Figure 2 .
[0100] Understandably, in practical applications, due to varying degrees of road curvature, reference point B may not be located exactly between A and C. Therefore, using the included angle ABC with B as the vertex only reflects local curvature, not the overall path, which can easily introduce more errors (for example, in the same curve, the included angle ABC is smaller when B is closer to A, and larger when B is closer to C). To address this, this embodiment uses the angle CAB with the minimum mileage road stake A as the vertex as the criterion for judging the degree of road curvature. The direction from A to C represents the main axis of the road extension, which can more stably and consistently reflect the overall degree of road curvature, reduce the interference of intermediate stake position offset, and at the same time, the calculation of the curvature angle is consistent with the mileage logic of the stationing system, which is more in line with the actual needs of engineering.
[0101] Specifically, this embodiment calculates the target latitude and longitude corresponding to the station number or the target station number corresponding to the latitude and longitude based on the judgment result of the road curvature, combined with the benchmark station number and the dynamic selection of trigonometric function right-angle side calculation or interpolation calculation.
[0102] On the one hand, in this embodiment, please refer to the appendix. Figure 3 To determine if a road is straight due to its curvature, the target latitude and longitude are calculated using trigonometric functions with right-angled sides, including:
[0103] S511, draw a perpendicular line from the point T corresponding to the target latitude and longitude to the line connecting the reference points A and B, and denote the intersection point as T1. Then, points A, T, and T1 form a right triangle.
[0104] S512, based on the latitude and longitude coordinates corresponding to T, A, and B, calculates the distance d of the line connecting T and A and the angle TAB between them.
[0105] For example, the method to calculate the distance d between points T and A based on their corresponding latitude and longitude coordinates is as follows: Calculate the difference in longitude and latitude between points T and A, convert this difference into the difference in X and Y coordinates in a Cartesian coordinate system, and then use the Euclidean distance formula to calculate the distance d (in meters) from point T to point A. It is understood that the actual distances between T, A, and B do not differ by more than one kilometer; therefore, the curvature of the Earth's surface can be disregarded, and T, A, and B can be considered as a plane.
[0106] For example, the angle TAB is calculated based on the latitude and longitude coordinates corresponding to T, A, and B as follows: In the angle TAB with A as the vertex, the azimuth angle of T relative to A can be calculated based on the latitude and longitude of T and A, and the azimuth angle of B relative to A can be calculated based on the latitude and longitude of B and A. The angle TAB is the difference between the two azimuth angles.
[0107] S513, based on the distance d and the angle TAB, the distance s between the lines T1 and A is calculated.
[0108] Wherein, the distance between the right-angled sides s = d * cos(∠TAB), in meters.
[0109] S514, calculate the sum of the station number corresponding to the benchmark point A and the distance s, and obtain the station number corresponding to the target latitude and longitude.
[0110] It is understandable that in this embodiment, the conversion accuracy depends on the number of digits in the latitude and longitude coordinates. Usually, taking five decimal places for the latitude and longitude coordinates is sufficient to calculate the station number to the meter level.
[0111] For example, if the reference point A corresponds to station G92 K023+000 and the distance s is 800, then 23000+800, i.e. G92 K023+800, is the station corresponding to the target latitude and longitude.
[0112] On the other hand, in this embodiment, please refer to the appendix. Figure 4 To determine if a road is straight due to its curvature, the latitude and longitude corresponding to the target station are calculated using trigonometric functions with right-angled sides, including:
[0113] S521, calculate the difference between the target station number and the corresponding station number of the benchmark point A to obtain the distance h.
[0114] S522, based on the latitude and longitude coordinates of A and B and the distance h, calculate the latitude and longitude after moving a distance h along the line connecting AB with reference point A as the center, and use it as the latitude and longitude of the target station number.
[0115] Understandably, when the curvature of a road is judged to be that of a straight road, according to the definition of highway station numbers, the line connecting the target station point T with the reference points A and B can be approximated as a straight line.
[0116] For example, the method to calculate the latitude and longitude of the target station based on the latitude and longitude coordinates of A and B and the distance h is as follows: the azimuth of the straight line AB can be calculated based on the latitude and longitude of A and B, and the longitude difference and latitude difference of the point T corresponding to the target station can be calculated based on the distance h and the azimuth of the straight line AB. The longitude difference and latitude difference of the point T corresponding to the target station are added to the latitude and longitude coordinates of A to obtain the latitude and longitude of the point T corresponding to the target station.
[0117] On the one hand, in this embodiment, if the road curvature is determined to be a curve, then the station number corresponding to the target latitude and longitude is calculated using interpolation. This can be achieved as follows:
[0118] S531, based on the latitude and longitude coordinates of the point T corresponding to the target and the latitude and longitude coordinates of the two points closest to T (such as A and B), calculate the straight-line distance between T and A and the straight-line distance between A and B;
[0119] S532, divide the straight-line distance between T and A by the straight-line distance between A and B, and use the quotient as the first interpolation ratio;
[0120] S533, calculate the difference between the station number corresponding to benchmark point B and the station number corresponding to benchmark point A to obtain the curve distance between A and B;
[0121] S534, multiply the curve distance between A and B by the first interpolation ratio, and then add it to the station number corresponding to the reference point A to obtain the station number of the target latitude and longitude point T.
[0122] On the other hand, in this embodiment, if the road curvature is determined to be a curve, then the interpolation method is used to calculate the latitude and longitude corresponding to the target station, including:
[0123] S541, calculate the difference between the station number corresponding to benchmark point B and the station number corresponding to benchmark point A to obtain the curve distance between A and B;
[0124] S542, calculate the difference between the target station number and the corresponding station number of the benchmark point A, and obtain the curve distance between point T and A corresponding to the target station number;
[0125] S543, divide the curve distance between T and A by the curve distance between A and B, and use the quotient as the second interpolation ratio;
[0126] S544, multiply the longitude difference between A and B by the second interpolation ratio, and then add it to the longitude corresponding to the benchmark point A to obtain the longitude of the point T corresponding to the target station number;
[0127] Multiply the latitude difference between A and B by the second interpolation ratio, and then add it to the latitude corresponding to the reference point A to obtain the latitude of the point T corresponding to the target station number.
[0128] In summary, the technical concept of this embodiment is as follows:
[0129] First, it is only necessary to collect the kilometer markers or 100-meter markers on the highway and their corresponding latitude and longitude coordinates and road codes. Then, GeoHash is used to convert the latitude and longitude coordinates into strings. Latitude and longitude coordinates with the same GeoHash value are put into the same set, which reduces data redundancy, improves conversion efficiency, and avoids the high collection cost of dense point collection and the high computational load of clustering iteration in existing technologies.
[0130] However, relying solely on GeoHash can lead to problems such as ambiguous boundaries and insufficient accuracy. To address this, this embodiment establishes a dual-sequence index of GeoHash and latitude and longitude coordinates, as well as road number and station number, giving GeoHash grouping a structured semantic. Specifically, the GeoHash index can quickly lock the candidate coordinate set (time complexity reduced to O(1)), while the road number index is associated with the mileage order of the station number, avoiding full table traversal, which helps to meet the real-time positioning requirements of the highway network. Moreover, the two form a spatial-semantic dual constraint, which makes the selection of benchmark points not only based on geographical proximity but also implicitly contains road topology logic, cleverly realizing the accurate extraction of local linear features of roads and avoiding mismatches. Therefore, the index structure can support parallel processing of multiple roads and multiple lanes, is suitable for processing complex road conditions, and only requires updating the index when adding road segments or highway station numbers, which greatly improves scalability.
[0131] Then, relying directly on the reference points selected by combining the dual-sequence index, the curvature of the road is accurately determined by the angle calculation. Different lightweight algorithms are dynamically selected in conjunction with the road curvature to calculate the station number corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station number. For straight roads, trigonometric functions are used for calculation, and for curves, interpolation is used to calculate, which flexibly copes with different complex road conditions. The station number positioning can be achieved with meter-level accuracy on both straight and curved roads by using five decimal places of latitude and longitude coordinates. This eliminates the accuracy problem of GeoHash and avoids the complex clustering and differential calculations used in existing technologies. It is especially suitable for embedded devices or low computing power scenarios (such as vehicle terminals and mobile applications). At the same time, it avoids the interference introduced by cross-road or long-distance reference points and improves the calculation accuracy of station number positioning. Specifically, in the curve scenario, if the reference point crosses different roads due to index error, the interpolation method will produce significant deviation. However, this embodiment ensures that the reference point comes from the continuous station number of the same road through the cooperative constraint of the dual-sequence index, so that the interpolation ratio truly reflects the relationship between the curve length and the station number increment.
[0132] This embodiment organically coordinates a series of technical features, including GeoHash grouping, establishing a dual-sequence index, selecting three reference points based on the dual-sequence index, determining the road curvature based on the angle CAB with the minimum mileage reference station A as the vertex, and dynamically applying different algorithms based on the road curvature to calculate the station corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station. This constructs an efficient, accurate, and highly adaptable "highway station-latitude and longitude coordinate" conversion scheme. The deep coupling between technical features solves the pain points of existing station positioning methods, such as data redundancy, inefficient indexing, inapplicability to complex roads, and poor positioning accuracy. It overcomes technical obstacles such as GeoHash accuracy limitations, road topology association, and computing power constraints, and realizes real-time bidirectional conversion of "highway station-latitude and longitude coordinates" with meter-level accuracy under large-scale highway networks. Through the triple reconstruction of spatial coding, index structure, and calculation logic, a synergistic effect of "1+1+1>3" is achieved.
[0133] Example 2:
[0134] This embodiment only applies to comparisons with... Figure 1 The differences between this embodiment and the first embodiment will be described separately. The technical concepts of the remaining methods are similar to those in the first embodiment, and will not be repeated here. To further optimize the interaction between different road conditions and angle changes in road curvature determination, this embodiment determines the road curvature based on a selected reference point, including:
[0135] Based on the latitude and longitude coordinates of reference points A, B, and C, the angle CAB is calculated and used as the road curvature angle.
[0136] Set an initial included angle threshold and use a dynamic adjustment strategy to adjust the included angle threshold;
[0137] Determine if the road curvature angle is less than the current angle threshold. If the road curvature angle is less than the current angle threshold, the road is determined to be a straight road. If the road curvature angle is greater than or equal to the current angle threshold, the road is determined to be a curve.
[0138] The initial included angle threshold is the empirical boundary between straight sections and curves, and its value range can be 10° to 20°, preferably 15°.
[0139] Specifically, in this embodiment, a dynamic adjustment strategy is used to adjust the included angle threshold, including:
[0140] When the road curvature angle is detected to be less than the first preset angle threshold N times in a row, the current included angle threshold is increased by the first preset increment to obtain the adjusted included angle threshold, thereby improving the adaptability of the near straight curve and serving as the curve adaptation mode.
[0141] When a road curvature angle is detected to be greater than the second preset angle threshold in a single instance, the current angle threshold is reduced by the second preset increment to obtain the adjusted angle threshold, thereby increasing the sensitivity to sharp bends and serving as the sharp bend sensitivity mode.
[0142] The degree of road curvature is determined based on the adjusted included angle threshold.
[0143] Preferably, the number of detections for continuous straight lines can be 3≤N≤5, the first preset angle threshold can be 5°, the second preset angle threshold can be 45°, and the second preset increment can be greater than the first preset increment. The first preset increment can be 2° and the second preset increment can be 4°. This embodiment does not limit this.
[0144] Furthermore, this embodiment can also add mandatory upper and lower limits for the threshold, such as limiting the upper limit of the included angle threshold to 25° and the lower limit of the included angle threshold to 10°. This embodiment does not limit this.
[0145] Furthermore, this embodiment can also add a threshold recovery strategy, including:
[0146] In the gentle curve adaptation mode, the frequency of occurrence of events where the continuous road curvature angle is less than the first preset angle threshold is recorded;
[0147] When the frequency of occurrence exceeds a preset threshold, a threshold recovery strategy is triggered to reset the current angle threshold to the initial angle threshold.
[0148] This embodiment proposes an adaptive dynamic adjustment strategy for the included angle threshold based on road dynamic characteristics. It clarifies the differentiated adjustment logic for gentle curves and sharp curves, dynamically adjusts according to the detection results, forms a closed-loop control, and adapts to different road characteristics (such as straight sections of highways and sharp curves in mountainous areas). This avoids the limitations of fixed thresholds under complex road conditions, improves the accuracy and adaptability of road curvature judgment, and helps to further achieve accurate positioning of highway station numbers.
[0149] Example 3:
[0150] This embodiment only applies to comparisons with... Figure 1 The differences between this embodiment and the first embodiment will be described separately. The technical concepts of the remaining methods are similar to those in the first embodiment, and will not be repeated here. To further optimize the interpolation calculation of latitude and longitude with station numbers in curves and improve the accuracy of station number positioning in curves, this embodiment, on the one hand, determines the curvature of the road as a curve and uses interpolation to calculate the station number corresponding to the target latitude and longitude, including:
[0151] S551, based on the latitude and longitude coordinates corresponding to the benchmark point, fits the curves of the longitude section and the latitude section where the benchmark point is located.
[0152] The method of fitting the longitude and latitude road segment curves of the selected three reference points based on the latitude and longitude coordinates is similar to the existing method of fitting curves based on multiple coordinate points, and will not be described in detail here.
[0153] S552, based on the longitude and latitude road segment curves, uses integral calculation to obtain the actual arc length from reference point A to the corresponding point T at the target longitude and latitude, and the actual arc length from reference point A to reference point B. For example, taking the target longitude and latitude as (… The benchmark point A is station number The latitude and longitude are ( The benchmark point B is station number The latitude and longitude are ( For example, the actual arc length from reference point A to reference point B. It can be represented as: .
[0154] Where f(s) represents the curve function of the longitude segment where the reference point is located, and g(s) represents the curve function of the latitude segment where the reference point is located.
[0155] S553, the quotient of the actual arc length from benchmark point A to the target latitude and longitude corresponding point T and the actual arc length from benchmark point A to benchmark point B is used to obtain the station correction ratio. ;
[0156] S554, multiply the difference between the station number corresponding to benchmark point A and the station number corresponding to benchmark point B by the station number correction ratio, and then add it to the station number corresponding to benchmark point A to obtain the station number corresponding to the target latitude and longitude. , can be represented as: .
[0157] On the other hand, in this embodiment, the curvature of the road is determined to be a curve, and the latitude and longitude corresponding to the target station number are calculated using interpolation, including:
[0158] S561, the latitude and longitude correction ratio is obtained by quoting the difference between the target station number and the corresponding station number of benchmark point A, and the difference between the corresponding station number of benchmark point B and the corresponding station number of benchmark point A.
[0159] S562, multiply the difference between the longitude coordinates corresponding to benchmark point B and the longitude coordinates corresponding to benchmark point A by the latitude and longitude correction ratio, and then add it to the longitude coordinates corresponding to benchmark point A to obtain the longitude corresponding to the target station number.
[0160] Multiply the difference between the latitude coordinates of reference point B and the latitude coordinates of reference point A by the latitude and longitude correction ratio, and then add it to the latitude coordinates of reference point A to obtain the latitude corresponding to the target station number.
[0161] For example, with the target station number as The benchmark point A has a station number of 1. The latitude and longitude are ( The benchmark point B is station number The latitude and longitude are ( For example, the latitude and longitude corresponding to the target station number can be expressed as: , .
[0162] This embodiment combines parametric curve modeling with bidirectional arc length-proportional interpolation to ensure a one-to-one correspondence between mileage markers and latitude and longitude, avoiding the "cutting curve" error caused by traditional linear interpolation. In curved scenarios, it further achieves high-precision bidirectional conversion between latitude and longitude and station number. Specifically, when calculating the station number corresponding to the target latitude and longitude, the actual arc length is calculated by integration to accurately capture the geometric characteristics of the curve. When calculating the latitude corresponding to the target station number, linear proportional interpolation is used to reduce computational complexity while ensuring reasonable accuracy.
[0163] Example 4:
[0164] Please see the appendix Figure 5 , Figure 5 This is a schematic diagram of a highway station number and latitude / longitude conversion system provided in one embodiment of this specification.
[0165] like Figure 5 As shown, the highway station number to latitude and longitude conversion system can include at least a data acquisition module 1, a coordinate aggregation module 2, a sequence indexing module 3, a benchmark point determination module 4, and a conversion processing module 5, wherein:
[0166] Data acquisition module 1 is used to collect highway station numbers and their corresponding latitude and longitude coordinates and road numbers;
[0167] The coordinate aggregation module 2 is used to convert latitude and longitude coordinates into GeoHash values, and to group latitude and longitude coordinates with the same GeoHash value into the same set, resulting in several latitude and longitude coordinate sets;
[0168] Sequence index building module 3 is used to build sequence indexes of GeoHash values and latitude and longitude coordinate sets, as well as sequence indexes of road numbers and highway station numbers;
[0169] The benchmark point determination module 4 is used to select the three closest consecutive highway stakes as benchmark points based on the target latitude and longitude or the target station number and in combination with the sequence index.
[0170] The conversion processing module 5 is used to determine the degree of road curvature based on the selected reference point. If the road curvature is determined to be a straight road, the station number corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station number is calculated using trigonometric functions. If the road curvature is determined to be a curve, the station number corresponding to the target latitude and longitude or the latitude and longitude corresponding to the target station number is calculated using interpolation.
[0171] It is understood that the technical concept of the highway station number and latitude-longitude conversion system provided in this embodiment is similar to the technical concept of the aforementioned highway station number and latitude-longitude conversion method, and will not be repeated here.
[0172] The above description is merely a preferred embodiment disclosed in this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of protection involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0173] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
Claims
1. A method for converting between highway station numbers and latitude and longitude, characterized in that, Includes the following steps: Collect highway station numbers and their corresponding latitude and longitude coordinates and road numbers; Convert latitude and longitude coordinates to GeoHash values, and group latitude and longitude coordinates with the same GeoHash value into the same set to obtain several sets of latitude and longitude coordinates; Establish sequence indexes for GeoHash values and latitude / longitude coordinate sets, as well as sequence indexes for road numbers and highway station numbers; Based on the target latitude and longitude or target station number, and combined with the sequence index, select the three closest consecutive highway stations as reference points; The degree of road curvature is determined based on the selected benchmark point. If the road curvature is determined to be a straight road, the station number corresponding to the target latitude and longitude is calculated using the right-angled sides of the trigonometric function, or the latitude and longitude corresponding to the target station number. If the road curvature is determined to be a curve, the station number corresponding to the target latitude and longitude is calculated using the interpolation method, or the latitude and longitude corresponding to the target station number.
2. The method for converting highway station numbers to latitude and longitude as described in claim 1, characterized in that, Based on the target latitude and longitude, and combined with the sequence index, the three closest consecutive highway stakes are selected as reference points, including: Convert the target latitude and longitude to GeoHash values; Find the sequence index of GeoHash value and latitude / longitude coordinate set, as well as the sequence index of road number and highway station number, to determine the latitude / longitude coordinate set that corresponds to the GeoHash value of the target latitude / longitude and is on the same road, and record it as the candidate coordinate set; Select the three consecutive road piles closest to the target latitude and longitude from the set of candidate coordinates as reference points.
3. The method for converting highway station numbers to latitude and longitude as described in claim 1, characterized in that, Based on the target station number and combined with the sequence index, the three closest consecutive highway stations are selected as reference points, including: Determine the road number where the target station is located based on the target station number; Find the sequence index of road number and highway station number, determine the highway station number corresponding to the road number of the target station number, and record it as the set of candidate station numbers; Select the three consecutive highway piles closest to the target pile from the pool of candidate piles as reference points.
4. The method for converting between highway station numbers and latitude and longitude as described in any one of claims 2 or 3, characterized in that, The reference points include continuous highway stakes A, B, and C. Reference point A is the minimum mileage highway stake along the current highway direction. The determination of road curvature based on the selected reference points includes: Based on the latitude and longitude coordinates of reference points A, B, and C, the angle CAB is calculated and used as the road curvature angle. Set an initial included angle threshold and use a dynamic adjustment strategy to adjust the included angle threshold; Determine if the road curvature angle is less than the current angle threshold. If the road curvature angle is less than the current angle threshold, the road is determined to be a straight road. If the road curvature angle is greater than or equal to the current angle threshold, the road is determined to be a curve.
5. The method for converting between highway station numbers and latitude and longitude as described in claim 4, characterized in that, The included angle threshold is adjusted using a dynamic adjustment strategy, including: When the road curvature angle is detected to be less than the first preset angle threshold N times in a row, the current included angle threshold is increased by the first preset increment to obtain the adjusted included angle threshold. When a road curvature angle is detected to be greater than the second preset angle threshold in a single instance, the current included angle threshold is reduced by the second preset increment to obtain the adjusted included angle threshold. The degree of road curvature is determined based on the adjusted included angle threshold.
6. The method for converting between highway station numbers and latitude and longitude as described in claim 1, characterized in that, The reference points include continuous highway stakes A, B, and C. Reference point A is the minimum mileage highway stake along the current highway direction. The road curvature is then determined to be straight. The target latitude and longitude are calculated using trigonometric functions with right-angled sides, including: Draw a perpendicular line from the point T corresponding to the target latitude and longitude to the line connecting the reference points A and B. The intersection point is denoted as T1. Then, points A, T, and T1 form a right triangle. Based on the latitude and longitude coordinates corresponding to T, A, and B, the distance d of the line connecting T and A and the angle TAB are calculated. Based on the distance d and the angle TAB, the distance s between the lines T1 and A is calculated. Calculate the sum of the station number corresponding to the benchmark point A and the distance s to obtain the station number corresponding to the target latitude and longitude.
7. The method for converting between highway station numbers and latitude and longitude as described in claim 1, characterized in that, The reference points include continuous highway stakes A, B, and C. Reference point A is the minimum mileage highway stake along the current highway direction. The road curvature is then determined to be straight. The latitude and longitude corresponding to the target stake are calculated using trigonometric functions with right-angled sides, including: Calculate the difference between the target station number and the corresponding station number of the benchmark point A to obtain the distance h; Based on the latitude and longitude coordinates of A and B and the distance h, the latitude and longitude of the target station are calculated after moving a distance h along the line connecting A and B with reference point A as the center.
8. The method for converting between highway station numbers and latitude and longitude as described in claim 1, characterized in that, The reference points include continuous highway stakes A, B, and C. Reference point A is the minimum mileage highway stake along the current highway direction. Therefore, the road curvature is determined to be a curve. Interpolation is used to calculate the stake number corresponding to the target latitude and longitude, including: Based on the latitude and longitude coordinates corresponding to the benchmark point, the longitude road segment curve and the latitude road segment curve where the benchmark point is located are fitted. Based on the longitude and latitude road segment curves, the actual arc length from reference point A to the target longitude and latitude corresponding point T and the actual arc length from reference point A to reference point B are obtained by integral calculation. The station correction ratio is obtained by quoting the actual arc length from benchmark point A to the target latitude and longitude point T and the actual arc length from benchmark point A to benchmark point B. Multiply the difference between the station number corresponding to benchmark point A and the station number corresponding to benchmark point B by the station number correction ratio, and then add it to the station number corresponding to benchmark point A to obtain the station number corresponding to the target latitude and longitude.
9. The method for converting between highway station numbers and latitude and longitude as described in claim 1, characterized in that, The reference points include continuous highway stakes A, B, and C. Reference point A is the minimum mileage highway stake along the current highway direction. Therefore, the road curvature is determined to be a curve. The latitude and longitude corresponding to the target stake are calculated using interpolation, including: The latitude and longitude correction ratio is obtained by quoting the difference between the target station and the corresponding station of benchmark point A, and the difference between the corresponding station of benchmark point B and the corresponding station of benchmark point A. Multiply the difference between the longitude coordinates corresponding to benchmark point B and the longitude coordinates corresponding to benchmark point A by the latitude and longitude correction ratio, and then add it to the longitude coordinates corresponding to benchmark point A to obtain the longitude corresponding to the target station number. Multiply the difference between the latitude coordinates of reference point B and the latitude coordinates of reference point A by the latitude and longitude correction ratio, and then add it to the latitude coordinates of reference point A to obtain the latitude corresponding to the target station number.
10. A system for converting between highway station numbers and latitude and longitude, characterized in that, include: The data acquisition module is used to collect highway station numbers and their corresponding latitude and longitude coordinates and road numbers; The coordinate aggregation module is used to convert latitude and longitude coordinates into GeoHash values, and to group latitude and longitude coordinates with the same GeoHash value into the same set, resulting in several latitude and longitude coordinate sets; The sequence index building module is used to build sequence indexes of GeoHash values and latitude and longitude coordinate sets, as well as sequence indexes of road numbers and highway station numbers; The benchmark point determination module is used to select the three closest consecutive highway stakes as benchmark points based on the target latitude and longitude or the target station number and in combination with the sequence index. The conversion processing module is used to determine the degree of road curvature based on the selected reference point. If the road curvature is determined to be a straight road, the station number corresponding to the target latitude and longitude is calculated using trigonometric functions with right angles, or the latitude and longitude corresponding to the target station number. If the road curvature is determined to be a curve, the station number corresponding to the target latitude and longitude is calculated using interpolation, or the latitude and longitude corresponding to the target station number.
Citation Information
Patent Citations
Method for accurately matching latitude and longitude with stake marks of expressway
CN115329147A
Expressway longitude and latitude stake mark conversion method and device
CN116501816A