Format conversion method for road mile post data and road network data

文档序号:1846547 发布日期:2021-11-16 浏览:24次 中文

阅读说明:本技术 一种道路里程桩数据与路网数据的格式转换方法 (Format conversion method for road mile post data and road network data ) 是由 张业红 顾行发 黄祥志 许王疆 于 2021-08-19 设计创作,主要内容包括:本发明公开了一种道路里程桩数据与路网数据的格式转换方法,本方法针对不同的道路给出了不同的道路上下行的计算方式,建立了图商的道路行驶方向和交通行业管理部门的道路上下行的关联关系,即建立了不同行业的行业术语之间的关联;针对不同的道路给出了不同的道路里程桩号的计算方式;针对不同的道路给出了不同的道路里程桩号的平差公式;实现了一种自动快速的将图商的基于经纬度的路网数据及里程桩数据转换成了交通行业管理部门基于起点桩号和终点桩号的数据,从而让交通行业管理部门可以方便快捷的使用图商的数据。(The invention discloses a format conversion method of road mile post data and road network data, which provides different road uplink and downlink calculation modes aiming at different roads, establishes the incidence relation between the road driving direction of a graph businessman and the road uplink and downlink of a traffic industry management department, namely establishes the incidence relation between the industry terms of different industries; different road mileage stake number calculation modes are given for different roads; giving a balance formula of different road mileage stake numbers aiming at different roads; the map data and the mileage stake data of the map trader based on the longitude and latitude are automatically and quickly converted into the data of the traffic industry management department based on the starting stake number and the ending stake number, so that the traffic industry management department can conveniently and quickly use the data of the map trader.)

1. A format conversion method for road milepost data and road network data is characterized by comprising the following steps:

s100: collecting raw data, the raw data comprising: milepost data and road network data; preprocessing the original data to obtain an original data set;

s200: judging the up-down movement of the road according to the relation between the driving direction of the vehicle and the increasing direction of the position pile number of the mileage pile to obtain the up-down movement SXX of the road; the up-down SXX of the road has three numerical meanings; when SXX ═ 1, indicates an ascending; when SXX is 2, it indicates a down; bi-directional when SXX ═ 3;

s300: calculating the pile numbers of the starting point and the end point of the road section to be updated after the processing of the step S100; during the calculation, the following can occur: the method comprises the following three conditions that a plurality of stake numbers are arranged on a road section to be updated, only one stake number is arranged on the road section to be updated, and no corresponding mileage stake is arranged on the road section to be updated;

s400: carrying out adjustment processing on the road to obtain an adjustment value of the road; and adjusting the mileage pile in the road based on the obtained adjustment value.

2. The method for converting the format of the road milepost data and the road network data according to claim 1, wherein the method comprises the following steps: the preprocessing in the step S100 includes preprocessing milepost data and preprocessing road network data;

the preprocessing of the milepost data comprises:

s101: capturing mileage piles which are not on the road;

s102: deleting wrong mileage piles;

s103: adding corresponding attribute fields based on data of a traffic industry management department, wherein the attribute fields comprise uplink and downlink information, road codes and road names of roads and administrative division information of the roads corresponding to the mileposts;

the preprocessing of the road network data comprises the following steps:

s111: adding corresponding attribute fields based on the attribute fields added in the mile post data, wherein the attribute fields refer to road mile post related information, and the road mile post related information comprises uplink and downlink information, starting point post number information, end point post number information, road codes and road name information;

s112: and checking the connectivity and integrity of all roads according to the route codes, and establishing a collinear table.

3. The method for converting the format of the road milepost data and the road network data according to claim 1, wherein the method comprises the following steps: the step S200 includes:

s201: judging information of a road passing direction and a line drawing direction in the graph-service road network data, and not adjusting the road information when the road passing direction is consistent with the line drawing direction; when the road passing direction is not consistent with the line drawing direction, the pile numbers at the starting point and the end point of the corresponding road are exchanged; wherein the road traffic direction represents an association between a vehicle travel direction and a road marking direction; setting the passing Direction as Direction, wherein the Direction has four numerical meanings, and when the Direction is 0, the passing can be carried out in both directions by default; when the Direction is 1, the two directions can pass; when the Direction is 2, the Direction represents a forward Direction and one-way passing, and the passing Direction is a Direction from a starting point to an end point of the scribing line; when the Direction is 3, the Direction represents the reverse Direction, the traffic is in a single Direction, and the traffic Direction is the Direction from the end point to the starting point of the scribing line;

s202: when the driving direction of the vehicle is consistent with the position pile number increasing direction of the mileage pile, judging that the road is an ascending road; and when the driving direction of the vehicle is opposite to the increasing direction of the position pile numbers of the mileage piles, judging that the road is down.

4. The method for converting the format of the road milepost data and the road network data according to claim 1, wherein the method comprises the following steps: the adjustment processing in step S400 includes the following cases:

s401: for the road section before the minimum mileage stake in the road, the calculation of the stake number of the starting point and the stake number of the end point of the road section is still according to the calculation method of the step S300, the adjustment is not needed, and the value of 0 is taken when the stake number of the mileage stake is less than 0;

s402: for the road section behind the maximum mileage stake in the road, the calculation of the stake numbers of the starting point and the ending point of the road section is also according to the calculation method of the step S300, and the adjustment is not needed;

s403: for the road section between the mileage pile with the minimum position pile number and the mileage pile with the maximum position pile number in the road, assuming that the position pile number of the mileage pile with the minimum pile value is m, and the road section where the mileage pile with the named position pile number of m is located is Lm; assuming that the position pile number of the mileage pile with the maximum pile value is n, and the road section where the mileage pile with the named position pile number n is located is Ln; x road sections are arranged between Lm and Ln, and the lengths of the road sections are dLm +1, dLm +2, … … and dLn-1 respectively; the distance from the mileage pile with the position pile number m in the road section Lm to the starting point of the next road section is dLm; the distance from the mileage pile with the position pile number n in the road section Ln to the terminal point of the previous road section is dLn; performing adjustment processing according to a formula to obtain an adjustment value D, wherein the formula is as follows:

wherein n is not equal to m, and when n is equal to m, the processing is carried out manually; when the number of the road sections X between Lm and Ln is equal to 0, the difference value is equal to Wherein n is not equal to m, and when n is equal to m, the processing is carried out manually;

s404: and adjusting the road mileage pile according to the adjustment value calculated in the step S403.

5. The method for converting the format of the road milepost data and the road network data according to claim 4, wherein the method comprises the following steps: the adjusting the road mileage pile in the step S404 includes:

s411: setting the starting point pile number of Lm as QDZHm and the end point pile number as ZDZHm; the relation between the line drawing direction and the position pile number increasing direction of the mileage pile is dir; the dir has three numerical values, and when the dir is 1, the marking direction and the increment direction of the position stake number of the mileage stake are unknown; when dir is equal to 2, the direction of the drawn line is consistent with the increasing direction of the position stake mark of the mileage stake; when dir is 3, the direction of the drawn line is opposite to the direction of increasing the stake mark of the position of the mileage stake;

when SXX is 1 or SXX is 3 and dir is 2, QDZHm is unchanged, ZDZHm is m + dLm × D; ZDZHm is unchanged when SXX is 2 or SXX is 3 and dir is 3, QDZHm is m + dLm × D;

s412: setting the starting point pile number of Ln as QDZHn and the end point pile number as ZDZHn; ZDZHn is unchanged when SXX is 1 or SXX is 3 and dir is 2, QDZHn is n-dLn × D; when SXX is 2 or SXX is 3 and dir is 3, QDZHn is unchanged, ZDZHn is n-dLn × D;

s413: setting the pile number of the starting point of a road section Lx between Lm and Ln as QDZHx and the pile number of the end point as ZDZHx; supposing that the pile number of the starting point of the previous section is PreQDZH and the pile number of the end point is PreZDZH; when SXX is 1 or SXX is 3 and dir is 2, QDZHx is prezzhh, ZDZHx is QDZHx + dLx D; when SXX is 2 or SXX is 3 and dir is 3, ZDZHx is PreQDZH and QDZHx is ZDZHx + dLx.

6. The method for converting the format of the road milepost data and the road network data according to claim 3, wherein the method comprises the following steps: when a plurality of stake numbers appear on the road section to be updated in the step S300, the calculation steps of the stake number of the starting point and the stake number of the ending point on the road section include:

s301: acquiring starting point position information, end point position information, uplink and downlink information, traffic direction information and line drawing direction information of the road section in an original data set; setting the starting point of the road section as S, the end point as E, the up-down behavior as SXX and the passing Direction as Direction; the relation between the line drawing direction and the increment direction of the position stake number of the mileage stake is dir, the dir has three numerical meanings, and when the dir is equal to 1, the line drawing direction and the increment direction of the position stake number of the mileage stake are unknown; when dir is equal to 2, the direction of the drawn line is consistent with the increasing direction of the position stake mark of the mileage stake; when dir is 3, the direction of the drawn line is opposite to the direction of increasing the stake mark of the position of the mileage stake;

s302: for a plurality of pile numbers on the road section, sequentially calculating the distance length from each pile number to the starting position and the end position of the road section, and locking the pile number information with the shortest distance from the starting position and the end position of the road section; the stake number which is arranged in the road section and has the shortest distance to the S point is Ms, the shortest distance is DMs, and the position stake number of the Ms is iMs; the pile number arranged in the road section and having the shortest distance to the point E is Me, the shortest distance is DME, and the pile number at the position of the Me is iMe;

s303: calculating a starting point stake number QDZH and an end point stake number ZDZH of the road section according to the data in the step S301 and the step S302;

when Dirction is 2 and SXX is 1, QDZH is iMs-DMs and ZDZH is iMs + DMe;

when Dirction is 2 and SXX is 2, QDZH is iMs + DMes, ZDZH is iMe-DMe;

when Dirction is 3 and SXX is 1, QDZH is iMe-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 2, QDZH is iMe + DMe, ZDZH is iMs-DMs;

when Dirction is 1 or 0, SXX is 3, dir is 2, QDZH is iMs-DMs, ZDZH is iMe + DMe;

when Dirction is 1 or 0, SXX is 3, dir is 3, QDZH is iMe-DMe, ZDZH is iMs + DMs.

7. The method for converting the format of the road milepost data and the road network data according to claim 6, wherein the method comprises the following steps: when there is only one stake number on the road section to be updated in the step S300, the step of calculating the stake number of the starting point and the stake number of the ending point on the road section includes:

s311: acquiring starting point position information, end point position information, uplink and downlink information, traffic direction information and line drawing direction information of the road section; setting the starting point of the road section as S, the end point as E, the up-down behavior as SXX and the passing Direction as Direction; setting the pile number of the position of the pile point as iMs; the distance from the stake number to the point S is DMs; the distance from the stake number to the point E is DME;

s312: calculating the starting point stake number QDZH and the end point stake number ZDZH of the road section according to the data in the step S311;

when Dirction is 2 and SXX is 1, QDZH is iMs-DMs and ZDZH is iMs + DMe;

when Dirction is 2 and SXX is 2, QDZH is iMs-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 1, QDZH is iMs-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 2, QDZH is iMs + DMe, ZDZH is iMs-DMs;

when Dirction is 1 or 0, SXX is 3, dir is 2, QDZH is iMs-DMs, ZDZH is iMs + DMe;

when Dirction is 1 or 0, SXX is 3, dir is 3, QDZH is iMs-DMe, ZDZH is iMs + DMs.

8. The method for converting the format of the road milepost data and the road network data according to claim 6, wherein the method comprises the following steps: when no corresponding mileage stake exists on the road section to be updated in the step S300, assigning the starting point stake number and the ending point stake number to the road section according to the road section with the same road code adjacent to the road section;

s321: the road section is named as L2, the pile number of the starting point of the road section L2 is QDZH, the pile number of the end point is ZDZH, the passing Direction is Direction, the up-down behavior is SXX, the length of the road section is dL, and the relation between the line drawing Direction and the position pile number increasing Direction of the mileage pile is dir;

s322: acquiring a previous road segment L1 and a next road segment L3 of the road segment L2; setting the stake number of the starting point of the road section L1 as QDZH1, the stake number of the end point as ZDZH1, the traffic Direction as Direction1, the relation between the drawing line Direction and the increment Direction of the stake number of the position of the mileage stake as dir1, and the up-down behavior as SXX 1; the stake number of the starting point of the road section L3 is QDZH3, the stake number of the terminal point is ZDZH2, the passing Direction is Direction3, the relation between the drawing line Direction and the increment Direction of the stake number of the position of the mileage stake is dir3, and the up-down behavior is SXX 3;

s323: circularly assigning the starting point stake number QDZH and the terminal point stake number ZDZH of the road section L2; the assignment condition comprises the following steps:

when SXX is SXX1 ═ SXX3 ═ 1 or SXX1 ═ SXX3 ═ 3 and dir1 ═ dir3 ═ 2, that is, when all three adjacent segments are ascending, QDZH ═ zzh 1, ZDZH ═ QDZH3 or zzh ═ QDZH + dL;

when SXX is SXX1 ═ SXX3 ═ 2 or SXX ═ SXX1 ═ SXX3 ═ 3 and dir ═ dir1 ═ dir3 ═ 3, that is, when all three adjacent segments are descending, QDZH ═ zzh 1, zzh ═ QDZH3 or zzh ═ QDZH-dL;

when SXX is 1, or SXX is 3 and dir is 2, SXX1 is 1, or SXX1 is 3 and dir1 is 2, SXX3 is not equal to 1, that is, the first two links of the adjacent three-way segment are both ascending, and the third link is descending, QDZH is zzh 1, ZDZH is QDZH + dL;

when SXX1 is not equal to 1, SXX1 is 3 and dir1 is not equal to 2, SXX is 1 or SXX is 3 and dir is 2, SXX3 is 1 or SXX3 is 3 and dir3 is 2, namely, when the last two sections of the adjacent three sections are consistent in direction and are upward, and the first section is not upward, ZDZH is QDZH3, and QDZH is zdh-dL;

when SXX is 2, SXX is 3, dir is 3, SXX1 is 2, SXX1 is 3, dir1 is 3, SXX3 is not equal to 2, SXX3 is 3, dir3 is not equal to 2, namely, the first two sections of the adjacent three sections are consistent in direction and go downwards, and the third section is not going upwards, ZDZH is QDZH1, and QDZH is zzh + dL;

when SXX1 is not equal to 2, SXX1 is 3, dir1 is not equal to 2, SXX is 3, dir is 3, SXX3 is 2, SXX3 is 3, dir3 is 3, that is, when the two subsequent segments of the adjacent three segments are consistent in direction and are all going down, and the first segment is not going down, QDZH is zh3, and zzh is QDZH-dL.

9. The method for converting the format of the road milepost data and the road network data according to claim 8, wherein the method comprises the following steps: the cyclic assignment process in step S323 is stopped until the total number of the road segments in which the values of the start point stake number and the end point stake number in the road segment to be updated are 0 is not reduced.

Technical Field

The invention belongs to the technical field of road data conversion, and particularly relates to a format conversion method of road milepost data and road network data.

Background

Due to the business requirements of map businessmen, data can be updated for many times every year, the timeliness, the accuracy and the richness of the data are good, but since the map businessmen mainly face automobile manufacturers and public users of the Internet, the map businessmen use the longitude and latitude for positioning, and map data of the map businessmen use the encrypted longitude and latitude for positioning; the management of the traffic industry department adopts mileage pile data to manage the business, the conventional road network daily operation monitoring, major emergency early warning and emergency disposal technical support, road traffic trip information service, road network road condition monitoring and cost management work all adopt mileage piles to position and manage, the management department cannot frequently update the conventional spatial data to ensure the timeliness and the accuracy of the data due to the limitation of various conditions, and the conventional map business data adopts encrypted longitude and latitude coordinates (02 coordinate system), so that the map business data cannot be provided for the traffic industry department to use.

Disclosure of Invention

The present invention is directed to a format conversion method for road milepost data and road network data, so as to solve the problems in the background art.

In order to solve the technical problems, the invention provides the following technical scheme: a format conversion method for road mile post data and road network data comprises the following steps:

s100: collecting raw data, the raw data comprising: milepost data and road network data; preprocessing original data to obtain an original data set;

s200: judging the up-down movement of the road according to the relation between the driving direction of the vehicle and the increasing direction of the position pile number of the mileage pile to obtain the up-down movement SXX of the road; the uplink and downlink SXX of the road has three numerical meanings; when SXX ═ 1, indicates an ascending; when SXX is 2, it indicates a down; bi-directional when SXX ═ 3;

s300: calculating the pile numbers of the starting point and the end point of the road section to be updated after the processing of the step S100; during the calculation, the following can occur: the method comprises the following three conditions that a plurality of stake numbers are arranged on a road section to be updated, only one stake number is arranged on the road section to be updated, and no corresponding mileage stake is arranged on the road section to be updated;

s400: carrying out adjustment processing on the road to obtain an adjustment value of the road; and adjusting the mileage pile in the road based on the obtained adjustment value.

Further, the preprocessing in step S100 includes preprocessing the milepost data and preprocessing the road network data;

the preprocessing of the milepost data comprises the following steps:

s101: capturing mileage piles which are not on the road;

s102: deleting wrong mileage piles;

s103: adding corresponding attribute fields based on data of a traffic industry management department, wherein the attribute fields comprise uplink and downlink information, road codes and road names of roads and administrative division information of the roads corresponding to the mileposts;

the preprocessing of the road network data comprises the following steps:

s111: adding corresponding attribute fields based on the attribute fields added in the mile post data, wherein the attribute fields refer to road mile post related information, and the road mile post related information comprises uplink and downlink information, starting point post number information, end point post number information, road codes and road name information;

s112: checking the connectivity and integrity of all roads according to the route codes, and establishing a collinear table;

the preprocessing of the milepost data and the preprocessing of the road network data are used for preparing data for the subsequent conversion of data formats, perfecting data information in a database, and obtaining complete and accurate data finally.

Further, step S200 includes:

s201: judging information of a road passing direction and a line drawing direction in the graph-businessman road network data, and not adjusting the road information when the road passing direction is consistent with the line drawing direction; when the road passing direction is not consistent with the line drawing direction, the pile numbers of the starting point and the end point of the corresponding road are exchanged; wherein the road traffic direction represents the incidence relation between the vehicle driving direction and the road marking direction; setting the passing Direction as Direction, wherein the Direction has four numerical meanings, and when the Direction is 0, the passing can be carried out in both directions by default; when the Direction is 1, the two directions can pass; when the Direction is 2, the Direction represents a forward Direction and one-way passing, and the passing Direction is a Direction from a starting point to an end point of the scribing line; when the Direction is 3, the Direction represents the reverse Direction, the traffic is in a single Direction, and the traffic Direction is the Direction from the end point to the starting point of the scribing line;

s202: when the driving direction of the vehicle is consistent with the position pile number increasing direction of the mileage pile, judging that the road is an ascending road; when the driving direction of the vehicle is opposite to the increasing direction of the position pile numbers of the mileage piles, the road is judged to be down;

the adjustment of the mileage stake mark number information in the road information is to obtain the judgment of the up-down going of the road, and the judgment of the up-down going of the road is to calculate the mileage stake mark number in the road section to be updated subsequently.

Further, the adjustment processing in step S400 includes the following cases:

s401: for the road section before the minimum mileage stake in the road, the calculation of the starting stake number and the end stake number of the road section is still according to the calculation method of the step S300, the adjustment is not needed, and the value of 0 is taken when the stake number of the mileage stake is less than 0;

s402: for the road section behind the maximum mileage stake in the road, the calculation of the stake numbers of the starting point and the ending point of the road section is also according to the calculation method of the step S300, and the adjustment is not needed;

s403: for the road section between the mileage pile with the minimum position pile number and the mileage pile with the maximum position pile number in the road, assuming that the position pile number of the mileage pile with the minimum pile value is m, and the road section where the mileage pile with the named position pile number of m is located is Lm; assuming that the position pile number of the mileage pile with the maximum pile value is n, and the road section where the mileage pile with the named position pile number n is located is Ln; x road sections are arranged between Lm and Ln, and the lengths of the road sections are dLm +1, dLm +2, … … and dLn-1 respectively; the distance from the mileage pile with the position pile number m in the road section Lm to the starting point of the next road section is dLm; the distance from the mileage pile with the position pile number n in the road section Ln to the terminal point of the previous road section is dLn; performing adjustment processing according to a formula to obtain an adjustment value D, wherein the formula is as follows:

wherein n is not equal to m, and when n is equal to m, the processing is carried out manually; when the number of the road sections X between Lm and Ln is equal to 0, the difference value is adjustedWherein n is not equal to m, and when n is equal to m, the processing is carried out manually;

s404: adjusting the road mileage pile according to the adjustment value calculated in the step S403;

the manual processing is introduced in step S403 because when n ═ m occurs, the stake numbers of the positions representing the two mileage stakes are the same, that is, the stake numbers are repeated; the reason for carrying out adjustment processing on the road is that the D values of every two mileage piles are different, and the adjustment values among the mileage piles are calculated by spanning the mileage piles once, so that the adjusted data can be still not well matched with the mileage piles; therefore, when n is m, only one of the pairs can be manually judged, the other pair can be judged as a wrong one, then the wrong pair is deleted, and the pair is reserved, so that the situation that the calculated starting and stopping point pile numbers are all larger than 12 or all smaller than 12 under the condition that the position pile number of the mileage pile is assumed to be 12 can be avoided, namely the starting and stopping point pile numbers do not contain the position pile number;

after adjustment calculation, the connection of the pile numbers at the head and the tail of the whole road is ensured, and meanwhile, the numerical value of the position pile number of the road section with the position pile number is basically ensured to be positioned between the pile numbers of the starting point and the stopping point of the road section.

Further, the adjusting the road mileage pile in step S404 includes:

s411: setting the starting point pile number of Lm as QDZHm and the end point pile number as ZDZHm; the relation between the line drawing direction and the position pile number increasing direction of the mileage pile is dir; dir has three numerical meanings, and when dir is 1, the marking direction and the increment direction of the position stake number of the mileage stake are unknown; when dir is equal to 2, the direction of the drawn line is consistent with the increasing direction of the position stake mark of the mileage stake; when dir is 3, the direction of the drawn line is opposite to the direction of increasing the stake mark of the position of the mileage stake;

when SXX is 1 or SXX is 3 and dir is 2, QDZHm is unchanged, ZDZHm is m + dLm × D; ZDZHm is unchanged when SXX is 2 or SXX is 3 and dir is 3, QDZHm is m + dLm × D;

s412: setting the starting point pile number of Ln as QDZHn and the end point pile number as ZDZHn; ZDZHn is unchanged when SXX is 1 or SXX is 3 and dir is 2, QDZHn is n-dLn × D; when SXX is 2 or SXX is 3 and dir is 3, QDZHn is unchanged, ZDZHn is n-dLn × D;

s413: setting the pile number of the starting point of a road section Lx between Lm and Ln as QDZHx and the pile number of the end point as ZDZHx; supposing that the pile number of the starting point of the previous section is PreQDZH and the pile number of the end point is PreZDZH; when SXX is 1 or SXX is 3 and dir is 2, QDZHx is prezzhh, ZDZHx is QDZHx + dLx D; when SXX is 2 or SXX is 3 and dir is 3, ZDZHx is PreQDZH and QDZHx is ZDZHx + dLx.

Further, when there are a plurality of stake numbers on the road section to be updated in step S300, the step of calculating the stake number of the starting point and the stake number of the ending point on the road section includes:

s301: acquiring starting point position information, end point position information, uplink and downlink information, traffic direction information and line drawing direction information of the road section in an original data set; setting the starting point of the road section as S, the end point as E, the up-down behavior as SXX and the passing Direction as Direction; the relation between the line drawing direction and the increment direction of the position stake number of the mileage stake is dir, dir has three numerical meanings, and when dir is equal to 1, the unknown line drawing direction and the increment direction of the position stake number of the mileage stake are shown; when dir is equal to 2, the direction of the drawn line is consistent with the increasing direction of the position stake mark of the mileage stake; when dir is 3, the direction of the drawn line is opposite to the direction of increasing the stake mark of the position of the mileage stake;

s302: for a plurality of pile numbers on the road section, sequentially calculating the distance length from each pile number to the starting position and the end position of the road section, and locking the pile number information with the shortest distance from the starting position and the end position of the road section; the stake number which is arranged in the road section and has the shortest distance to the S point is Ms, the shortest distance is DMs, and the position stake number of the Ms is iMs; the pile number arranged in the section with the shortest distance to the point E is Me, the shortest distance is DME, and the pile number at the position of the Me is iMe;

s303: calculating a starting point stake number QDZH and an end point stake number ZDZH of the road section according to the data in the step S301 and the step S302;

when Dirction is 2 and SXX is 1, QDZH is iMs-DMs and ZDZH is iMs + DMe;

when Dirction is 2 and SXX is 2, QDZH is iMs + DMes, ZDZH is iMe-DMe;

when Dirction is 3 and SXX is 1, QDZH is iMe-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 2, QDZH is iMe + DMe, ZDZH is iMs-DMs;

when Dirction is 1 or 0, SXX is 3, dir is 2, QDZH is iMs-DMs, ZDZH is iMe + DMe;

when Dirction is 1 or 0, SXX is 3, dir is 3, QDZH is iMe-DMe, ZDZH is iMs + DMs.

Further, when there is only one stake number on the road section to be updated in step S300, the step of calculating the stake number at the starting point and the stake number at the ending point on the road section includes:

s311: acquiring starting point position information, end point position information, uplink and downlink information, traffic direction information and line drawing direction information of the road section; setting the starting point of the road section as S, the end point as E, the up-down behavior as SXX and the passing Direction as Direction; setting the pile number of the position of the pile point as iMs; the distance from the stake number to the point S is DMs; the distance from the stake number to the point E is DME;

s312: calculating a starting point stake number QDZH and an end point stake number ZDZH of the road section according to the data in the step S311;

when Dirction is 2 and SXX is 1, QDZH is iMs-DMs and ZDZH is iMs + DMe;

when Dirction is 2 and SXX is 2, QDZH is iMs-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 1, QDZH is iMs-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 2, QDZH is iMs + DMe, ZDZH is iMs-DMs;

when Dirction is 1 or 0, SXX is 3, dir is 2, QDZH is iMs-DMs, ZDZH is iMs + DMe;

when Dirction is 1 or 0, SXX is 3, dir is 3, QDZH is iMs-DMe, ZDZH is iMs + DMs.

Further, when no corresponding mileage stake exists on the road segment to be updated in the step S300, assigning a starting stake number and an ending stake number to the road segment according to the road segment with the same road code adjacent to the road segment;

s321: the road section is named as L2, the pile number of the starting point of the road section L2 is QDZH, the pile number of the end point is ZDZH, the passing Direction is Direction, the up-down behavior is SXX, the length of the road section is dL, and the relation between the line drawing Direction and the position pile number increasing Direction of the mileage pile is dir;

s322: acquiring a previous road segment L1 and a next road segment L3 of the road segment L2; setting the stake number of the starting point of the road section L1 as QDZH1, the stake number of the end point as ZDZH1, the traffic Direction as Direction1, the relation between the drawing line Direction and the increment Direction of the stake number of the position of the mileage stake as dir1, and the up-down behavior as SXX 1; the stake number of the starting point of the road section L3 is QDZH3, the stake number of the terminal point is ZDZH2, the passing Direction is Direction3, the relation between the drawing line Direction and the increment Direction of the stake number of the position of the mileage stake is dir3, and the up-down behavior is SXX 3;

s323: circularly assigning the starting point stake number QDZH and the terminal point stake number ZDZH of the road section L2; the assignment situation comprises the following steps:

when SXX is SXX1 ═ SXX3 ═ 1 or SXX1 ═ SXX3 ═ 3 and dir1 ═ dir3 ═ 2, that is, when all three adjacent segments are ascending, QDZH ═ zzh 1, ZDZH ═ QDZH3 or zzh ═ QDZH + dL;

when SXX is SXX1 ═ SXX3 ═ 2 or SXX ═ SXX1 ═ SXX3 ═ 3 and dir ═ dir1 ═ dir3 ═ 3, that is, when all three adjacent segments are descending, QDZH ═ zzh 1, zzh ═ QDZH3 or zzh ═ QDZH-dL;

when SXX is 1, or SXX is 3 and dir is 2, SXX1 is 1, or SXX1 is 3 and dir1 is 2, SXX3 is not equal to 1, that is, the first two links of the adjacent three-way segment are both ascending, and the third link is descending, QDZH is zzh 1, ZDZH is QDZH + dL;

when SXX1 is not equal to 1, SXX1 is 3 and dir1 is not equal to 2, SXX is 1 or SXX is 3 and dir is 2, SXX3 is 1 or SXX3 is 3 and dir3 is 2, namely, when the last two sections of the adjacent three sections are consistent in direction and are upward, and the first section is not upward, ZDZH is QDZH3, and QDZH is zdh-dL;

when SXX is 2, SXX is 3, dir is 3, SXX1 is 2, SXX1 is 3, dir1 is 3, SXX3 is not equal to 2, SXX3 is 3, dir3 is not equal to 2, namely, the first two sections of the adjacent three sections are consistent in direction and go downwards, and the third section is not going upwards, ZDZH is QDZH1, and QDZH is zzh + dL;

when SXX1 is not equal to 2, SXX1 is 3, dir1 is not equal to 2, SXX is 3, dir is 3, SXX3 is 2, SXX3 is 3, dir3 is 3, namely, when the last two sections in the adjacent three sections are consistent in direction and are both downlink, and the first section is not downlink, QDZH is zzh 3, ZDZH is qdzzh-dL;

the road section has no corresponding mileage stake, one is that the road has no mileage stake, the other is that the road code of the mileage stake is different from the road code of the road; the former condition is very common, because the mile piles of the current road are basically mile piles, namely one mile is buried, and the sections of a plurality of roads are less than one mile, the mile piles are not arranged on the mile piles, or the mile piles are not arranged before the No. 0 pile of the road, and the mile piles are dug away and buried again when the new road is newly repaired, or the mile piles are buried or abandoned and re-routed roads are not available; the latter situation is very common on collinear roads, because the collinear roads have two or more than two, more than two or even 6-7 corresponding road names and codes, and only one mileage pile can be buried on site and can only correspond to one road, theoretically, if the site mileage pile contains a highway or a national level number, but a small number of collinear roads exist, and although the site mileage pile contains a highway or a national level, the site mileage pile is the mileage pile code of a provincial road or a county road, the situation is solved in the invention, so that a database finally completing format conversion is complete and has no omission.

Further, the cyclic assignment process in step S324 is stopped until the total number of the road segments in which the values of the start pile number and the end pile number in the road segment to be updated are 0 is not reduced;

through the cyclic assignment process, the road sections of the whole road can be assigned with proper starting and stopping point pile number values, but because some roads in the actual road cannot be assigned due to historical reasons or the reasons of being built, a cycle needs to be limited, useless steps in the process of operating the method are reduced by limiting the cyclic assignment process, and the data burden of operators or systems is reduced.

Compared with the prior art, the invention has the following beneficial effects: the invention provides different calculation modes of the up-down movement of the road aiming at different roads, establishes the incidence relation between the road driving direction of a graph businessman and the up-down movement of the road of a traffic industry management department, namely establishes the correlation between industry terms of different industries; different road mileage stake number calculation modes are given for different roads; giving a balance formula of different road mileage stake numbers aiming at different roads; the map data and the milepost data based on the longitude and the latitude of the map provider are automatically and quickly converted into the data based on the starting point post number and the end point post number of the traffic industry management department, so that the traffic industry management department can conveniently and quickly use the data of the map provider.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:

fig. 1 is a schematic flow chart of a format conversion method of road milepost data and road network data according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1, the present invention provides a technical solution: a format conversion method for road mile post data and road network data comprises the following steps:

s100: collecting raw data, the raw data comprising: milepost data and road network data; preprocessing original data to obtain an original data set;

the preprocessing in the step S100 includes preprocessing milepost data and preprocessing road network data;

the preprocessing of the milepost data comprises the following steps:

s101: capturing mileage piles which are not on the road;

s102: deleting wrong mileage piles;

s103: adding corresponding attribute fields based on data of a traffic industry management department, wherein the attribute fields comprise uplink and downlink information, road codes and road names of roads and administrative division information of the roads corresponding to the mileposts;

the preprocessing of the road network data comprises the following steps:

s111: adding corresponding attribute fields based on the attribute fields added in the mile post data, wherein the attribute fields refer to road mile post related information, and the road mile post related information comprises uplink and downlink information, starting point post number information, end point post number information, road codes and road name information;

s112: checking the connectivity and integrity of all roads according to the route codes, and establishing a collinear table;

s200: judging the up-down movement of the road according to the relation between the driving direction of the vehicle and the increasing direction of the position pile number of the mileage pile to obtain the up-down movement SXX of the road; the uplink and downlink SXX of the road has three numerical meanings; when SXX ═ 1, indicates an ascending; when SXX is 2, it indicates a down; bi-directional when SXX ═ 3;

wherein, step S200 includes:

s201: judging information of a road passing direction and a line drawing direction in the graph-businessman road network data, and not adjusting the road information when the road passing direction is consistent with the line drawing direction; when the road passing direction is not consistent with the line drawing direction, the pile numbers of the starting point and the end point of the corresponding road are exchanged; wherein the road traffic direction represents the incidence relation between the vehicle driving direction and the road marking direction; setting the passing Direction as Direction, wherein the Direction has four numerical meanings, and when the Direction is 0, the passing can be carried out in both directions by default; when the Direction is 1, the two directions can pass; when the Direction is 2, the Direction represents a forward Direction and one-way passing, and the passing Direction is a Direction from a starting point to an end point of the scribing line; when the Direction is 3, the Direction represents the reverse Direction, the traffic is in a single Direction, and the traffic Direction is the Direction from the end point to the starting point of the scribing line;

s202: when the driving direction of the vehicle is consistent with the position pile number increasing direction of the mileage pile, judging that the road is an ascending road; and when the driving direction of the vehicle is opposite to the increasing direction of the position pile numbers of the mileage piles, judging that the road is down.

S300: calculating the pile numbers of the starting point and the end point of the road section to be updated after the processing of the step S100; during the calculation, the following can occur: the method comprises the following three conditions that a plurality of stake numbers are arranged on a road section to be updated, only one stake number is arranged on the road section to be updated, and no corresponding mileage stake is arranged on the road section to be updated;

when a plurality of stake numbers appear on the road section to be updated in step S300, the calculation steps of the starting stake number and the ending stake number on the road section include:

s301: acquiring starting point position information, end point position information, uplink and downlink information, traffic direction information and line drawing direction information of the road section in an original data set; setting the starting point of the road section as S, the end point as E, the up-down behavior as SXX and the passing Direction as Direction; the relation between the line drawing direction and the increment direction of the position stake number of the mileage stake is dir, dir has three numerical meanings, and when dir is equal to 1, the unknown line drawing direction and the increment direction of the position stake number of the mileage stake are shown; when dir is equal to 2, the direction of the drawn line is consistent with the increasing direction of the position stake mark of the mileage stake; when dir is 3, the direction of the drawn line is opposite to the direction of increasing the stake mark of the position of the mileage stake;

s302: for a plurality of pile numbers on the road section, sequentially calculating the distance length from each pile number to the starting position and the end position of the road section, and locking the pile number information with the shortest distance from the starting position and the end position of the road section; the stake number which is arranged in the road section and has the shortest distance to the S point is Ms, the shortest distance is DMs, and the position stake number of the Ms is iMs; the pile number arranged in the section with the shortest distance to the point E is Me, the shortest distance is DME, and the pile number at the position of the Me is iMe;

s303: calculating a starting point stake number QDZH and an end point stake number ZDZH of the road section according to the data in the step S301 and the step S302;

when Dirction is 2 and SXX is 1, QDZH is iMs-DMs and ZDZH is iMs + DMe;

when Dirction is 2 and SXX is 2, QDZH is iMs + DMes, ZDZH is iMe-DMe;

when Dirction is 3 and SXX is 1, QDZH is iMe-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 2, QDZH is iMe + DMe, ZDZH is iMs-DMs;

when Dirction is 1 or 0, SXX is 3, dir is 2, QDZH is iMs-DMs, ZDZH is iMe + DMe;

when Dirction is 1 or 0, SXX is 3, dir is 3, QDZH is iMe-DMe, ZDZH is iMs + DMs.

When there is only one stake number on the road section to be updated in step S300, the step of calculating the stake number at the starting point and the stake number at the ending point on the road section includes:

s311: acquiring starting point position information, end point position information, uplink and downlink information, traffic direction information and line drawing direction information of the road section; setting the starting point of the road section as S, the end point as E, the up-down behavior as SXX and the passing Direction as Direction; setting the pile number of the position of the pile point as iMs; the distance from the stake number to the point S is DMs; the distance from the stake number to the point E is DME;

s312: calculating a starting point stake number QDZH and an end point stake number ZDZH of the road section according to the data in the step S311;

when Dirction is 2 and SXX is 1, QDZH is iMs-DMs and ZDZH is iMs + DMe;

when Dirction is 2 and SXX is 2, QDZH is iMs-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 1, QDZH is iMs-DMe, ZDZH is iMs + DMs;

when Dirction is 3 and SXX is 2, QDZH is iMs + DMe, ZDZH is iMs-DMs;

when Dirction is 1 or 0, SXX is 3, dir is 2, QDZH is iMs-DMs, ZDZH is iMs + DMe;

when Dirction is 1 or 0, SXX is 3, dir is 3, QDZH is iMs-DMe, ZDZH is iMs + DMs.

When no corresponding mileage stake exists on the road section to be updated in the step S300, assigning a starting point stake number and an end point stake number to the road section according to the road section with the same road code adjacent to the road section;

s321: the road section is named as L2, the pile number of the starting point of the road section L2 is QDZH, the pile number of the end point is ZDZH, the passing Direction is Direction, the up-down behavior is SXX, the length of the road section is dL, and the relation between the line drawing Direction and the position pile number increasing Direction of the mileage pile is dir;

s322: acquiring a previous road segment L1 and a next road segment L3 of the road segment L2; setting the stake number of the starting point of the road section L1 as QDZH1, the stake number of the end point as ZDZH1, the traffic Direction as Direction1, the relation between the drawing line Direction and the increment Direction of the stake number of the position of the mileage stake as dir1, and the up-down behavior as SXX 1; the stake number of the starting point of the road section L3 is QDZH3, the stake number of the terminal point is ZDZH2, the passing Direction is Direction3, the relation between the drawing line Direction and the increment Direction of the stake number of the position of the mileage stake is dir3, and the up-down behavior is SXX 3;

s323: circularly assigning the starting point stake number QDZH and the terminal point stake number ZDZH of the road section L2; the assignment situation comprises the following steps:

when SXX is SXX1 ═ SXX3 ═ 1 or SXX1 ═ SXX3 ═ 3 and dir1 ═ dir3 ═ 2, that is, when all three adjacent segments are ascending, QDZH ═ zzh 1, ZDZH ═ QDZH3 or zzh ═ QDZH + dL;

when SXX is SXX1 ═ SXX3 ═ 2 or SXX ═ SXX1 ═ SXX3 ═ 3 and dir ═ dir1 ═ dir3 ═ 3, that is, when all three adjacent segments are descending, QDZH ═ zzh 1, zzh ═ QDZH3 or zzh ═ QDZH-dL;

when SXX is 1, or SXX is 3 and dir is 2, SXX1 is 1, or SXX1 is 3 and dir1 is 2, SXX3 is not equal to 1, that is, the first two links of the adjacent three-way segment are both ascending, and the third link is descending, QDZH is zzh 1, ZDZH is QDZH + dL;

when SXX1 is not equal to 1, SXX1 is 3 and dir1 is not equal to 2, SXX is 1 or SXX is 3 and dir is 2, SXX3 is 1 or SXX3 is 3 and dir3 is 2, namely, when the last two sections of the adjacent three sections are consistent in direction and are upward, and the first section is not upward, ZDZH is QDZH3, and QDZH is zdh-dL;

when SXX is 2, SXX is 3, dir is 3, SXX1 is 2, SXX1 is 3, dir1 is 3, SXX3 is not equal to 2, SXX3 is 3, dir3 is not equal to 2, namely, the first two sections of the adjacent three sections are consistent in direction and go downwards, and the third section is not going upwards, ZDZH is QDZH1, and QDZH is zzh + dL;

when SXX1 is not equal to 2, SXX1 is 3, dir1 is not equal to 2, SXX is 3, dir is 3, SXX3 is 2, SXX3 is 3, dir3 is 3, that is, when the two subsequent segments of the adjacent three segments are consistent in direction and are all going down, and the first segment is not going down, QDZH is zh3, and zzh is QDZH-dL.

The cyclic assignment process is stopped until the total number of the road sections with the values of the starting point pile number and the terminal point pile number being 0 in the road section to be updated is not reduced;

s400: carrying out adjustment processing on the road to obtain an adjustment value of the road; and adjusting the mileage pile in the road based on the obtained adjustment value.

The adjustment processing in step S400 includes the following steps:

s401: for the road section before the minimum mileage stake in the road, the calculation of the starting stake number and the end stake number of the road section is still according to the calculation method of the step S300, the adjustment is not needed, and the value of 0 is taken when the stake number of the mileage stake is less than 0;

s402: for the road section behind the maximum mileage stake in the road, the calculation of the stake numbers of the starting point and the ending point of the road section is also according to the calculation method of the step S300, and the adjustment is not needed;

s403: for the road section between the mileage pile with the minimum position pile number and the mileage pile with the maximum position pile number in the road, assuming that the position pile number of the mileage pile with the minimum pile value is m, and the road section where the mileage pile with the named position pile number of m is located is Lm; assuming that the position pile number of the mileage pile with the maximum pile value is n, and the road section where the mileage pile with the named position pile number n is located is Ln; x road sections are arranged between Lm and Ln, and the lengths of the road sections are dLm +1, dLm +2, … … and dLn-1 respectively; the distance from the mileage pile with the position pile number m in the road section Lm to the starting point of the next road section is dLm; the distance from the mileage pile with the position pile number n in the road section Ln to the terminal point of the previous road section is dLn; performing adjustment processing according to a formula to obtain an adjustment value D, wherein the formula is as follows:

wherein n is not equal to m, and when n is equal to m, the processing is carried out manually; when the number of the road sections X between Lm and Ln is equal to 0, the difference value is adjustedWherein n is not equal to m, and when n is equal to m, the processing is carried out manually;

s404: adjusting the road mileage pile according to the adjustment value calculated in step S403, including:

s411: setting the starting point pile number of Lm as QDZHm and the end point pile number as ZDZHm; the relation between the line drawing direction and the position pile number increasing direction of the mileage pile is dir; dir has three numerical meanings, and when dir is 1, the marking direction and the increment direction of the position stake number of the mileage stake are unknown; when dir is equal to 2, the direction of the drawn line is consistent with the increasing direction of the position stake mark of the mileage stake; when dir is 3, the direction of the drawn line is opposite to the direction of increasing the stake mark of the position of the mileage stake;

when SXX is 1 or SXX is 3 and dir is 2, QDZHm is unchanged, ZDZHm is m + dLm × D; ZDZHm is unchanged when SXX is 2 or SXX is 3 and dir is 3, QDZHm is m + dLm × D;

s412: setting the starting point pile number of Ln as QDZHn and the end point pile number as ZDZHn; ZDZHn is unchanged when SXX is 1 or SXX is 3 and dir is 2, QDZHn is n-dLn × D; when SXX is 2 or SXX is 3 and dir is 3, QDZHn is unchanged, ZDZHn is n-dLn × D;

s413: setting the pile number of the starting point of a road section Lx between Lm and Ln as QDZHx and the pile number of the end point as ZDZHx; supposing that the pile number of the starting point of the previous section is PreQDZH and the pile number of the end point is PreZDZH; when SXX is 1 or SXX is 3 and dir is 2, QDZHx is prezzhh, ZDZHx is QDZHx + dLx D; when SXX is 2 or SXX is 3 and dir is 3, ZDZHx is PreQDZH and QDZHx is ZDZHx + dLx.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:三维空间内的线性文本布局方法、电子装置及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!