The oiling of urban traffic road network is up to index construction method
Technical field
The invention belongs to navigator fix and intelligent transportation field, and in particular to a kind of oiling of urban traffic road network can
Up to index construction method, suitable for weighing the complexity at optional position arrival plus oil/gas station on road.
Background technology
With China's rapid development of economy, the car ownership in city is unprecedented soaring year by year, adds oil/gas station in city
Energy services function day aobvious protrusion in road traffic.Oiling difficulty or ease journey be present in the vehicle travelled in the network of urban traffic road
The problem of spending.The oiling complexity on this road is weighed, all there is reality for driver and Jia oil/gas station owned enterprise
Meaning.So-called reachable index of refueling is exactly that the one kind for weighing arrival gas station's complexity in optional position on road is measured.At present,
Do not have to optional position on road in the application of the navigation equipment of in the market and various mobile terminals and pertinent literature
This method built up to index of refueling.As can be seen here, prior art requires further improvement.
The content of the invention
It is an object of the invention to propose a kind of oiling of urban traffic road network up to index construction method, with convenient
The oiling of optional position in road network is calculated up to index.
To achieve these goals, the present invention adopts the following technical scheme that:
The oiling of urban traffic road network comprises the following steps up to index construction method:
A is calculated by implementing projection, obtains arest neighbors section data of each oiling website in road network;
B obtains a position mark point data in each section of road network at interval of 100 meters;
The position mark point generated in arest neighbors section data and step b that c passes through the oiling website obtained to step a
Data are implemented to calculate, and obtain the oiling of all position mark points in road network up to index;
D utilizes the oiling of all position mark points in the road network generated in step c that road is calculated up to index
The oiling of optional position is up to index in network.
Preferably, the step a is specially:
A1, the quantity of definition oiling website are m;Determine a nearby sphere of j-th of oiling station data:Oiling website
Coordinate is Pj, calculate with PjCentered on the length of side be 200 meters of a square R;Wherein, j initial value is 1, and 1≤j≤m;
A2, the shape point coordinate sequence for taking out in road network data road section E, respectively p [0], p [1] ... p
[n], wherein, E start node is v, terminal node w;
Then the coordinate of first shape point coordinates p [0] and last shape point coordinates p [n] respectively with v, w overlaps;
A3, judge whether road section E all shape point coordinates are all fallen within the square R of step a1 determinations;
If a4, passing through judgement, road section E all shape point coordinates are all fallen within the square R of step a1 determinations, then
Show that road section E intersects with square R;Calculate gas station point coordinates PjTo shape point line segment p [i] p [i+1] distance, its
In, 0≤i≤n-1;Gas station point coordinates PjTo the starting point coordinate serial number i of the most short shape point line segment of distancemin, gas station
Point coordinates PjTo shape point line segment p [imin]p[imin+ 1] intersection point is pf, gas station point coordinates PjTo pfDistance value be d1, p
[imin] arrive pfDistance be d2, then gas station's point coordinates PjTo shape point p [imin] distance value df=d1+d2, be recorded as (E,
imin,df);
A5, repeat the above steps a2-a4, calculates gas station point coordinates PjAll road sections into road network data
Distance;Take gas station point coordinates PjInto all road sections, the most short arest neighbors section for oiling website of distance, is designated as
Emin, calculate section EminStart node to gas station point coordinates PjAssociated EminShape point p [imin] distance be dp,
Calculate EminDistance d of the start node to gas stationg=dp+df;By the numbering j and distance value d of the oiling websitegForm (j, dg),
By (j, dg) associated record is to section EminStart node data in;
A6, j=j+1 is made, repeat the above steps a1-a5, calculates the arest neighbors section data of m oiling website.
Preferably, the step b is specially:
B1, shape point coordinate sequence p [0], p [1] ... the p [n] for taking out in road network data road section E;Calculate
Shape point line segment p [i] p [i+1] length, and accumulate the length of all line segment p [i] p [i+1] in section and obtain section E's
Length lenE;Wherein, 0≤i≤n;
If the len that b2, step b1 are obtainedELess than 100 meters, then by section E two shape point coordinates p [0] and p [n]
Position mark point as section E;
If the len that b3, step b1 are obtainedEMore than 100 meters, then all shape point line segment p [i] p [i are traveled through along section E
+ 1], a position mark point is inserted every 100 meters since starting point p [0];If last position mark point of insertion
It is misaligned with terminal node p [n], then using terminal node p [n] as position mark point;
B4, each position mark point is stored in position mark point data to terminal node distance value;
B5, all sections of traversal, repeat the above steps b1-b4, obtains the position mark point data of all road sections.
Preferably, the step c is specially:
C1, setting are refueled up to threshold value dthreshold;
C2, position mark point L on road section E ' is taken, set E ' terminal node as s;Then position mark point L is to eventually
Only node s distance value is dL;Implement signal source shortest path search in road network by start node of s, work as shortest path
Distance length be more than dthreshold-dLWhen, then search is terminated, judges the whether relevant oiling website of node being each numbered
Numbering;Assuming that in the node being numbered before search terminates, the interstitial content for being associated oiling website is N number of, these nodes
Respectively t [1], t [2] ... t [N], the distance that node s to these nodes are passed through from position mark point L is d [1], d [2] ... d
[N];It is d from these nodes to the distance of associated oiling websiteg[1]、…dg[N];
Then position mark point L oiling up to index I=N/ (d [1]+d [2]+...+d [N]+dg[1]+…+dg[N]);
All position mark points on c3, traversal section E ', repeat the above steps c2, calculates each position on the E ' of section
The oiling of mark point is up to index;
All road sections in c4, traversal road network, repeat the above steps c2-c3, calculates in road network and owns
Position mark point oiling up to index.
Preferably, the step d is specially:
If optional position overlaps with position mark point coordinates in d1, road network, the oiling of the position mark point can
It is the oiling of the position mark point up to index up to index;
If optional position and position mark point coordinates are misaligned in d2, road network, the section where taking it is gone forward
Afterwards position mark point oiling up to index average value as the position oiling up to index.
The invention has the advantages that:
The present invention is constructed in a set of calculating road network according to position of the gas station in the network of urban traffic road to be appointed
The method for position arrival gas station's complexity of anticipating, this method can be applied during the generation of navigation data, beneficial to enhancing road
Application function of the circuit-switched data towards group refueling demand.The inventive method uses distance to describe, the describing mode with by distance
It is the same to be transformed into corresponding vehicle and travel the describing mode essence of time used in the distance.
Brief description of the drawings
Fig. 1 is schematic flow sheet of the oiling up to index construction method of urban traffic road network in the present invention.
Embodiment
Below in conjunction with the accompanying drawings and embodiment is described in further detail to the present invention:
With reference to shown in Fig. 1, the oiling of urban traffic road network comprises the following steps up to index construction method:
A is calculated by implementing projection, obtains arest neighbors section data of each oiling website in road network;
Step a is specifically included:
A1, the quantity of definition oiling website are m;Determine a nearby sphere of j-th of oiling station data:Oiling website
Coordinate is Pj, calculate with PjCentered on the length of side be 200 meters of a square R;Wherein, j initial value is 1, and 1≤j≤m;
A2, the shape point coordinate sequence for taking out in road network data road section E, respectively p [0], p [1] ... p
[n], wherein, E start node is v, terminal node w;
Then the coordinate of first shape point coordinates p [0] and last shape point coordinates p [n] respectively with v, w overlaps;
A3, judge whether road section E all shape point coordinates are all fallen within the square R of step a1 determinations;
If a4, passing through judgement, road section E all shape point coordinates are all fallen within the square R of step a1 determinations, then
Show that road section E intersects with square R;Calculate gas station point coordinates PjTo shape point line segment p [i] p [i+1] distance, its
In, 0≤i≤n-1;Gas station point coordinates PjTo the starting point coordinate serial number i of the most short shape point line segment of distancemin, gas station
Point coordinates PjTo shape point line segment p [imin]p[imin+ 1] intersection point is pf, gas station point coordinates PjTo pfDistance value be d1, p
[imin] arrive pfDistance be d2, then gas station's point coordinates PjTo shape point p [imin] distance value df=d1+d2, be recorded as (E,
imin,df);
A5, repeat the above steps a2-a4, calculates gas station point coordinates PjAll road sections into road network data
Distance;Take gas station point coordinates PjInto all road sections, the most short arest neighbors section for oiling website of distance, is designated as
Emin, calculate section EminStart node to gas station point coordinates PjAssociated EminShape point p [imin] distance be dp,
Calculate EminDistance d of the start node to gas stationg=dp+df;By the numbering j and distance value d of the oiling websitegForm (j, dg),
By (j, dg) associated record is to section EminStart node data in;
A6, j=j+1 is made, repeat the above steps a1-a5, calculates the arest neighbors section data of m oiling website.
B obtains a position mark point data in each section of road network at interval of 100 meters, and the process for example may be used
To be completed by implementing spaced markings calculating method;
Step b is specifically included:
B1, shape point coordinate sequence p [0], p [1] ... the p [n] for taking out in road network data road section E;Calculate
Shape point line segment p [i] p [i+1] length, and accumulate the length of all line segment p [i] p [i+1] in section and obtain section E's
Length lenE;Wherein, 0≤i≤n;
If the len that b2, step b1 are obtainedELess than 100 meters, then by section E two shape point coordinates p [0] and p [n]
Position mark point as section E;
If the len that b3, step b1 are obtainedEMore than 100 meters, then all shape point line segment p [i] p [i are traveled through along section E
+ 1], a position mark point is inserted every 100 meters since starting point p [0];If last position mark point of insertion
It is misaligned with terminal node p [n], then using terminal node p [n] as position mark point;
B4, each position mark point is stored in position mark point data to terminal node distance value;
B5, all sections of traversal, repeat the above steps b1-b4, obtains the position mark point data of all road sections.
The position mark point generated in arest neighbors section data and step b that c passes through the oiling website obtained to step a
Data are implemented to calculate, and obtain the oiling of all position mark points in road network up to index;
Step c is specifically included:
C1, setting are refueled up to threshold value dthreshold;
C2, position mark point L on road section E ' is taken, set E ' terminal node as s;Then position mark point L is to eventually
Only node s distance value is dL;Implement signal source shortest path search in road network by start node of s, work as shortest path
Distance length be more than dthreshold-dLWhen, then search is terminated, judges the whether relevant oiling website of node being each numbered
Numbering;Assuming that in the node being numbered before search terminates, the interstitial content for being associated oiling website is N number of, these nodes
Respectively t [1], t [2] ... t [N], the distance that node s to these nodes are passed through from position mark point L is d [1], d [2] ... d
[N];It is d from these nodes to the distance of associated oiling websiteg[1]、…dg[N];
Then position mark point L oiling up to index I=N/ (d [1]+d [2]+...+d [N]+dg[1]+…+dg[N]);
All position mark points on c3, traversal section E ', repeat the above steps c2, calculates each position on the E ' of section
The oiling of mark point is up to index;
All road sections in c4, traversal road network, repeat the above steps c2-c3, calculates in road network and owns
Position mark point oiling up to index.
D utilizes the oiling of all position mark points in the road network generated in step c that road is calculated up to index
The oiling of optional position is up to index in network;
Step d is specifically included:
If optional position overlaps with position mark point coordinates in d1, road network, the oiling of the position mark point can
It is the oiling of the position mark point up to index up to index;
If optional position and position mark point coordinates are misaligned in d2, road network, the section where taking it is gone forward
Afterwards position mark point oiling up to index average value as the position oiling up to index.
Herein it should be noted that above-mentioned road section E and road section E ' do not refer specifically to a certain spy in road network
Determine section, but refer to any one section in road network.
The inventive method can provide in navigation data weighs arrival gas station's complexity in optional position on road
Function, applied at present in navigation software on the market without this.
Certainly, described above is only presently preferred embodiments of the present invention, and the present invention is not limited to enumerate above-described embodiment, should
When explanation, any those skilled in the art are all equivalent substitutes for being made, bright under the teaching of this specification
Aobvious variant, all falls within the essential scope of this specification, ought to be protected by the present invention.