CN110019588A - A kind of road determines method and device - Google Patents

A kind of road determines method and device Download PDF

Info

Publication number
CN110019588A
CN110019588A CN201710786685.0A CN201710786685A CN110019588A CN 110019588 A CN110019588 A CN 110019588A CN 201710786685 A CN201710786685 A CN 201710786685A CN 110019588 A CN110019588 A CN 110019588A
Authority
CN
China
Prior art keywords
road
shape point
point
section
shape
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710786685.0A
Other languages
Chinese (zh)
Inventor
柴艳瑞
王海鹏
苏向奎
王前卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Autonavi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Autonavi Information Technology Co Ltd filed Critical Autonavi Information Technology Co Ltd
Priority to CN201710786685.0A priority Critical patent/CN110019588A/en
Publication of CN110019588A publication Critical patent/CN110019588A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram
    • G09B29/003Maps
    • G09B29/005Map projections or methods associated specifically therewith

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Educational Technology (AREA)
  • Educational Administration (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

This application discloses a kind of roads to determine that method and device, scheme include: acquisition road data, and the road data includes the shape point set for forming road;Obtain the map zoom levels of electronic map to be shown and the line width information of the road;According to the line width information of the map zoom levels and the road, the shape point in the shape point set of the road is vacuated, obtains the shape point set for vacuating rear road.The application level of zoom and the line width information of road according to the map, the shape point set of road is vacuated, the efficiency for calculating labeling position is improved to a certain extent, simultaneously, because vacuating reduces some shape points, so that shape point spacing is increased, to improve to obtain the probability of labeling position.

Description

A kind of road determines method and device
Technical field
This application involves electronic map Rendering fields, determine method and device more specifically to a kind of road.
Background technique
Road information mark is a key content of map denotation, and the quality of road information mark directly affects user's Experience, is an important ring for software quality assurance.The objective of road information mark is that suitable position is found on map to road Road carries out information labeling.Road information mark may include: Road letterings mark, navigation guide arrow mark etc..
By taking Road letterings mark as an example, existing notation methods are usually road number required for server-side tissue client According to, shape point set and text to be marked, client including forming road to be marked calculate the length of text to be marked, and time It goes through shape point set and finds the position for placing text to be marked enough, and then mark.But due in the shape point set of road Shape point number is magnanimity, searches the shape point that labeling position needs to be traversed for magnanimity according to existing way, calculates mark position The inefficiency set, and the probability for finding labeling position is very low.
Summary of the invention
In view of this, this application provides a kind of roads to determine method and device, for solving the prior art for service It holds the full dose road shape point set issued to carry out traversal to search present in labeling position, inefficiency obtains labeling position The low problem of probability.
To achieve the goals above, it is proposed that scheme it is as follows:
A kind of Road letterings labeling position determines method, comprising:
It can be seen from the above technical scheme that road provided by the embodiments of the present application determines scheme, road data is obtained, The road data includes the shape point set for forming road;Obtain the map zoom levels of electronic map to be shown and described The line width information of road;According to the line width information of the map zoom levels and the road, to the shape point of the road Shape point in set is vacuated, and the shape point set for vacuating rear road is obtained.The application according to the map level of zoom and The line width information of road vacuates the shape point set of road, improves the effect for calculating labeling position to a certain extent Rate, meanwhile, because vacuating reduces some shape points, so that shape point spacing is increased, to improve to obtain mark position The probability set.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 determines method flow diagram for a kind of road disclosed in the embodiment of the present application;
Fig. 2 is the method flow diagram that a kind of pair of shape point set disclosed in the embodiment of the present application is vacuated;
Fig. 3 is that another kind road disclosed in the embodiment of the present application determines method flow diagram;
Fig. 4 is a kind of method flow diagram of determining labeling position disclosed in the embodiment of the present application;
Fig. 5 is a kind of method flow diagram of determining target road section disclosed in the embodiment of the present application;
Fig. 6 is a kind of exemplary shape point division mode schematic diagram of road of the application;
Fig. 7 meets the method flow diagram for setting the shape point of tortuous condition for a kind of lookup disclosed in the embodiment of the present application;
Fig. 8 meets the shape point for setting tortuous condition for a kind of search in the candidate segment disclosed in the embodiment of the present application Schematic diagram;
Fig. 9 can mark the method flow in text section for a kind of lookup in target road section disclosed in the embodiment of the present application Figure;
Figure 10 is that a kind of exemplary search in target road section of the application can mark the effect diagram in text section;
Figure 11 a is the display effect schematic diagram carried out after Road letterings mark according to the prior art;
Figure 11 b is the display effect schematic diagram carried out after Road letterings mark according to the application method;
Figure 12 is a kind of road determining device structural schematic diagram disclosed in the embodiment of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Referring to Fig. 1, Fig. 1 determines method flow diagram for a kind of road disclosed in the embodiment of the present application.
As shown in Figure 1, this method comprises:
Step S100, road data is obtained, the road data includes the shape point set for forming road;
Specifically, client can obtain road data from server, which is the composition road that server issues The shape point set on road.
Step S110, the map zoom levels of electronic map to be shown and the line width information of the road are obtained;
Specifically, client in the drag operation of response user, the operation of scaling map zoom levels or other may relate to The operation for changing the covered geographical coverage area of electronic map having been displayed needs again to drawing (containing map and navigation routine) When being rendered, the map zoom levels of available electronic map to be shown and the line width information of road.
Optionally, client can store pattern file, can specify that the line width information of road in pattern file.Certainly, Client can also obtain the line width information of road from server.
Step S120, according to the line width information of the map zoom levels and the road, to the shape of the road Shape point in point set is vacuated, and the shape point set for vacuating rear road is obtained.
Specifically, the difference of the line width of the difference and road of level of zoom according to the map, can take different vacuate Mode vacuates the shape point set of road, reduces the quantity of shape point in shape point set, while by vacuating portion Divide shape point, so that the shape point spacing vacuated in the shape point set of rear road is increased.
Road provided by the embodiments of the present application determines method, and level of zoom and the line width information of road, right according to the map The shape point set of road is vacuated, and improves the efficiency for calculating labeling position to a certain extent, meanwhile, subtract because vacuating Some shape points are lacked, so that shape point spacing is increased, to improve to obtain the probability of labeling position.
Further, to above-mentioned S120, according to the line width information of the map zoom levels and the road, to the road Shape point in the shape point set on road is vacuated, and the shape point set for vacuating rear road is obtained, and following the application will combine Specific embodiment describes in detail.
Before introduction vacuates embodiment, the shape point set of road is described further first.Client can be from Server obtains the shape point set of road, and each shape point, which is also provided with, in shape point set vacuates label, vacuates mark The different values of note indicate that this is vacuated and mark whether effectively.If it is effective to vacuate label, then it represents that corresponding shape point is in map Level of zoom can be vacuated directly when being less than setting map level of zoom threshold value.Practical feelings of the server previously according to road Condition, when map zoom levels are less than setting map level of zoom threshold value by unessential shape point a part of in shape point set The label that vacuates be set as effectively, so that client can determine whether to take out respective shapes point according to the label It is dilute.Wherein, setting map level of zoom threshold value can according to the actual situation depending on, such as 10 or other numerical value.It lifts for example, vacuating When labeled as 0, expression vacuates label effectively, and correspondingly-shaped point can be vacuated directly when map zoom levels are less than 10 grades Fall.
Based on above-mentioned introduction, the embodiment of the present application discloses the method stream that the shape point set of a kind of pair of road is vacuated Cheng Tu, as shown in Fig. 2, this method comprises:
Step S200, level of zoom and the line width information of road according to the map, obtain the road vacuates jump point threshold Value;
Specifically, the application can be pre-designed the corresponding jump point threshold value filterLen that vacuates of map zoom levels and calculate Formula, alternatively, the combination of shape point number is corresponding in map zoom levels and shape point set vacuates jump point threshold value FilterLen calculation formula.Wherein, vacuate jump point threshold value filterLen calculation formula be vacuate jump point threshold value filterLen with The numerical relation of the line width of road.
Based on this, in the available and map level or the map level and the shape point set of the road The combination of shape point number is corresponding to vacuate formula, according to the line width information for vacuating formula and the road, calculates the pumping of road Dilute jump point threshold value filterLen.That is, bring the line width of road into acquisition vacuate in jump point threshold value filterLen calculation formula, And then it obtains vacuating jump point threshold value filterLen.
It is illustrated below:
Map zoom levels are divided into four kinds of situations by the embodiment of the present application, and four kinds of situations, which respectively correspond, different vacuates jump Point threshold value filterLen calculation formula, as follows:
(1), nMaplevel >=17, filterLen=0 indicates not having to vacuate;
(2), 15,16 grades of nMapLevel, filterLen=k1*nLineWidth;
(3), shape point number in nMapLevel≤9 and shape point set >=100, filterLen=k2* nLineWidth;
(4), remaining situation filterLen=k3*nLineWidth.
Above-mentioned nMaplevel indicates map zoom levels, and filterLen expression vacuates jump point threshold value, nLineWidth table Show the line width of road, k1-k3 indicates coefficient value.
Step S210, a shape point successively is chosen from the shape point set of the road, calculates the shape point of the selection The distance nTempLen between next adjacent shapes point;
Specifically, a shape point P is successively chosen from the shape point set of roadi, calculate shape point PiWith next adjacent shape Shape point Pi+1Between distance nTempLen.
Step S220, determine whether the map zoom levels are greater than the map zoom levels threshold value of setting;If so, executing Step S230, if it is not, executing step S240;
Step S230, according to the size relation of the nTempLen and filterLen, it is determined whether take out the shape point It is dilute fall;
Specifically, if map zoom levels are greater than setting map level of zoom threshold value, determining whether to take out shape point i It is dilute fall when, it is only necessary to consider the size relation of the nTempLen and filterLen.
In a kind of optional embodiment, it can be determined that whether nTempLen protects more than filterLen if so, determining Stay the shape point P of selectioni, if not, it is determined that by the shape point P of selectioniIt vacuates.
Wherein, the shape point of reservation constitutes the shape point set for vacuating rear road.
Step S240, according to the value for vacuating label of the shape point, the size of the nTempLen and filterLen Relationship, it is determined whether vacuate the shape point.
Specifically, if map zoom levels are no more than setting map level of zoom threshold value, determine whether will to choose Shape point PiWhen vacuating, need to comprehensively consider shape point PiThe value for vacuating label and the nTempLen with The size relation of filterLen.
In a kind of optional embodiment, if map zoom levels are no more than setting map level of zoom threshold value, judge The shape point P of selectioniThe value for vacuating label indicate whether that this is vacuated labeled as effective;If indicating that this is vacuated to be labeled as having Effect, then by the shape point P of selectioniIt vacuates;If indicating, this is vacuated labeled as invalid, judge nTempLen whether be more than FilterLen, if so, determining the shape point P for retaining and choosingi, if not, it is determined that by the shape point P of selectioniIt vacuates.
Wherein, the shape point of reservation constitutes the shape point set for vacuating rear road.
It in another embodiment of the application, describes another road and determines method, the road is determined in conjunction with Fig. 3 Method is introduced, as shown in figure 3, itself the following steps are included:
Step S300, road data is obtained, the road data includes the shape point set for forming road;
Step S310, the map zoom levels of electronic map to be shown and the line width information of the road are obtained;
Step S320, according to the line width information of the map zoom levels and the road, to the shape of the road Shape point in point set is vacuated, and the shape point set for vacuating rear road is obtained;
Specifically, the step S100-S120 in the present embodiment in step S300-S320 and previous embodiment is corresponded, Details are not described herein again.
Step S330, the shape point set that rear road is vacuated according to determines the information to be marked of the road in institute State the labeling position in electronic map to be shown.
Specifically, client can further basis vacuate after completing to vacuate the shape point set of road The shape point set of road afterwards determines labeling position of the information to be marked of the road in electronic map to be shown, into And convenient for drawing information to be marked at labeling position.Information to be marked can be the mark text of road such as road name, can also be with It is the information that navigation guide arrow etc. is suitable for being labeled on road.
The present embodiment is promoted to a certain extent by determining labeling position according to the shape point set of rear road is vacuated The efficiency of labeling position is calculated, meanwhile, because vacuating reduces some shape points, so that shape point spacing is increased, from And improve to obtain the probability of labeling position.
In the next embodiment of the application, it is illustrated so that information to be marked is text to be marked as an example.
Further, in above-mentioned steps S330, according to the shape point set for vacuating rear road, the road is determined Labeling position of the text to be marked in the electronic map to be shown, following the application will be introduced in conjunction with Fig. 4, the reality Applying example may include:
Step S400, the position that shape point in the shape point set of rear road is vacuated according to composition obtains a Duan Lian Continuous target shape point, the target shape point constitutes the target road section for marking the text to be marked of the road, described The length of target road section meets not less than the length and tortuous of the text to be marked sets tortuous condition;
Wherein, the length of text to be marked can be calculated according to word attribute, general, the length of text to be marked Degree is equal to the width in region shared by single text to be marked multiplied by text number to be marked.
Wherein, the tortuous of target road section also needs to meet the tortuous condition of setting, namely needs to guarantee that target road section is most It measures flat, and avoids the occurrence of the excessive situation of tortuous, the text of mark is caused to be not easy to user's viewing.
It should be noted that in each shape point that the tortuous of target road section can be included by target road section, phase Angle between the sub- section of adjacent shape point composition determines.
Step S410, in the target road section, the section that can mark the text to be marked of the road is obtained, as institute State the labeling position of the text to be marked of road.
After finding target road section, the section that can mark the text to be marked of the road is further therefrom searched, It specifically can be not by other text occupy-places, and length is not less than the section of the length of the text to be marked of road.
It is understood that the number in the section finally found and being not fixed, it may be possible to zero, it is also possible to be one It is a or multiple.
If the number in the section found is zero, then it represents that the section of the condition of satisfaction is not found, it can not be to be marked Text is labeled, and is exited, i.e., is not labeled to the text to be marked.
If the number in the section found is one or more, a section can be determined from the section found, The labeling position of text to be marked as the road.
In the method for the labeling position of the text to be marked of the determination of the present embodiment introduction road, first in shape point The target road section that the condition that meets is searched in set, further obtains the text to be marked that can mark the road from target road section Section, therefrom determine the labeling position of the text to be marked of the road.According to the application method, final lookup ensure that The labeling position arrived is in relatively flat section, ensure that the text checked after mark that user can be convenient.
In another embodiment of the application, to above-mentioned steps S400, the shape of rear road is vacuated according to composition The position of shape point in point set, obtains one section of continuous target shape point, and the target shape point constitutes described for marking The process of the target road section of the text to be marked of road is introduced, as shown in connection with fig. 5, this method comprises:
Step S500, the position of shape point and the electricity to be shown in the shape point set of rear road are vacuated according to The positional relationship of the geographic area of sub- ground map combining, is divided into several segments for the shape point of the road;
Wherein it is possible to guarantee that each section after dividing may include positioned at described to aobvious according to certain division rule Shape point in the geographic area for the electronic map covering shown.
In a kind of optional embodiment, the shape point in the shape point set of road can be traversed, therefrom determines to face Boundary's shape point, critical shape point is located at except the geographic area that electronic map to be shown covers, and critical shape point is previous Adjacent shapes point or latter adjacent shapes point are located within the geographic area that electronic map to be shown covers.By critical shape point And the shape point being located within the geographic area that electronic map to be shown covers between critical shape point is divided into one point In section.
It is illustrated in conjunction with shape point partition process of the Fig. 6 to road:
Exemplary route includes P0-Pn shape point in Fig. 6, and electronic map covering geographic area to be shown is S1.From Fig. 6 As can be seen that P1, P5, P9, P11, P14 are therefore shape point is divided into three sections, be respectively as follows: by critical shape point
[P1…P5]、[P5…P9]、[P11…P14]。
Step S510, for each section after division, the maximum spacing for the adjacent shapes point that this section is included is determined;
Specifically, each section after division includes several shape points.Spacing between determining wherein adjacent shapes point, and from Maximum spacing is determined in each spacing.
Step S520, the size of the maximum spacing of each section of the comparison adjacent shapes point for being included, most by maximum spacing intermediate value Big section is determined as candidate segment;
Specifically, a maximum spacing has been determined for each section in previous step.In this step, more each maximum Maximum spacing intermediate value is determined as candidate segment for maximum section by the size of spacing.
Specifically, it is still illustrated by taking above-mentioned Fig. 6 as an example:
As seen in Figure 6, maximum spacing is [P1-P2] segment length L1 in [P1 ... P5] section;It is maximum in [P5 ... P9] section Spacing is [P6-P7] segment length L2;Maximum spacing is [P12-P13] segment length L3 in [P11 ... P14] section.Assuming that L3 > L1 > L2, then may be used To determine candidate segment for [P12-P13].
In this step from each section after division, determine that maximum section of intermediate value of spacing of maximum is candidate segment, it is subsequent can be from Target road section is intercepted in the candidate segment.Since the candidate segment includes the maximum adjacent shapes point of spacing, from the candidate segment Be calculated hold the probability of the position of text to be marked enough can be bigger, improve the probability that labeling position is calculated, And guarantee the labeling position being calculated close to flat section.
Step S530, road centered on the section for forming the shape point that the candidate segment medium spacing is equal to maximum spacing Section;
Step S540, the length of the text to be marked is calculated;
Step S550, judge whether the length of the candidate segment is greater than the length of the text to be marked;If it is not, then moving back Out;If so, executing step S560;
Specifically, if the length of candidate segment is not more than the length of text to be marked, then it represents that labeling position can not be found, End can be exited.
Step S560, using the shape point at center section both ends as starting point, with the shape point at the both ends of the candidate segment For terminal;
Step S570, it is located at the starting point and its adjacent terminal in the candidate segment since the starting point for each starting point Between shape point in, sequential search meets the shape point for setting tortuous condition, until searching the corresponding stopping shape of the starting point Point;
Wherein, the stopping shape point is not meet to set tortuous condition or the stopping shape point as the terminal.
Step S580, using the section of the corresponding two shape point compositions stopped between shape point of two starting points as target Section.
In the disclosed method for searching target road section of the present embodiment, by the shape point of road according to electronic map to be shown Overlay area is divided into several segments, and every section includes the shape point being located in electronic map overlay area to be shown, from division In each section afterwards, the candidate segment comprising the maximum adjacent shapes point of spacing is determined, it is subsequent to intercept target road section from the candidate segment. Since the candidate segment includes the maximum adjacent shapes point of spacing, it is calculated from the candidate segment and holds text to be marked enough The probability of the position of word can be bigger, improves the probability that labeling position is calculated, and guarantee the labeling position being calculated Close to flat section.
In another embodiment of the application, to above-mentioned steps S570, for each starting point, since the starting point, The candidate segment is located in the shape point between the starting point and its adjacent terminal, and sequential search meets the shape for setting tortuous condition Point is introduced until searching the corresponding process for stopping shape point of the starting point, as shown in connection with fig. 7, this method comprises:
Step S600, from starting point P0Start, is located at the shape between the starting point and its adjacent terminal in the candidate segment In shape point, sequence selected shape point;
Specifically, the shape point at center section both ends is respectively starting point, and one of starting point is expressed as P0, another starting point It is expressed as P '0
Step S610, judge whether the shape point chosen is the terminal, if so, thening follow the steps S620, otherwise, execute Step S630;
Step S620, determine that the shape point chosen is starting point P0Corresponding stopping shape point;
It is step S630, elected that get is shape point P1, then ∠ P is obtained1P0P’0Angle value;
If step S640, the described angle value is greater than preset first angle threshold value, the P1For starting point P0It is corresponding to stop Only shape point;
Step S650, when that read is shape point Pi, i initial value is 2, obtains ∠ PiPi-1Pi-2With ∠ PiP0P’0Angle Angle value, one shape point i=i+1 of every selection;
If step S660, ∠ PiPi-1Pi-2Greater than preset first angle threshold value or ∠ PiP0P’0Angle value be greater than it is pre- If second angle threshold value, then the PiFor starting point P0Corresponding stopping shape point.
Wherein, first angle threshold value and second angle threshold value can not be limited with sets itself, the two size relation.
In order to make it easy to understand, existing for example:
Referring to Fig. 8, Fig. 8 is searched in the candidate segment for one kind disclosed in the embodiment of the present application meets the tortuous condition of setting Shape point schematic diagram.
In Fig. 8, P1-Pn is the shape point that candidate road section includes, and [Pn4-Pn5] is center section.
It is as follows for from Pn4 to the process of the side P1 expanding query:
1, the vector by Pn3 to Pn4, the angle ∠ Pn3Pn4Pn5 with the vector by Pn4 to Pn5 are calculated, and determines the folder Angle is less than a1.Continuation detects forward.
2, the vector by Pn2 to Pn3, the angle ∠ Pn2Pn3Pn4 with the vector by Pn3 to Pn4 are calculated, and determines the folder Angle ∠ Pn2Pn3Pn4 is less than a1;
3, the vector by Pn2 to Pn4, the angle ∠ Pn2Pn4Pn5 with the vector by Pn4 to Pn5 are calculated, and determines the folder Angle ∠ Pn2Pn4Pn5 is less than a2.Continuation detects forward.
4, the vector by Pn1 to Pn2, the angle ∠ Pn1Pn2Pn3 with the vector by Pn2 to Pn3 are calculated, and determines the folder Angle ∠ Pn1Pn2Pn3 is greater than a1, it is thus determined that Pn1 is to stop shape point.
It is as follows for from Pn5 to the process of the side Pn expanding query:
1, the vector by Pn6 to Pn5, the angle ∠ Pn6Pn5Pn4 with the vector by Pn5 to Pn4 are calculated, and determines the folder Angle ∠ Pn6Pn5Pn4 is less than a1.Continuation detects forward.
2, the vector by Pn7 to Pn6, the angle ∠ Pn7Pn6Pn5 with the vector by Pn6 to Pn5 are calculated, and determines the folder Angle ∠ Pn7Pn6Pn5 is less than a1;
3, the vector by Pn7 to Pn5, the angle ∠ Pn7Pn5Pn4 with the vector by Pn5 to Pn4 are calculated, and determines the folder Angle ∠ Pn7Pn5Pn4 is greater than a2, it is thus determined that Pn7 is to stop shape point.
Finally, the section of Pn1 to the shape point composition between Pn7 is determined as target road section, wherein target road section is not wrapped Include Pn1 and Pn7.
In another embodiment of the application, to above-mentioned steps S410, in the target road section, acquisition can mark institute The process in the section for stating the text to be marked of road, the labeling position of the text to be marked as the road is introduced, knot It closes shown in Fig. 9, this method comprises:
Step S700, according to the length of text to be marked single in the text to be marked of the road, on the target road At least one rectangle frame is generated between the adjacent shapes point of section and obtains its position;
Wherein, the spacing of the central point of the adjacent rectangle frame between adjacent shapes point is equal to the length of single text to be marked Degree.
Step S710, according to the position of occupied rectangle frame and the position of the rectangle frame of generation, the rectangle frame generated is determined It is whether occupied;
Specifically, the position of occupied rectangle frame can be stored in advance in the application.It in turn, can be according to quilt in this step The position of the position of rectangle frame and the rectangle frame of generation is occupied, determines whether the rectangle frame generated is occupied.
Step S720, by it is continuous, be determined as rectangle frame point of the unoccupied and number not less than text number to be marked Enter a rectangle frame group;
If step S730, the described rectangle frame group only has one, what the rectangle frame group occupied in the target road section Section is the section that can mark the text to be marked of the road;
If step S740, the described rectangle frame group obtains the rectangle frame group in the target road section there are two more than To the distance value in the center section, the corresponding section of lowest distance value is that can mark the to be marked of the road in the section of occupancy The section of text.
Optionally, the embodiment of the present application describes a kind of road for obtaining the rectangle frame group and occupying in the target road section Section arrives the optional embodiment of the distance value in the center section.For the ease of statement, rectangle frame group is defined on the target road The section occupied in section is occupy-place section.Then distance value acquisition modes may include:
Calculate the central point of occupy-place section and the distance between the central point in center section, the distance value as the two.
In addition to this it is possible to calculate the starting point of occupy-place section at a distance from the starting point in center section, or calculate occupy-place Distance value of the terminating point of section at a distance from the terminating point in center section, as the two.
It is the text to be marked that can mark the road that the corresponding section of lowest distance value can be chosen in the present embodiment Section.Since center section is straight line, chooses and it apart from nearest section is used as labeling position, so that mark is literary Word is more favorable for user's viewing close to flat section.
In conjunction with the exemplary scene of Figure 10, the process of above-mentioned Fig. 9 corresponding embodiment is illustrated.
Shape point P1-P6 forms target road section in Figure 10, wherein P3-P4 organization center section.Text number to be marked is 4。
Rectangle frame is generated between two neighboring shape point in target road section, the spacing of the central point of adjacent rectangle frame is equal to The length of single text to be marked.
In Figure 10, the unfilled rectangle frame of white represents unappropriated rectangle frame, and the rectangle frame of oblique line filling represents Occupied rectangle frame.
Rectangle frame by continuous, unoccupied and number not less than text number to be marked is divided into a rectangle frame group In.Rectangle frame group seg1 and rectangle frame group seg2 it follows that available two rectangle frame groups, i.e. in Figure 10.
Since there are two rectangle frame groups, then calculates separately two rectangle frame groups and occupy section to center in target road section The distance value in section, and select the corresponding section of lowest distance value, i.e. the corresponding section seg1 as can mark road wait mark The section of explanatory notes word.
It is provided in this embodiment, the mode of labeling position is searched in the target road section, is looked into according to rectangle frame mode Available section is looked for, as the labeling position of text to be marked, lookup result is more accurate.
Wherein, step S700 generates the process of rectangle frame, can implement as follows:
Defined parameters first:
The half fHalfFontSize of the width of single text to be marked;
The included shape point set of target road section [P1P2 ... PN];
Variable fTmpOffSet records the cumulative distance of rectangle frame central point to be detected from previous nearest shape point, as Whether the line segment of adjacent two shape points composition detects the label finished, and fTmpOffSet initial length is fHalfFontSize;
The variable nRectCount of statistics rectangle frame number is initially 0;Record can place the total number of rectangle frame NSumCount=target road section length/single text occupy-place length.
Implementation process is as follows:
Step 1: sequence takes a shape point from the shape point set [P1P2 ... PN-1], calculate the shape point with it is next The length of a shape point line formed section is fListRoadLen, and calculates line segment direction unit vector, is used for subsequent calculating;
Step 2: judging whether fTmpOffSet is less than or equal to fListRoadLen, if it is, step 3 is executed, it is no Then follow the steps four;
Step 3: the line segment starting point obtained based on step 1, line taking segment endpoint direction length are the position of fTmpOffSet, As rectangle frame center, a rectangle frame is generated, the width of a height of text of the width of the rectangle frame of generation is high, executes step 5;
Step 4: taking fTmpOffset=fTmpOffset-fListRoadLen, jumps out circulation, executes step 1;
Step 5: the position of the rectangle frame of generation is saved;
Step 6: enabling nRectCount+1, and judges whether nRectCount has exceeded the maximum number that can be placed NSumCount if it is indicates that target road section all detects and goes over, terminates entire detection, EP (end of program).Otherwise step is executed Rapid seven;
Step 7: judge whether fTmpOffset+fHalfFontSize*2 is greater than fListRoadLen, it is clear that if big In, then it represents that the central point of next rectangle frame needs to continue to detect next line segment, at this moment needs to examine not on current line segment Consider the remaining surplus part of current line segment and resets fTmpOffset, fTmpOffset=fHalfFontSize*2+ FTmpOffset-fListRoadLen, and then execute step 1 and continue to detect, if fTmpOffset+fHalfFontSize*2 is not Greater than fListRoadLen, then it represents that the central point of next rectangle frame continues to execute step 8 also on current line segment;
Step 8: resetting fTmpOffset, fTmpOffset=fTmpOffset+fHalfFontSize*2, i.e., cumulative one A word length executes step 2.
Further, above-mentioned steps S720 determines the process of rectangle frame group, can implement as follows:
Defined parameters first:
For storing the label array bFlagArray of the whether occupied state of each rectangle frame generated, size is equal to The rectangle frame number nVexNum of generation;The number nCalCharSize of text to be marked;Continuous unoccupied rectangle is detected Frame number nCount, is initially 0.
Implementation process is as follows:
Step 1: sequentially taking out the occupied state of rectangle frame from bFlagArray, whether judges the occupied state taken out It indicates that corresponding rectangle frame is unoccupied, if it is step 2 is executed, otherwise executes step 3;
Step 2: enabling nCount+1, and the rectangle frame currently taken out is available rectangle frame, judges that the rectangle frame currently taken out is The no starting point for available Continuous Rectangular frame, will if it is write down the position of starting point, otherwise not need.Continue to execute step 1;
Step 3: when front frame is occupied rectangle frame, judge the continuous unoccupied rectangle frame number that front records It is whether enough, that is, judge whether to meet nCount >=nCalCharSize, if not, label does not find suitable position, open again Begin to detect, execute step 1, if so, executing step 4;
Step 4: the position of record nearest unappropriated rectangle frame before front frame, as final position, by The corresponding rectangle frame in point position to the corresponding rectangle frame of final position form one it is continuous, be determined as unoccupied and number not Less than the rectangle frame group of text number to be marked.
Finally after looping through the occupied state of each rectangle frame in bFlagArray, several rectangle frames are obtained Group.
Finally, now passing through Figure 11 a and 11b to prove that road provided by the embodiments of the present application determines the validity of method It is illustrated:
The programme path to one from Beijing to Tianjin is now needed to carry out Road letterings mark.After being marked according to the prior art Effect as shown in fig. 11a, according to the application method mark after effect as shown in figure 11b.
The application is according to the map zoom levels of electronic map to be shown and the line width information of road, to the road of acquisition Shape point set vacuated, determined according to the shape point set for vacuating rear road mark text labeling position.Because Vacuating reduces some shape points, so that shape point spacing is increased, to improve to obtain the probability of labeling position.
Further, the application carries out segmentation division to the shape point of road, determines to include the maximum adjacent shapes point of spacing Candidate segment, therefore be calculated from the candidate segment hold the probability of the position of text to be marked enough can be bigger, into one Step improves the probability that labeling position is calculated, and guarantees the labeling position being calculated close to flat section.
Further, the application searches the position not occupied by other texts using rectangle frame mode, prevents from finding Labeling position be labeled with other texts, lead to the problem of text gland.
Comparison diagram 11a and Figure 11 b, which can be seen that, can not be calculated label character position according to the prior art, lead to nothing Faxian shows that Road letterings mark, and can find labeling position according to application scheme, and labeling position is located on flat section, And not with other text glands.
Road determining device provided by the embodiments of the present application is described below, road determining device described below with Above-described road determines that method can correspond to each other reference.
Referring to Figure 12, Figure 12 is a kind of road determining device structural schematic diagram disclosed in the embodiment of the present application.
As shown in figure 12, which includes:
Road data acquiring unit 11, for obtaining road data, the road data includes the shape point for forming road Set;
Information acquisition unit 12, for obtaining the map zoom levels of electronic map to be shown and the line width of the road Information;
Unit 13 is vacuated, for the line width information according to the map zoom levels and the road, to the road Shape point set in shape point vacuated, obtain the shape point set for vacuating rear road.
Road determining device provided by the embodiments of the present application, according to the map zoom levels and road of electronic map to be shown The line width information on road vacuates the shape point set of the road of acquisition, improves calculating labeling position to a certain extent Efficiency because vacuating reduces some shape points, so that shape point spacing is increased, to improve to obtain labeling position Probability.
Optionally, the unit that vacuates is according to the line width information of the map zoom levels and the road, to described Shape point in the shape point set of road is vacuated, and the process for the shape point set for vacuating rear road is obtained, specifically can be with Include:
According to the line width information of the map zoom levels and the road, obtain the road vacuates jump point threshold Value;
Successively choose a shape point from the shape point set of the road, calculate the shape point of the selection with it is next adjacent The distance of shape point;
The map zoom levels are compared with the map zoom levels threshold value of setting, if the map zoom levels Greater than setting map level of zoom threshold value, then judge the distance whether be more than it is described vacuate jump point threshold value, if so, retaining institute The shape point of selection is stated, if it is not, then the shape point by the selection vacuates;
The shape point of reservation constitutes the shape point set for vacuating rear road.
Optionally, each shape point is provided with and vacuates label in the shape point set, and the unit that vacuates is according to The line width information of map zoom levels and the road vacuates the shape point set of the road, after being vacuated The process of the shape point set of road can also include:
If the map zoom levels are no more than the setting map level of zoom threshold value, the shape of the selection is judged The value for vacuating label of point indicates whether that this is vacuated labeled as effective;
If indicating, this is vacuated labeled as effectively, and the shape point of the selection is vacuated;
If indicating, this is vacuated labeled as invalid, judge the distance whether be more than it is described vacuate jump point threshold value, if so, Determine the shape point for retaining the selection, if not, it is determined that vacuate the shape point of the selection;
The shape point of reservation constitutes the shape point set for vacuating rear road.
Optionally, the unit that vacuates obtains the road according to the line width information of the map zoom levels and road The process for vacuating jump point threshold value on road, can specifically include:
Obtain that the map zoom levels are corresponding to vacuate jump point threshold calculations formula;
Wherein, it vacuates jump point threshold calculations formula to define under corresponding map zoom levels, vacuates jump point threshold value and road The numerical relation of the line width on road.
According to the line width for vacuating jump point threshold calculations formula and road of acquisition, calculating vacuates jump point threshold value.
Optionally, the road determining device of the application can also include labeling position determination unit, for according to the pumping The shape point set of road, determines mark position of the information to be marked of the road in the electronic map to be shown after dilute It sets.
Wherein, the information to be marked can be text to be marked or navigation guide arrow to be marked etc..Hereinafter, with wait mark Information is infused to be illustrated for text to be marked.
Optionally, the labeling position determination unit vacuates the shape point set of rear road according to, determines the road The process of labeling position of the information to be marked on road in the electronic map to be shown, can specifically include:
The position that shape point in the shape point set of rear road is vacuated according to composition obtains one section of continuous target shape Shape point, the target shape point constitute the target road section for marking the text to be marked of the road, the target road section Length meets not less than the length and tortuous of the text to be marked sets tortuous condition;
In the target road section, the section that can mark the text to be marked of the road is obtained, as the road The labeling position of text to be marked.
Optionally, the labeling position determination unit vacuates shape point in the shape point set of rear road according to composition Position, obtain one section of continuous target shape point, the target shape point constitutes the text to be marked for marking the road The process of the target road section of word, can specifically include:
It is covered according to the position of shape point in the shape point set for vacuating rear road with the electronic map to be shown The shape point of the road is divided into several segments by the positional relationship of the geographic area of lid, each section comprising be located at it is described to Shape point in the geographic area of the electronic map covering of display;
For each section after division, the maximum spacing for the adjacent shapes point that this section is included is determined;
The size for comparing the maximum spacing of each section of adjacent shapes for being included point, by the maximum section of determination of maximum spacing intermediate value For candidate segment;
Section centered on the section that the shape point that the candidate segment medium spacing is equal to maximum spacing is formed;
Calculate the length of the text to be marked;
Judge whether the length of the candidate segment is greater than the length of the text to be marked;
If so, using the shape point at center section both ends as starting point, the shape point with the both ends of the candidate segment is Terminal;
For each starting point, since the starting point, it is located at the shape between the starting point and its adjacent terminal in the candidate segment In shape point, sequential search meets the shape point for setting tortuous condition, until the corresponding stopping shape point of the starting point is searched, it is described to stop Only shape point is not meet to set tortuous condition or the stopping shape point as the terminal;
Using the section of the corresponding two shape point compositions stopped between shape point of two starting points as target road section.
Optionally, the labeling position determination unit is located at the starting point and its phase in the candidate segment since the starting point In shape point between adjacent terminal, sequential search meets the shape point for setting tortuous condition, until searching, the starting point is corresponding to stop The only process of shape point, can specifically include:
From starting point P0Start, it is suitable in the shape point that the candidate segment is located between the starting point and its adjacent terminal Sequence selected shape point, if the shape point chosen is the terminal, the shape point of the selection is to stop shape point otherwise holding Row following steps:
It is elected that get is shape point P1, then ∠ P is obtained1P0P’0Angle value, if the angle value is greater than preset the One angle threshold, the then P1For starting point P0Corresponding stopping shape point;
When that read is shape point Pi, i initial value is 2, obtains ∠ PiPi-1Pi-2With ∠ PiP0P’0Angle value, every choosing Take shape point an i=i+1, P '0To be different from P0Another starting point;
If ∠ PiPi-1Pi-2Greater than preset first angle threshold value or ∠ PiP0P’0Angle value be greater than preset second Angle threshold, the then PiFor starting point P0Corresponding stopping shape point.
Optionally, the labeling position determination unit is in the target road section, obtain can mark the road wait mark The section of explanatory notes word, the labeling position of the text to be marked as road ground process, can specifically include:
According to the length of text to be marked single in the text to be marked of the road, in the adjacent shape of the target road section At least one rectangle frame is generated between shape point and obtains its position, between the central point of the adjacent rectangle frame between adjacent shapes point Away from the length for being equal to single text to be marked;
According to the position of occupied rectangle frame and the position of the rectangle frame of generation, determine whether the rectangle frame generated is occupied With;
By it is continuous, be determined as unoccupied and number and be divided into a rectangle not less than the rectangle frame of text number to be marked Frame group;
If the rectangle frame group only has one, the section that the rectangle frame group occupies in the target road section is that can mark Infuse the section of the text to be marked of the road;
If the rectangle frame group obtains the section that the rectangle frame group occupies in the target road section there are two more than To the distance value in the center section, the corresponding section of lowest distance value is the road that can mark the text to be marked of the road Section.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (18)

1. a kind of road determines method characterized by comprising
Road data is obtained, the road data includes the shape point set for forming road;
Obtain the map zoom levels of electronic map to be shown and the line width information of the road;
According to the line width information of the map zoom levels and the road, to the shape in the shape point set of the road Point is vacuated, and the shape point set for vacuating rear road is obtained.
2. the method according to claim 1, wherein described according to the map zoom levels and the road Line width information, the shape point in the shape point set of the road is vacuated, the shape point set for vacuating rear road is obtained It closes, comprising:
According to the line width information of the map zoom levels and the road, obtain the road vacuates jump point threshold value;
Successively choose a shape point from the shape point set of the road, calculate the selection shape point and next adjacent shapes The distance of point;
The map zoom levels are compared with the map zoom levels threshold value of setting, if the map zoom levels are greater than Setting map level of zoom threshold value, then judge the distance whether be more than it is described vacuate jump point threshold value, if so, retaining the choosing The shape point taken, if it is not, then the shape point by the selection vacuates;
The shape point of reservation constitutes the shape point set for vacuating rear road.
3. according to the method described in claim 2, it is characterized in that, each shape point is provided with and vacuates in the shape point set Label, this method further include:
If the map zoom levels are no more than the setting map level of zoom threshold value, the shape point of the selection is judged The value for vacuating label indicates whether that this is vacuated labeled as effective;
If indicating, this is vacuated labeled as effectively, and the shape point of the selection is vacuated;
If indicating, this is vacuated labeled as invalid, judge the distance whether be more than it is described vacuate jump point threshold value, if so, retaining The shape point of the selection, if it is not, then the shape point by the selection vacuates;
The shape point of reservation constitutes the shape point set for vacuating rear road.
4. according to the method described in claim 2, it is characterized in that, described according to the map zoom levels and the road Line width information, obtain the road vacuates jump point threshold value, comprising:
Obtain that the map zoom levels are corresponding to vacuate jump point threshold calculations formula;
According to the line width for vacuating jump point threshold calculations formula and road of acquisition, calculating vacuates jump point threshold value.
5. method according to claim 1-4, which is characterized in that further include:
According to the shape point set for vacuating rear road, determine the information to be marked of the road in the electronics to be shown Labeling position in map.
6. according to the method described in claim 5, it is characterized in that, the information to be marked is text to be marked, the basis The shape point set for vacuating rear road determines the information to be marked of the road in the electronic map to be shown Labeling position, comprising:
According to the position of shape point in the shape point set for vacuating rear road, one section of continuous target shape point, institute are obtained It states target shape point and constitutes target road section for marking the text to be marked of the road, the length of the target road section is not small Meet in the length and tortuous of the text to be marked and sets tortuous condition;
In the target road section, the section that can mark the text to be marked of the road is obtained, as the road wait mark The labeling position of explanatory notes word.
7. according to the method described in claim 6, it is characterized in that, in the shape point set for vacuating rear road according to The position of shape point, obtains one section of continuous target shape point, the target shape point constitute for mark the road to Mark the target road section of text, comprising:
It is covered according to the position of shape point in the shape point set for vacuating rear road and the electronic map to be shown The shape point of the road is divided into several segments by the positional relationship of geographic area, and each section described to be shown comprising being located at Electronic map covering geographic area in shape point;
For each section after division, the maximum spacing for the adjacent shapes point that this section is included is determined;
Maximum spacing intermediate value is determined as waiting for maximum section by the size for comparing the maximum spacing of each section of adjacent shapes for being included point Selections;
Section centered on the section that the shape point that the candidate segment medium spacing is equal to maximum spacing is formed;
Calculate the length of the text to be marked;
Judge whether the length of the candidate segment is greater than the length of the text to be marked;
If so, using the shape point at center section both ends as starting point, using the shape point at the both ends of the candidate segment as terminal;
For each starting point, since the starting point, it is located at the shape point between the starting point and its adjacent terminal in the candidate segment In, sequential search meets the shape point for setting tortuous condition, until searching the corresponding stopping shape point of the starting point, the stopping shape Shape point is not meet to set tortuous condition or the stopping shape point as the terminal;
Using the section of the corresponding two shape point compositions stopped between shape point of two starting points as target road section.
8. being located in the candidate segment should the method according to the description of claim 7 is characterized in that described since the starting point In shape point between starting point and its adjacent terminal, sequential search meets the shape point for setting tortuous condition, until searching this The corresponding stopping shape point of point, comprising:
From starting point P0Start, in the shape point that the candidate segment is located between the starting point and its adjacent terminal, sequence is chosen Shape point, if the shape point chosen is the terminal, the shape point of the selection is to stop shape point, otherwise, is executed following Step:
It is elected that get is shape point P1, then ∠ P is obtained1P0P’0Angle value, if the angle value be greater than preset first angle Threshold value, the then P1For starting point P0Corresponding stopping shape point;
When that read is shape point Pi, i initial value is 2, obtains ∠ PiPi-1Pi-2With ∠ PiP0P’0Angle value, it is every choose one A shape point i=i+1, P '0To be different from P0Another starting point;
If ∠ PiPi-1Pi-2Greater than preset first angle threshold value or ∠ PiP0P’0Angle value be greater than preset second angle threshold It is worth, then the PiFor starting point P0Corresponding stopping shape point.
9. the method according to the description of claim 7 is characterized in that acquisition can mark the road in the target road section Text to be marked section, comprising:
According to the length of text to be marked single in the text to be marked of the road, in the adjacent shapes point of the target road section Between generate at least one rectangle frame and obtain its position, the spacing etc. of the central point of the adjacent rectangle frame between adjacent shapes point In the length of single text to be marked;
According to the position of occupied rectangle frame and the position of the rectangle frame of generation, determine whether the rectangle frame generated is occupied;
By it is continuous, be determined as unoccupied and number and be divided into a rectangle frame not less than the rectangle frame of text number to be marked Group;
If the rectangle frame group only has one, the section that the rectangle frame group occupies in the target road section is can mark institute State the section of the text to be marked of road;
If the rectangle frame group there are two more than, obtains section that the rectangle frame group occupies in the target road section to institute The distance value in center section is stated, the corresponding section of lowest distance value is the section that can mark the text to be marked of the road.
10. a kind of road determining device characterized by comprising
Road data acquiring unit, for obtaining road data, the road data includes the shape point set for forming road;
Information acquisition unit, for obtaining the map zoom levels of electronic map to be shown and the line width information of the road;
Unit is vacuated, for the line width information according to the map zoom levels and the road, to the shape of the road Shape point in point set is vacuated, and the shape point set for vacuating rear road is obtained.
11. device according to claim 10, which is characterized in that it is described vacuate unit according to the map zoom levels with And the line width information of the road, the shape point in the shape point set of the road is vacuated, obtains vacuating rear road Shape point set process, specifically include:
According to the line width information of the map zoom levels and the road, obtain the road vacuates jump point threshold value;
Successively choose a shape point from the shape point set of the road, calculate the selection shape point and next adjacent shapes The distance of point;
The map zoom levels are compared with the map zoom levels threshold value of setting, if the map zoom levels are greater than Setting map level of zoom threshold value, then judge the distance whether be more than it is described vacuate jump point threshold value, if so, retaining the choosing The shape point taken, if it is not, then the shape point by the selection vacuates;
The shape point of reservation constitutes the shape point set for vacuating rear road.
12. device according to claim 11, which is characterized in that each shape point is provided with pumping in the shape point set Dilute label, the unit that vacuates is according to the line width information of the map zoom levels and the road, to the shape of the road Shape point in shape point set is vacuated, and the process for the shape point set for vacuating rear road is obtained, further includes:
If the map zoom levels are no more than the setting map level of zoom threshold value, the shape point of the selection is judged The value for vacuating label indicates whether that this is vacuated labeled as effective;
If indicating, this is vacuated labeled as effectively, and the shape point of the selection is vacuated;
If indicating, this is vacuated labeled as invalid, judge the distance whether be more than it is described vacuate jump point threshold value, if so, retaining The shape point of the selection, if it is not, then the shape point by the selection vacuates;
The shape point of reservation constitutes the shape point set for vacuating rear road.
13. device according to claim 11, which is characterized in that it is described vacuate unit according to the map zoom levels with And the line width information of the road, the process for vacuating jump point threshold value of the road is obtained, is specifically included:
Obtain that the map zoom levels are corresponding to vacuate jump point threshold calculations formula;
According to the line width for vacuating jump point threshold calculations formula and road of acquisition, calculating vacuates jump point threshold value.
14. the described in any item devices of 0-13 according to claim 1, which is characterized in that further include:
Labeling position determination unit determines the to be marked of the road for vacuating the shape point set of rear road according to Labeling position of the information in the electronic map to be shown.
15. device according to claim 14, which is characterized in that the information to be marked is text to be marked, the mark Note position determination unit vacuates the shape point set of rear road according to, determine the information to be marked of the road it is described to The process of labeling position in the electronic map of display, specifically includes:
According to the position of shape point in the shape point set for vacuating rear road, one section of continuous target shape point, institute are obtained It states target shape point and constitutes target road section for marking the text to be marked of the road, the length of the target road section is not small Meet in the length and tortuous of the text to be marked and sets tortuous condition;
In the target road section, the section that can mark the text to be marked of the road is obtained, as the road wait mark The labeling position of explanatory notes word.
16. device according to claim 15, which is characterized in that after the labeling position determination unit is vacuated according to The position of shape point in the shape point set of road obtains one section of continuous target shape point, and the target shape point, which is constituted, to be used In the process of the target road section for the text to be marked for marking the road, specifically include:
It is covered according to the position of shape point in the shape point set for vacuating rear road and the electronic map to be shown The shape point of the road is divided into several segments by the positional relationship of geographic area, and each section described to be shown comprising being located at Electronic map covering geographic area in shape point;
For each section after division, the maximum spacing for the adjacent shapes point that this section is included is determined;
Maximum spacing intermediate value is determined as waiting for maximum section by the size for comparing the maximum spacing of each section of adjacent shapes for being included point Selections;
Section centered on the section that the shape point that the candidate segment medium spacing is equal to maximum spacing is formed;
Calculate the length of the text to be marked;
Judge whether the length of the candidate segment is greater than the length of the text to be marked;
If so, using the shape point at center section both ends as starting point, using the shape point at the both ends of the candidate segment as terminal;
For each starting point, since the starting point, it is located at the shape point between the starting point and its adjacent terminal in the candidate segment In, sequential search meets the shape point for setting tortuous condition, until searching the corresponding stopping shape point of the starting point, the stopping shape Shape point is not meet to set tortuous condition or the stopping shape point as the terminal;
Using the section of the corresponding two shape point compositions stopped between shape point of two starting points as target road section.
17. device according to claim 16, which is characterized in that the labeling position determination unit since the starting point, In the shape point that the candidate segment is located between the starting point and its adjacent terminal, sequential search meets the shape for setting tortuous condition Shape point specifically includes until searching the corresponding process for stopping shape point of the starting point:
From starting point P0Start, in the shape point that the candidate segment is located between the starting point and its adjacent terminal, sequence is chosen Shape point, if the shape point chosen is the terminal, the shape point of the selection is to stop shape point, otherwise, is executed following Step:
It is elected that get is shape point P1, then ∠ P is obtained1P0P’0Angle value, if the angle value be greater than preset first angle Threshold value, the then P1For starting point P0Corresponding stopping shape point;
When that read is shape point Pi, i initial value is 2, obtains ∠ PiPi-1Pi-2With ∠ PiP0P’0Angle value, it is every choose one A shape point i=i+1, P '0To be different from P0Another starting point;
If ∠ PiPi-1Pi-2Greater than preset first angle threshold value or ∠ PiP0P’0Angle value be greater than preset second angle threshold It is worth, then the PiFor starting point P0Corresponding stopping shape point.
18. device according to claim 16, which is characterized in that the labeling position determination unit is in the target road section In, the process that can mark the section of text to be marked of the road is obtained, is specifically included:
According to the length of text to be marked single in the text to be marked of the road, in the adjacent shapes point of the target road section Between generate at least one rectangle frame and obtain its position, the spacing etc. of the central point of the adjacent rectangle frame between adjacent shapes point In the length of single text to be marked;
According to the position of occupied rectangle frame and the position of the rectangle frame of generation, determine whether the rectangle frame generated is occupied;
By it is continuous, be determined as unoccupied and number and be divided into a rectangle frame not less than the rectangle frame of text number to be marked Group;
If the rectangle frame group only has one, the section that the rectangle frame group occupies in the target road section is can mark institute State the section of the text to be marked of road;
If the rectangle frame group there are two more than, obtains section that the rectangle frame group occupies in the target road section to institute The distance value in center section is stated, the corresponding section of lowest distance value is the section that can mark the text to be marked of the road.
CN201710786685.0A 2017-09-04 2017-09-04 A kind of road determines method and device Pending CN110019588A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710786685.0A CN110019588A (en) 2017-09-04 2017-09-04 A kind of road determines method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710786685.0A CN110019588A (en) 2017-09-04 2017-09-04 A kind of road determines method and device

Publications (1)

Publication Number Publication Date
CN110019588A true CN110019588A (en) 2019-07-16

Family

ID=67186200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710786685.0A Pending CN110019588A (en) 2017-09-04 2017-09-04 A kind of road determines method and device

Country Status (1)

Country Link
CN (1) CN110019588A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619018A (en) * 2019-09-26 2019-12-27 深圳前海微众银行股份有限公司 Map overlay rarefying method, device, equipment and computer storage medium
CN111857627A (en) * 2020-07-16 2020-10-30 北京奇虎科技有限公司 Graphic processing method, apparatus, device and storage medium
CN114877893A (en) * 2022-05-05 2022-08-09 普联技术有限公司 Map generation method and device, electronic equipment and storage medium
CN117131297A (en) * 2023-07-20 2023-11-28 克拉玛依天地图有限公司 Quick release method of geographic information data based on browser

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103185582A (en) * 2011-12-30 2013-07-03 上海博泰悦臻电子设备制造有限公司 Road network shape point data loading method and device, and navigation method and device
CN104239329A (en) * 2013-06-18 2014-12-24 上海博泰悦臻电子设备制造有限公司 Method and device for saving and loading map road shape point data
CN104268911A (en) * 2014-09-18 2015-01-07 腾讯科技(深圳)有限公司 Method and device for drawing route in map

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103185582A (en) * 2011-12-30 2013-07-03 上海博泰悦臻电子设备制造有限公司 Road network shape point data loading method and device, and navigation method and device
CN104239329A (en) * 2013-06-18 2014-12-24 上海博泰悦臻电子设备制造有限公司 Method and device for saving and loading map road shape point data
CN104268911A (en) * 2014-09-18 2015-01-07 腾讯科技(深圳)有限公司 Method and device for drawing route in map

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619018A (en) * 2019-09-26 2019-12-27 深圳前海微众银行股份有限公司 Map overlay rarefying method, device, equipment and computer storage medium
CN111857627A (en) * 2020-07-16 2020-10-30 北京奇虎科技有限公司 Graphic processing method, apparatus, device and storage medium
CN114877893A (en) * 2022-05-05 2022-08-09 普联技术有限公司 Map generation method and device, electronic equipment and storage medium
CN117131297A (en) * 2023-07-20 2023-11-28 克拉玛依天地图有限公司 Quick release method of geographic information data based on browser

Similar Documents

Publication Publication Date Title
CN110019588A (en) A kind of road determines method and device
CN109427238A (en) A kind of Road letterings labeling position determines method and device
Marchesin et al. View-dependent streamlines for 3D vector fields
US9798819B2 (en) Selective map marker aggregation
CN103279539B (en) The display packing of interest point set, the display packing of electronic chart and device
CN109427237A (en) A kind of Road letterings labeling position determines method and device
US9275092B2 (en) Methods and systems for encoding the maximum resolution data level for a quadtree
Gao et al. Visible reverse k-nearest neighbor query processing in spatial databases
CN106844458B (en) Method, computing device and storage medium for displaying online behavior track of user
JP3571162B2 (en) Similar object search method and apparatus
CN106874339B (en) Display method of directed cyclic graph and application thereof
CN115762218A (en) Parking space map generation method, device, equipment and storage medium
CN103914877A (en) Three-dimensional model multi-detail-level structure based on extension combination
JP2015132539A (en) Sunshine quantity calculating apparatus, route proposing apparatus, and sunshine quantity calculating method
CN109859525A (en) Parking stall air navigation aid based on A star algorithm
CN103852080B (en) The map-indication method of object and system
WO2017036409A1 (en) Site acquisition method, server, client and system
JP5830153B1 (en) Information display device, distribution device, information display method, and information display program
CN110646005A (en) Method and device for displaying map area features based on map interface
US7057614B2 (en) Information display system and portable information terminal
CN108121725A (en) A kind of searching method and device
CN106887184B (en) Route update method and device
CN109173253A (en) Game role position decision method and device
JP6328085B2 (en) Information display device, distribution device, information display method, and information display program
KR101737544B1 (en) System and method for providing map transaction service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200506

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 100080 Beijing City, Haidian District Suzhou Street No. 3 floor 16 room 2

Applicant before: AUTONAVI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right