Specific embodiment
In embodiments of the present invention, processing unit is two corresponding by the upper offline separation road in electronic map databaseThe road data of road merges into the road data of a single line road, to achieve the purpose that reduce data volume, thus after improvingThe continuous efficiency based on the road data rendering biggish electronic map of scale bar.
The preferred embodiment of the present invention is described in detail with reference to the accompanying drawing.
Fig. 3 is the treatment process of road data provided in an embodiment of the present invention, specifically includes the following steps:
S301: from electronic map database, the road data of offline separation road in acquisition.
In embodiments of the present invention, processing unit needs first to obtain upper offline separation road from electronic map databaseRoad data.Wherein, the attribute in the road data of a road including the road and sampling location point (specifically can be and adoptThe coordinate of sample location point).
Specifically, the attribute of road includes road name, navigation level and category of roads (such as national highway, provincial highway).RoadDirection refer to the vehicle heading in the road, the road direction in the corresponding two road of generally upper offline separation road isOpposite.Each sampling location point in road is that pre- first pass through manually collects, e.g., can be on the road every 100 metersA coordinate is measured, the coordinate as a sampling location point in the road.
Since in practical application scene, upper offline separation road is usually therefore the road that category of roads is main road isThe efficiency that processing unit merges upper offline separation road is improved, obtains in electronic map database after road data, can rejectCategory of roads is not the road data of main road, that is, not being the road number of main road (such as bypass, ring road) for category of roadsAccording to merging treatment can not be made.
Judgement for category of roads, if since a road in practical applications is main road, then the road of this roadCategory of roads field included in circuit-switched data is true, it is assumed that 1 represents very, and category of roads field is FORMWAY field, thenIt is main road that FORMWAY field, which is the 1 expression road, if not main road (such as bypass, ring road, crossing link road), then FORWAYField is not 1, and therefore, processing unit can determine whether the FORMWAY field for including in road data is 1, if so, to the roadCircuit-switched data executes subsequent step S302~S303, does not otherwise deal with.
S302: the identical road data of attribute and direction is attached in the road data that will acquire, and is obtained to be processedRoad data.
Due in practical application scene, the often road data of piecewise acquisition same path, therefore, processing unitThe identical road data of attribute and direction is attached in the road data for needing will acquire, also i.e. by the road of same pathCircuit-switched data is attached, and obtains road data to be processed.
Such as, it is assumed that when acquiring the road data on the road A, the piecewise acquisition eastern section on the road A, middle section, west section this three sections of waysRoad data, since this three sections of ways are essentially all the road A, the attribute and direction in the road data on this three sections of ways are homogeneousTogether, then after processing unit gets the road data on this three sections of ways, the road data on this three sections of ways is attached, is obtained completeThe road A road data, as road data to be processed.
Specifically, the method that processing unit connects the road data of same road can be with are as follows: according to the road number gotAccording to creating original road topology relationship, according to the original road topology relationship, search road name, navigation level, category of roadsAnd the road data that direction is all the same, by road name, navigation level, category of roads and direction it is all the same road data sequenceConnection, obtains road data to be processed.
Further, the original road topology relationship of processing unit creation can be the connection relationship of road and node, thenProcessing unit searches road name, navigation level, category of roads and direction road all the same according to the original road topology relationshipThe method of circuit-switched data can be with are as follows: is directed to every road, reads the road data of the road, is closed according to the connection of road and nodeSystem determines the node for meeting specified requirements of road connection, determines other roads connecting with the node for meeting specified requirementsRoad data, from the road data of other determining roads search with read the road data road name, navigationGrade, category of roads and direction road data all the same.Wherein, if the node of road connection is not complex node,Nor the terminal of the road, then the node is the node for meeting specified requirements.
Node in road specifically refers to the crossing that road is connected, and node is divided into simple node and complex node again, letterSingle node is the crossing in real road, and complex node is then made of artificially integrating at a distance of closer some simple nodesOne dummy node, as shown in Figure 4.
Fig. 4 be road interior joint provided in an embodiment of the present invention schematic diagram, in Fig. 4, road 1, road 2, road 3,Road 4 intersects at crossroad, but crossroad is also required to occupy certain area, therefore, the actually road that is connected of road 1The position of mouth is point j1, that is, point j1 is the simple node of road 1, similar, point j2 is the simple node of road 2, and point j3 isThe simple node of road 3, point j4 are the simple nodes of road 4.And since point j1, j2, j3, j4 are at a distance of relatively closely, it collectsAfter the nodal information of this four simple nodes, for the ease of display control, this four simple nodes manually can be integrated into oneComplex node, the point F1 as shown in open circles in Fig. 4.In this way, complex node F1 has just corresponded to point j1, j2, j3, j4 this four againAbove-mentioned four roads can be shown as directly intersecting in complex node F by miscellaneous node in display control electronic map.In fact,For some simple nodes, if these simple nodes are integrated into a virtual complex node, to showIt is artificially determined when controlling map instead of these simple nodes, which is not limited by the present invention.Due to simple node and againThe determination method of miscellaneous node is method in the prior art, therefore and will not be described here in detail.
Fig. 5 is that processing unit provided in an embodiment of the present invention lookup road name, navigation level, category of roads and direction are equalThe schematic diagram of identical road data, in Fig. 5, the road a, the road b, the road c are all connected with simple node j1, and the road b and the road d are all connected with simplyNode j2, simple node j1 are not the terminals on the road a, and simple node j2 is not the terminal on the road b (that is, node j1 and j2 are to meet to refer toThe node of fixed condition), then processing unit be directed to the road a, can according to original road topology relationship (connection relationship of road and node),It determines the road a connecting node j1, and determines that other roads being connected with node j1 are the road b and the road c, therefore, from the road b and the road cThe road data all the same with the road name on the road a, navigation level, category of roads and direction is searched in road data, is foundRoad data be the road b, therefore connect the road a and the road b.It is subsequent, it can equally be handled for the road b, successively be extended back,Connect the road data on the road b and the road data on the road d, until the node that is connected of the road currently to be connected be complex node orUntil the terminal of road.
In this way, being equivalent to the same path in practical application with each complicated section in the starting point of road, terminal, roadPoint is segmented.Such as, it is assumed that the road data on the road a, the road b, the road d in Fig. 5 is manually to three sections in practical application in the road AThe road data of road acquisition, but intermediate node j1 is complex node, then and the road A in practical application is just divided by the complex nodeTwo sections of the road a and the road b-d.
In addition, due to connecting same node point in practical applications, and road name, navigation level, category of roads are all the sameTwo roads direction may not fully identical (road a and the road b as shown in Figure 5, the direction of the two slightly has deviation), therefore,Processing unit is directed to a road, it is determined that is connect with the road meets the node of specified requirements, and has determined and the satisfactionAfter the road data of other roads of the node connection of specified requirements, it can be looked into the road data of other determining roadsLook for read road data road name, navigation level, category of roads it is all the same, and the deviation of directivity be less than direction initialization thresholdThe road data of value, and be attached.It is of course also possible to be searched and reading in the road data of other determining roadsRoad name, navigation level, the category of roads of road data are all the same, and the direction of this of direction and reading road data most connectsClose road data, and be attached.
Preferably, since road data manually acquires, it may when typing road data into electronic map databaseIt will appear mistake, therefore, processing unit may further determine that not connected road data after obtaining road data to be processed, withAnd it is identical as the node that the not connected road data is connected, road name is identical, the identical road data to be processed in direction,If the not connected road data is different from the navigation level of determining road data to be processed or category of roads, not by thisThe road data of connection is attached with the road data to be processed determined.
It is still illustrated by taking Fig. 5 as an example, it is assumed that be connected to the road a and the road b, the road name on the road d and the link name on the road bTitle, direction are all the same, but the category of roads on the road d is provincial highway, and the category of roads on the road b is the road etc. on national highway namely the road d and the road bGrade is different, therefore the road a-b connected is road to be processed, and the road d is not connect with any road.Then processing unit determination does not connectThe road d connect determines that identical as the node (node j2) that the road d connects, road name is identical, the identical road to be processed in direction, i.e.,The road a-b of connection, since only category of roads is different from the road a-b of connection on the road d, thus, it is believed that the road data on the road d is in typingIt malfunctions when electronic map database, it is national highway that the category of roads on the road d should be identical as the road b, to connect the road d and the road a-b.It is, of course, also possible to which the category of roads on the road d is also accordingly adjusted to national highway.
S303: corresponding two road datas to be processed of offline separation road same in road data to be processed are carried outMerge.
In embodiments of the present invention, after obtaining road data to be processed, it can be created according to road data to be processed and update roadRoad topological relation obtains corresponding two roads to be processed of unified offline separation road further according to the update road topology relationshipCircuit-switched data, and this two road datas to be processed are merged.
Specifically, the node at every road data both ends to be processed due to obtaining is the starting point of road, terminal or multipleMiscellaneous node, therefore, the update road topology relationship of processing unit creation can be the connection relationship of road and complex node.Due toThe corresponding two road of general offline separation road can complex node having the same and contrary, therefore, processing dressIt sets according to the update road topology relationship, obtains corresponding two road datas to be processed of same offline separation road, and willThe method that this two road datas to be processed merge can be with are as follows: is directed to every road, it is corresponding to be processed to read the roadRoad data determines the complex node of road connection according to the connection relationship of road and complex node, searches and connects the determinationComplex node and direction the road corresponding to be processed road data opposite with the road, by the road data to be processed of readingIt is merged with the road data to be processed found.That is, identical complex node will be connected and contrary two to be processedRoad is determined as the corresponding two road of same offline separation road, and merges.
Further, it is contemplated that in practical application scene, even if it is on same that two road datas to be processed are correspondingOffline separation road, this two nodes to processing road data may also be not quite similar, as shown in Figure 6 (on will be same in Fig. 6The corresponding two road of offline separation road are known as the first road and the second road).
Fig. 6 is in practical application scene provided in an embodiment of the present invention when the first road and the second road are upper offline separation6 nodes are shared in node schematic diagram both when road, the first road and the second road, are node A, node B, node respectivelyC, node D, node E, node F.Wherein, node A is the intersection point of third road and the first road and the second road, and node B isThe intersection point of four roads and the first road, node C are the intersection points of the 5th road and the first road, and node D is the first road itself twoThe intersection point of section road connection, node E is the intersection point of the 6th road and the second road, and node F is the friendship of the 7th road and the second roadPoint.
According to the method for above-mentioned linking-up road data, 8 road datas to be processed can be obtained, be respectively road a, road b,Road c, road d, road e, road f, road g, road h this 8 roads road data.
As seen from Figure 6, in above-mentioned 8 road datas to be processed, only road a connect identical complex node with road e, i.e.,The starting point (and terminal of the second road) and node A of first road, and it is contrary, therefore, the first road as shown in FIG. 6In the second road, if only to connect identical complex node (or starting point, terminal of road) and contrary determineTwo road datas to be processed of corresponding same offline separation road, are also only capable of determining the road data of road a and road eIt is two road datas to be processed of corresponding same offline separation road.
Therefore, in order to accurately judge whether two road datas to be processed are same offline separation road corresponding twoThe road data of road, in the embodiment of the present invention processing unit determine same offline separation road it is corresponding two wait locateWhen managing road data and merging, for any two road data (the hereinafter referred to as first road datas to be processed to be processedWith the second road data to be processed), when two complex nodes and the second road to be processed that the first road data to be processed is connectedTwo complex node differences that circuit-switched data is connected can determine whether first road data to be processed and the second road number to be processedAccording to direction whether on the contrary, and, the complex node and the second road data to be processed which is connectedWhether the distance between complex node connected is not less than the first given threshold, if so, determining first road to be processedData and the second road data to be processed correspond to same offline separation road, close to this two road datas to be processedAnd otherwise, it determines first road data to be processed and the second road data to be processed do not correspond to same offline separation road.
Continuation is illustrated by taking Fig. 6 as an example, it is assumed that is directed to road b and road f, then processing unit can determine whether the road of road bThe direction of the road data of circuit-switched data and road f whether on the contrary, and, the complex node that road b is connected is connect with road fWhether the distance between complex node is less than the first given threshold.
Specifically, judging the distance between complex node that road b and road f are connected whether less than the first given thresholdWhen, it can carry out following judging twice.
Judge for the first time: judging first complicated section that first complex node that road b is connected is connect with road fWhether less than the first given threshold, second complex node for judging that road b is connected is connect the distance between point with road fThe distance between second complex node whether less than the first given threshold, if being respectively less than, can determine road b and road fThe distance between complex node connected is less than the first given threshold, otherwise, continues following second and judges;
Second of judgement: judge second complicated section that first complex node that road b is connected is connect with road fWhether less than the first given threshold, second complex node for judging that road b is connected is connect the distance between point with road fThe distance between first complex node whether less than the first given threshold, if being respectively less than, can determine road b and road fThe distance between complex node connected is less than the first given threshold, otherwise, it determines the complexity that road b and road f are connectedThe distance between node is not less than the first given threshold.
Assuming that first complex node that the node A that road b is connected is connected as road b, road b is connectedSecond complex node being connected as road b of node B, the node A that road f is connected connected as road fOne complex node, second complex node that the node E that road f is connected is connected as road f then judge in first timeWhen, terminal judges that the distance (distance for 0) of node A to node A whether less than the first given threshold, judges node B to node E'sWhether distance is less than the first given threshold, if being respectively less than, can determine that road b and road f is upper offline separation road, otherwise,It carries out second to judge, that is, judge that the distance of node A to node E whether less than the first given threshold, judges node B to node ADistance whether less than the first given threshold, if be respectively less than, it is determined that road b and road f be upper offline separation road, otherwise reallyDetermine road b and road f is not upper offline separation road.
And so on, in Fig. 6, processing unit can determine that road a is corresponding with road e and same offline separate road, roadRoad b it is corresponding with road f it is same it is it is offline separate road, road c is corresponding with road g same offline to separate road, road d and roadRoad h corresponds to same offline separation road, thus, aftertreatment device can respectively by road a and road e, road b and road f,Road c and road g, road d and the road data of road h merge.
In embodiments of the present invention, processing unit reads a road data to be processed, and is found using the above methodAfter the same offline another road data to be processed for separating road corresponding with the road data to be processed of reading, in order to guarantee to closeThe road type of the single line road obtained after and is consistent with the road type in this two road, this two road datas to be processed are mergedMethod can be (road data to be processed of reading and another road data to be processed for finding to be referred to as the belowThe corresponding road of this two road datas to be combined is referred to as by one road data to be combined and the second road data to be combinedFirst road to be combined and the second road to be combined): processing unit can be for each sampling in the first road data to be combinedLocation point determined the intersection point of the sampling location point and vertical line and the second road to be combined perpendicular to the second road to be combined,And the sampling location point is determined as the coordinate after merging the sampling location point with the midpoint of the intersection point.Similar, it can also needleTo each sampling location point in the second road data to be combined, the sampling location point was determined and perpendicular to the first road to be combinedThe intersection point of the vertical line on road and the first road to be combined, and the midpoint of the sampling location point and the intersection point is determined as the sample bitsCoordinate after setting a merging, as shown in Figure 7.
Fig. 7 is the road number provided in an embodiment of the present invention that the road data in two road is merged into a single line roadAccording to first method schematic diagram, in Fig. 7, in the first road data to be combined include sampling location point 1, the second road to be combinedInclude sampling location point 2 in circuit-switched data, be then directed to sampling location point 1, determined this o'clock hanging down perpendicular to the second road to be combinedThe intersection point of line and the second road to be combined be point 1X, therefore, by the coordinate of sampling location point 1 and the midpoint 1M of point 1X be determined as byCoordinate after the merging of sampling location point 1.Similar, for sampling location point 2, determined this o'clock perpendicular to the first road to be combinedIntersection point be point 2X, therefore, by the coordinate of sampling location point 2 and the midpoint 2M of point 2X be determined as will sampling location point 2 merging afterCoordinate.
But since above-mentioned merging method needs to do for each sampling location point in a road to another roadVertical line, therefore combined efficiency is lower, for the road type and the first road to be combined and second of the single line road after guaranteeing to mergeWhile the road type of road to be combined is consistent, raising combined efficiency as far as possible, processing unit can be used following methods and merge firstThe road data of road to be combined and the second road to be combined, specific as follows:
It is for each sampling location point in the first road data to be combined, the sampling location o'clock is to be combined as firstSampled point is determined without merging treatment and nearest with the first sampled point distance to be combined in the second road data to be combinedSampling location point, as the second sampled point to be combined;According to first sampled point to be combined and the second sampled point to be combinedCoordinate, judge the distance between first sampled point to be combined and second sampled point to be combined whether less than the second given threshold,If so, being determined as should by the coordinate at the midpoint of line between first sampled point to be combined and the second sampled point to be combinedFirst sampled point to be combined and the second sampled point to be combined merge after coordinate;It first to be combined is adopted otherwise, it determines crossing thisSampling point determines the intersection point of the vertical line and the second road to be combined perpendicular to the vertical line of the second road to be combined, to be combined by firstThe coordinate at the midpoint of line between this of sampled point and determination intersection point is determined as after merging first sampled point to be combinedCoordinate, as shown in Figure 8.
Fig. 8 is the road number provided in an embodiment of the present invention that the road data in two road is merged into a single line roadAccording to second method schematic diagram in fig. 8 include sampling location point 1 and sampling location point 3 in the first road to be combined,It include sampling location point 2 and sampling location point 4 in second road to be combined.
For sampling location point 1, first sampling location point 1 is regard as the first sampled point to be combined, due to the second road to be combinedSampling location point 2 and sampling location point 1 in road recently, and are used as second without merging treatment, therefore by sampling location point 2Sampled point to be combined.Assuming that processing unit judges the first sampled point (sampling location point 1) to be combined and the second sampled point to be combinedThe distance between (sampling location point 2) then directly determines the seat of the midpoint 12M between the two points less than the second given thresholdMark, and using the coordinate of midpoint 12M as the coordinate after merging to the first sampled point to be combined and the second sampled point to be combined.
Then, for sampling location point 3, the sampling location point 3 is regard as the first sampled point to be combined, since second wait closeAnd in road without merging treatment and with sampling location point 3 apart from it is nearest be sampling location point 4, therefore by sampling locationAs the second sampled point to be combined, (actually the distance of sampling location point 3 to sampling location point 2 is less than sampling location point 3 and arrives point 4The distance of sampling location point 4, but sampling location point 2 has already been through merging treatment, therefore cannot be by sampling location point 2 as theTwo sampled points to be combined).Assuming that processing unit judges the first sampled point (sampling location point 3) to be combined and the second sampling to be combinedThe distance between point (sampling location point 4) is not less than the second given threshold, it is determined that crosses the first sampled point to be combined perpendicular to theThe intersection point 3X of the vertical line of two roads to be combined and the second road to be combined, then will be between the first sampled point and intersection point 3X to be combinedThe coordinate of terminal 3M is determined as the coordinate after merging first sampled point (sampling location point 3) to be combined.
It is similar, after carrying out above-mentioned processing to all sampling location points in the first road to be combined, can for second toMerge in road each without the sampling location point of merging treatment (the sampling location point 4 in such as Fig. 8), directly determined this and adoptSample location point is perpendicular to the vertical line of the first road to be combined and the intersection point (the point 4X in such as Fig. 8) of the first road to be combined, then incites somebody to actionThe coordinate at the midpoint (the point 4M in such as Fig. 8) between the sampling location point and the intersection point is determined as merging the sampling location pointCoordinate afterwards.
Preferably, there is also such as Fig. 9 institutes for two roads to be combined in upper offline separation road in practical application sceneThe case where showing.Fig. 9 is upper offline separation road schematic diagram special in practical application scene provided in an embodiment of the present invention, with certainlyFrom the point of view of the sequence of from left to right, the first road to be combined and the second road to be combined are closer when starting, but have passed through complicated sectionAfter point A, the distance of two roads to be combined starts to increase, closer distance when being then returned to initial, finally by complicated sectionPoint B.Clearly for the first road to be combined and the second road to be combined as shown in Figure 9, in order to guarantee the single line road after mergingThe road type on road is consistent with actual conditions, and the two should not be merged when apart from each other.
Therefore, processing unit is merging the first road data (road data to be processed of reading) to be combined and second wait closeAnd road data (the same offline another road to be processed for separating road corresponding with reading road data to be processed that is findingCircuit-switched data) when, it is thus necessary to determine that sampling location o'clock the adopting into the second road data to be combined in the first road data to be combinedThe distance of sample location point, however, it is determined that distance be not more than preset distance threshold, then by the first road data to be processed and secondThe sampling location point of road data to be processed, which merges, (specifically can be used above-mentioned the first or second of merging method to be closedAnd), if there is sampling location point of the continuous N number of sampling location o'clock to the second road data to be combined in the first road data to be combinedDistance be all larger than preset distance threshold, then store the continuous N number of sampling location point of this in the first road data to be processed respectivelyAnd the second corresponding sampling location point in road data to be processed, that is, to this N number of sampling location point without merging.Wherein,N is setting quantity.
For example, it is assumed that N is set as 1, it include sampling location point 1 and sample bits in the first road to be combined as shown in Figure 9A little 3 are set, includes sampling location point 2 and sampling location point 4 in the second road to be combined.Then, processing unit is merging first wait closeAnd when the road data of road and the second road to be combined, the distance for determining sampling location point 1 to sampling location point 2 is not more than pre-If distance threshold (such as 50 meters), therefore sampling location point 1 and sample bits can be merged by above-mentioned the first or second methodSet a little 2.When handling sampling location point 3, the distance that processing unit determines sampling location point 3 to sampling location point 4 is bigProcessing is merged to the sampling location point 1 and sampling location point 4 in preset distance threshold, therefore not.Pass through the above methodAfter merging to upper offline separation road as shown in Figure 9, obtained road is as shown in Figure 10.Figure 10 is the embodiment of the present inventionRoad schematic diagram after what is provided merge upper offline separation road as shown in Figure 9, in Figure 10, the first road to be combinedStill keep the original road data in this two road constant when road and the second road to be combined apart from each other, and at a distance of it is closer when thenMerge into a single line road.
It further, should after the sampling above method merges the first road to be combined and the second road to be combinedThe position of first road to be combined and all nodes on the second road to be combined can all change, as shown in figure 11.Figure 11For the schematic diagram provided in an embodiment of the present invention merging into single line road posterior nodal point position and changing, in Figure 11, dotted line instituteThe two road shown be merge before the first road to be combined and the second road to be combined (the first road to be combined and second is wait closeAnd road corresponds to same offline separation road), there are node A on the first road to be combined, shown in solid be by first toMerge the single line road that road and the second road to be combined are merged into, the node A ' on the single line road is corresponded to and merged preceding firstNode A on road to be combined.
As seen from Figure 11, the position for merging front nodal point A and merging posterior nodal point A ' is not identical.And for before merging with firstRoad to be combined is connected to for the third road of node A, and third road is still connected to node A after merging, is not connected to savePoint A ', this will result in third road with merge after single line road and be not connected with, namely the accuracy of map that shows compared withIt is low.
Therefore, in order to improve the accuracy for handling road data, processing unit uses the above method in the embodiment of the present inventionAfter corresponding two road datas to be processed of same offline separation road are merged, it to be also directed to same offline pointEach node in two road corresponding from road determines in addition to the corresponding two road of the same offline separation roadOther roads being connected with the node determine the slope of other roads according to the road data of other determining roadsAverage value determines that slope is the average value and the straight line for crossing the node, determines that the straight line same offline is separated with thisThe intersection point of road after the corresponding two road merging in road, updates the node using determining intersection point, as shown in figure 12.
First road to be combined and the second road to be combined are merged into single line road to be provided in an embodiment of the present invention by Figure 12The schematic diagram that node location is adjusted behind road, in Figure 12, two road shown in dotted line are the first road to be combined before mergingWith the second road (the first road to be combined and the second road to be combined correspond to same offline separation road) to be combined, first toThere are node A, third road, the 4th road and the first road to be combined intersect at node A, list shown in solid for merging traffic roadDrawing lines road is the single line road for being merged into the first road to be combined and the second road to be combined.
After then processing unit merges single line road as shown in figure 12 out, for node A, determines and remove first road to be combinedOther roads being connected other than road and the second road to be combined with node A, i.e. third road and the 4th road, determine third roadThe average value of the slope of road and the 4th road, then determine slope be the average value and cross node A straight line with merge after listThe intersection point on drawing lines road is denoted as node A ', using the coordinate of node A ' as to node A coordinate adjusted, last connecting node A 'With third road and the 4th road (specifically can connecting node A ' and node A), in this way, the map shown as shown in figure 12In, third road and the 4th road intersect at node A ' with single line road.
By the above method, processing unit can be two corresponding by offline separation road same in electronic map databaseThe road data of road merges into the road data of a single line road, and the road data of the single line road after merging is compared to conjunctionAnd the road data of two different roads before is less, therefore renders electronic map based on the road data after merging, can haveEffect improves the rendering efficiency of the biggish electronic map of scale bar.
In addition, terminal only in the biggish map of rendering scale bar, can just make to render due in practical application sceneThe corresponding two different roads of upper offline separation road overlap, therefore, in embodiments of the present invention, processing unit is adoptedAfter merging processing to the road data of upper offline separation road in aforementioned manners, road data after processing can be stored in electricityIn sub- map data base, that is, saving the road data after merging treatment in electronic map database, original road is also savedCircuit-switched data, when terminal will render electronic map, and road data is obtained into electronic map database, electronic map database canJudge whether the scale bar of terminal rendering electronic map is greater than setting ratio ruler, if so, by the road data after merging treatmentTerminal is returned to, otherwise, original road data is returned into terminal.
It is the processing method of road data provided in an embodiment of the present invention above, is based on same invention thinking, the present inventionEmbodiment also provides a kind of processing unit of road data, as shown in figure 13.
Figure 13 is the processing device structure diagram of road data provided in an embodiment of the present invention, is specifically included:
Module 1301 is obtained, is used for from electronic map database, the road data of offline separation road in acquisition;
Link block 1302, the identical road data of attribute and direction is connected in the road data for will acquireIt connects, obtains road data to be processed;
Merging module 1303, for by offline separation road same in road data to be processed it is corresponding two it is to be processedRoad data merges.
The attribute obtained in the road data that module 1301 is got includes: road name, navigation level and roadGrade;
The link block 1302 is specifically used for, and according to the road data got, creates original road topology relationship;RootAccording to the original road topology relationship, road name, navigation level, category of roads and direction road data all the same are searched;Road name, navigation level, category of roads and direction road data all the same are linked in sequence, road number to be processed is obtainedAccording to.
The link block 1302 specifically includes:
Original topology relationship creating unit 13021, for creating the connection relationship of road and node;
Searching unit 13022 reads the road data of the road, according to road and node for being directed to every roadConnection relationship determines the node for meeting specified requirements of road connection, determines its connecting with the node for meeting specified requirementsThe road data of his road searches the link name with the road data read from the road data of other determining roadsTitle, navigation level, category of roads and direction road data all the same;Wherein, if the node of road connection is not multipleMiscellaneous node, nor the terminal of the road, then the node is the node for meeting specified requirements.
The link block 1302 is also used to, and determines not connected road data, and the road data not connected with thisThe node connected is identical, road name is identical, the identical road data to be processed in direction;If the not connected road dataIt is different from the navigation level of determining road data to be processed or category of roads, then by the not connected road data and determinationRoad data to be processed is attached.
The merging module 1303 is specifically used for, and according to road data to be processed, creation updates road topology relationship;According toThe update road topology relationship obtains corresponding two road datas to be processed of same offline separation road, and will be describedTwo road datas to be processed merge.
The merging module 1303 specifically includes:
Topological relation creating unit 13031 is updated, for creating the connection relationship of road and complex node;
Combining unit 13032 reads the corresponding road data to be processed of the road, according to road for being directed to every roadThe connection relationship on road and complex node determines the complex node of road connection, searches the complex node for connecting the determination and sideTo the road corresponding to be processed road data opposite with the road, by the road data to be processed of reading and find wait locateReason road data merges.
The road data further comprises: sampling location point;
The combining unit 13032 is specifically used for, and determines the sampling location point in the road data to be processed read to looking intoThe distance of the sampling location point of the road data to be processed found;If the distance is not more than preset distance threshold, will readThe sampling location point of the road data to be processed taken and the road data to be processed found merges;If that reads is to be processedThe distance for having continuous N number of sampling location point to the sampling location of the road data to be processed found point in road data is greater than pre-If distance threshold, then store the continuous N number of sampling location point of this in the road data to be processed of reading respectively and findingRoad data to be processed in corresponding sampling location point.
Described device further include:
Node updates module 1304, for for the same offline each section separated in the corresponding two road of roadPoint determines other roads being connected in addition to the corresponding two road of same offline separation road with the node;According to trueThe road data of other fixed roads determines the average value of the slope of other roads;Determine slope be the average value andThe straight line for crossing the node determines that the straight line same offline separates road after the corresponding two road of road merge with thisIntersection point updates the node using determining intersection point.
The embodiment of the present invention provides a kind of processing method and processing device of road data, and this method obtains upper offline separation roadRoad data, the identical road data of attribute and direction is attached in the road data that will acquire, and obtains road to be processedCircuit-switched data merges corresponding two road datas to be processed of offline separation road same in road data to be processed.The offline road data for separating the corresponding two road of road upper in electronic map database can be merged into one by the above methodThe road data of single line road, the data volume after merging is much smaller than the data volume of initial data, therefore, based on the road after mergingThe biggish electronic map of data render scale bar can effectively improve the rendering efficiency of electronic map.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer programProduct.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the applicationApply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) producesThe form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present applicationFigure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructionsThe combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programsInstruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produceA raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for realThe device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram orThe function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basicProperty concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted asIt selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from this Shen to the embodiment of the present applicationPlease embodiment spirit and scope.In this way, if these modifications and variations of the embodiment of the present application belong to the claim of this applicationAnd its within the scope of equivalent technologies, then the application is also intended to include these modifications and variations.