CN106557504B - Typesetting method and device for road character data in electronic map - Google Patents

Typesetting method and device for road character data in electronic map Download PDF

Info

Publication number
CN106557504B
CN106557504B CN201510627919.8A CN201510627919A CN106557504B CN 106557504 B CN106557504 B CN 106557504B CN 201510627919 A CN201510627919 A CN 201510627919A CN 106557504 B CN106557504 B CN 106557504B
Authority
CN
China
Prior art keywords
road
character data
road character
position coordinate
geographic position
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.)
Expired - Fee Related
Application number
CN201510627919.8A
Other languages
Chinese (zh)
Other versions
CN106557504A (en
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 Software 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 Software Co Ltd filed Critical Autonavi Software Co Ltd
Priority to CN201510627919.8A priority Critical patent/CN106557504B/en
Publication of CN106557504A publication Critical patent/CN106557504A/en
Application granted granted Critical
Publication of CN106557504B publication Critical patent/CN106557504B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • Instructional Devices (AREA)

Abstract

The invention provides a method and a device for typesetting road character data in an electronic map, wherein the method comprises the following steps: selecting one road character data from a pre-ordered road character data queue each time; acquiring a geographical position coordinate range of an electronic map displayed by a display screen according to the geographical position coordinate of the selected road character data, the electronic map scale and the preset size of the display screen, wherein the electronic map comprises road character data which are positioned in the center of the display screen; acquiring road character data of which the geographic position coordinates fall into the geographic position coordinate range of the electronic map from the typeset road character data queue; and performing cover judgment on the selected road character data and the obtained road character data, and if the cover is not performed, adding the selected road character data into the typeset road character data queue. The rendering efficiency of the electronic map can be improved, and the characters of each road on the electronic map can be uniformly displayed.

Description

Typesetting method and device for road character data in electronic map
Technical Field
The invention relates to the technical field of maps, in particular to a method and a device for typesetting road character data in an electronic map.
Background
Currently, an electronic map may display road characters, such as north four-ring middle road, G1 high speed or G104 national road, in addition to names of administrative areas and buildings. Wherein the north four middle roads belong to road names, and G1 and G104 belong to road numbers.
The quantity of road character data of the electronic map is too much, and in the prior art, in order to ensure the rendering effect of the electronic map, the road character data is usually screened by a map or a navigation engine in the electronic rendering process.
The prior art provides a method for displaying text labels on electronic map roads, which comprises the steps of obtaining an electronic map under a first display level; creating a first character buffer area on a first road needing to be marked with characters for display; acquiring existing display characters positioned in a first character buffer area on an electronic map, calculating a display area of the existing display characters, and removing the display area of the existing display characters in the first character buffer area to obtain a second character buffer area; and acquiring a third character buffer area which is created on a second road needing to be marked and displayed with characters, wherein the third character buffer area and the second character buffer area have an overlapping area, and removing the overlapping area in the second character buffer area to acquire a character marking area of the first road under the first display level.
However, in the above method, the region where the text labels are obtained by the overlapping portion is removed from the buffer where the text is displayed on the two roads. Therefore, for the sparse areas of the road network, the lines along the road are all character labeling areas, so that the phenomenon of character repeated labeling is displayed on the same road. And only the markable region of the road characters is calculated, and the number of the road characters is not limited, so that the display number of the road characters in some regions is too large, and the display number of the road characters in some regions is too small.
Therefore, those skilled in the art need to provide a method for typesetting text data of roads in an electronic map, which can improve rendering efficiency of the electronic map on the one hand, and can ensure that the text of each road on the electronic map can be uniformly displayed on the other hand, and the problems that some areas are too densely displayed and some areas are too sparsely displayed are avoided.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method and a device for typesetting road character data in an electronic map, which can improve the rendering efficiency of the electronic map on one hand and ensure that characters of each road on the electronic map can be uniformly displayed on the other hand, and the problems that the display of some areas is too dense and the display of some areas is too sparse can be avoided.
The embodiment of the invention provides a typesetting method of road character data in an electronic map, which comprises the following steps:
selecting one road character data from a pre-ordered road character data queue each time;
acquiring a geographical position coordinate range of an electronic map displayed by a display screen according to the geographical position coordinate of the selected road character data, the electronic map scale and the preset size of the display screen, wherein the electronic map comprises the road character data and the road character data is positioned in the center of the display screen;
acquiring road character data of which the geographic position coordinates fall into the geographic position coordinate range of the electronic map from the typeset road character data queue;
and performing cover judgment on the selected road character data and the obtained road character data, and if the cover is not performed, adding the selected road character data into the typeset road character data queue.
Preferably, from the pre-ordered road character data queue, selecting one road character data at a time, before further comprising:
sequencing all the road character data according to at least one of the following parameters to form the road character data queue: road grade, character string length, geographic position coordinate size and character type;
the priority of the road grade is higher than that of the road grade;
the priority of the character string with long length is higher than that with short length;
the priority of the large geographic position coordinate is higher than the priority of the small geographic position coordinate, or the priority of the small geographic position coordinate is higher than the priority of the large geographic position coordinate;
the text type levels are sequentially from high to low: road name, road sign number;
the road grade, the length of the character string, the coordinates of the lower left corner of the external rectangular frame and the priority of the character type are sequentially from high to low: road grade, text string length, geographic location coordinate size, and text type.
Preferably, before selecting one piece of road character data at a time from the pre-sorted road character data queue, the method further includes:
acquiring the geographic position coordinates of road character data of a road according to the geographic position coordinates of the shape points of the road;
and acquiring the geographic position coordinate of the vertex of the circumscribed rectangular frame of the road character data according to the geographic position coordinate of the road character data, the character string length of the road character data, the width and the height of each character in the preset road character data, the electronic map scale and the size of the display screen.
Preferably, the capping judgment is performed on the selected road character data and the obtained road character data, specifically:
judging whether the selected road character data are repeated with the road character data in the typeset road character data queue;
if not, judging whether the circumscribed rectangle frame of the selected road character data is intersected with the circumscribed rectangle frame of the obtained road character data;
if not, it is determined that there is no gland.
Preferably, before determining whether the circumscribed rectangle frame of the selected road character data intersects with the circumscribed rectangle frame of the obtained road character data, the method further includes:
judging whether the number of the acquired road character data is smaller than a preset numerical value or not;
if not, continuously judging whether the circumscribed rectangle frame of the selected road character data is intersected with the circumscribed rectangle frame of the obtained road character data.
The embodiment of the invention also provides a typesetting device for the road character data in the electronic map, which comprises the following steps: the device comprises a selection unit, a display screen coordinate obtaining unit, a road character data obtaining unit and a gland judging unit;
the selecting unit is used for selecting one road character data from a pre-ordered road character data queue each time;
the display screen coordinate obtaining unit is used for obtaining the geographical position coordinate range of the electronic map displayed on the screen according to the geographical position coordinate of the selected road character data, the electronic map scale and the size of a preset display screen, wherein the electronic map comprises the road character data and the road character data is positioned in the center of the display screen;
the road character data acquisition unit is used for acquiring road character data of which the geographic position coordinates fall into the geographic position coordinate range of the electronic map from the typeset road character data queue;
and the capping judgment unit is used for performing capping judgment on the selected road character data and the obtained road character data, and if the capping is not performed, the selected road character data is added into the typeset road character data queue.
Preferably, the apparatus further comprises: a sequence forming unit;
the sequence forming unit is used for sequencing all the road character data according to at least one of the following parameters to form the road character data queue: road grade, character string length, geographic position coordinate size and character type;
the priority of the road grade is higher than that of the road grade;
the priority of the character string with long length is higher than that with short length;
the priority of the large geographic position coordinate is higher than the priority of the small geographic position coordinate, or the priority of the small geographic position coordinate is higher than the priority of the large geographic position coordinate;
the text type levels are sequentially from high to low: road name, road sign number;
the road grade, the length of the character string, the coordinates of the lower left corner of the external rectangular frame and the priority of the character type are sequentially from high to low: road grade, text string length, geographic location coordinate size, and text type.
Preferably, the apparatus further comprises: a geographic position coordinate obtaining unit of road character data and a geographic position coordinate obtaining unit of the top point of the external rectangular frame;
the geographical position coordinate obtaining unit of the road character data is used for obtaining the geographical position coordinate of the road character data of the road according to the geographical position coordinate of the shape point of the road;
and the geographic position coordinate obtaining unit of the vertex of the external rectangular frame is used for obtaining the geographic position coordinate of the vertex of the external rectangular frame of the road character data according to the geographic position coordinate of the road character data, the character string length of the road character data, the width and the height of each character in the preset road character data, the electronic map scale and the size of the display screen.
Preferably, the capping judgment unit includes: the repeated judgment subunit, the intersection judgment subunit and the determination subunit are connected;
the repeated judging subunit is used for judging whether the selected road character data is repeated with the road character data in the typeset road character data queue;
the intersection judging subunit is configured to judge whether the circumscribed rectangular frame of the selected road character data intersects with the circumscribed rectangular frame of the obtained road character data when the repetition judging subunit judges that the selected road character data is not repeated with the road character data in the typeset road character data queue;
and the determining subunit is configured to determine that there is no capping when the intersection determining subunit determines that the circumscribed rectangular frame of the selected road character data does not intersect with the circumscribed rectangular frame of the acquired road character data.
Preferably, the capping judgment unit further includes: a number judgment subunit;
the number judging subunit is used for judging whether the number of the acquired road character data is smaller than a preset numerical value or not; if not, the intersection judgment subunit judges whether the circumscribed rectangle frame of the selected road character data intersects with the circumscribed rectangle frame of the obtained road character data.
Compared with the prior art, the invention has the following advantages:
for each selected road character data, acquiring the geographic position coordinate range of the electronic map displayed by the display screen, wherein the electronic map comprises the road character data and the road character data is positioned in the center of the display screen, and acquiring the road character data of which the geographic position coordinate falls into the geographic position coordinate range of the electronic map from the typeset road character data queue; and performing cover judgment on the selected road character data and the acquired road character data, and adding the selected road character data into the typeset road character data queue only when the selected road character data does not cover the acquired road character data, so that the road character data in the typeset road character data queue are ensured not to be mutually covered, and the road character data in the typeset road character data queue is understood to be the road character data which is finally required to be displayed on the electronic map. Because the road character data in the typeset road character data queue are subjected to the capping judgment, the road character data displayed on each electronic map on the current display screen are uniform finally, and the situation of being too sparse or too dense can not occur.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for typesetting road text data in an electronic map according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a method for typesetting road text data in an electronic map according to the present invention;
FIG. 3 is a schematic diagram illustrating an embodiment of a typesetting apparatus for road text data in an electronic map according to the present invention;
FIG. 4 is a schematic diagram of a second embodiment of a typesetting apparatus for road text data in an electronic map according to the present invention;
FIG. 5 is a third schematic view of the typesetting apparatus for road character data in an electronic map according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
The first embodiment of the method comprises the following steps:
referring to fig. 1, a flowchart of an embodiment of a method for typesetting road text data in an electronic map provided by the present invention is shown.
The method for typesetting the road character data in the electronic map provided by the embodiment comprises the following steps:
s101: selecting one piece of road character data from a pre-ordered road character data queue every time, for example, the 'Futongdong east avenue' is one piece of road character data;
the road character data are sorted in advance according to a preset rule to form a queue, and it can be understood that the road character data in the pre-sorted queue are sorted according to priority, the high priority is sorted in the front, the low priority is sorted in the back, that is, the road character data which needs to be preferentially displayed on the electronic map are arranged in the front. When selecting, the road character data in the queue before is selected to judge whether typesetting is carried out.
It can be understood that the pre-ordered queue includes all the road text data on the electronic map in the prior art, but the road text data is not completely displayed on the electronic map by the method provided by the embodiment, but a part of the road text data in the current display screen is removed and is not displayed, for example, the road text data displayed on the electronic map by the current display screen includes 200 pieces in total, but only 100 pieces of road text data may be displayed by the method of the embodiment.
S102: acquiring a geographical position coordinate range of an electronic map displayed by a display screen according to the geographical position coordinate of the selected road character data, the electronic map scale and the preset size of the display screen, wherein the electronic map comprises the road character data and the road character data is positioned in the center of the display screen;
s102 is to obtain the geographical position coordinate range of the electronic map displayed on the current display screen when the selected road character data is taken as the center of the display screen, so as to obtain the typeset road character data in the geographical position coordinate range.
S103: acquiring road character data of which the geographic position coordinates fall into the geographic position coordinate range of the electronic map from the typeset road character data queue;
it should be noted that, since the method provided in this embodiment is a step of circular typesetting, when the step S103 is executed for the first time, the typeset road character data queue is empty, and therefore, the road character data selected in the step S101 is directly added to the typeset road character data queue, but as the number of times of the circular execution increases, the typeset road character data queue is not empty, when the step S103 is executed again, the road character data whose geographic position coordinate falls within the geographic position coordinate range of the electronic map is acquired, and at this time, the capping judgment needs to be performed on the selected road character data and the N pieces of road character data, that is, the step S104 is executed.
S104: and performing cover judgment on the selected road character data and the obtained road character data, and if the cover is not performed, adding the selected road character data into the typeset road character data queue.
For ease of understanding, the following is exemplified.
For example, the selected road character data is a, the obtained road character data is N, and the capping judgment is performed on a and the N road character data. If there is a cover, A is not added to the composed road character data queue, and if there is no cover, A is added to the composed road character data queue. It should be noted that the typeset road character data queue refers to the road character data that has been typeset by the method provided by the embodiment in the whole electronic map, for example, M, and obviously M is greater than N. N is only the number of road character data in the geographic position coordinate range of the electronic map displayed by the current display screen included in M. Only when the layout of the road character data has not been started, that is, the laid-out road character data queue is empty, M is 0.
In the method provided by this embodiment, for each selected road character data, the geographical position coordinate range of the electronic map displayed by the display screen is obtained, the electronic map includes the road character data and the road character data is located at the center of the display screen, and the road character data of which the geographical position coordinate falls into the geographical position coordinate range of the electronic map is obtained from the typeset road character data queue. And performing cover judgment on the selected road character data and the acquired road character data, and adding the selected road character data into the typeset road character data queue only when the selected road character data does not cover the acquired road character data, so that the road character data in the typeset road character data queue are ensured not to be mutually covered, and the road character data in the typeset road character data queue is understood to be the road character data which is finally required to be displayed on the electronic map. Because the road character data in the typeset road character data queue are subjected to the capping judgment, the road character data on each electronic map displayed on the current display screen are uniform finally, and the situation of being too sparse or too dense can not occur.
The second method embodiment:
referring to fig. 2, a flowchart of an embodiment of a method for typesetting road text data in an electronic map provided by the present invention is shown.
The method for typesetting the road character data in the electronic map provided by the embodiment comprises the following steps:
s201: acquiring the geographic position coordinates of road character data of a road according to the geographic position coordinates of the shape points of the road;
it should be noted that, in the electronic map, each road includes many shape points, and the shape points are connected to form the road. Each shape point has a geographic position coordinate, so that the geographic position coordinate of the road can be represented by the geographic position coordinate of the shape point, and the geographic position coordinate of the road character data corresponding to the road can be obtained by the geographic position coordinate of the shape point.
It can be understood that the road is divided into road segments by the intersection, and preferably, in the embodiment of the present invention, K geographic position coordinates of the road text data may be calculated for each road segment of the road in advance, where K is an integer greater than or equal to 1, for example, K is 3, that is, the length of the road segment is divided into 3 segments, and the geographic position coordinate of the road text data is the geographic position coordinate of the center point of each divided segment. For example, a road is divided into 3 road segments, and the geographic position coordinates of 3 road character data are preset for each road segment, and then 9 geographic position coordinates are finally calculated for the road character data of the road. At this time, the obtaining of the geographic position coordinates of the road character data of the road according to the geographic position coordinates of the shape points of the road specifically includes:
obtaining K x J geographic position coordinates for the road character data of the road according to the geographic position coordinates of the shape points of the road, wherein J is the number of road sections forming the road, K is the number of the geographic position coordinates of the road character data required to be calculated for each preset road section, and the numerical value of K can be set by technical personnel according to requirements. This embodiment is applicable to all embodiments of the invention.
The road character data can be a road name, namely a north four-ring middle road; road signs such as highway G1, national road G104, etc. are also possible.
S202: and acquiring the geographic position coordinate of the vertex of the circumscribed rectangular frame of the road character data according to the geographic position coordinate of the road character data, the character string length of the road character data, the width and the height of each character in the preset road character data, the electronic map scale and the size of the display screen.
It should be noted that the geographic position coordinates of the vertices of the circumscribed rectangle box for obtaining the road text data may be the geographic position coordinates of the vertices of the lower left corner of the circumscribed rectangle box for obtaining the road text data and the geographic position coordinates of the vertices of the upper right corner of the circumscribed rectangle box.
It will be appreciated that the geographic location coordinates of the bounding rectangle box may be obtained from the geographic location coordinates of the lower left corner vertices and the geographic location coordinates of the upper right corner vertices of the bounding rectangle box.
S203: sequencing all the road character data according to at least one of the following parameters to form the road character data queue: road grade, character string length, geographic position coordinate size and character type;
it is understood that the parameter according to which the sequence is sorted may be only one of the above four parameters, for example, only the road rank, where the road text data with a high road rank has a higher priority than the road text data with a low road rank in the sorting, and the road ranks include, in order from high to low: expressway, national road, city expressway, provincial road, city main road, city secondary road, general road, narrow road, and navigation channel.
A string of words that is long is given a higher priority than a string that is short.
The priority of the large geographic position coordinate is higher than the priority of the small geographic position coordinate, or the priority of the small geographic position coordinate is higher than the priority of the large geographic position coordinate.
Wherein the geographic position coordinate is any one of the following: the geographic position coordinates of the road character data, the lower left corner geographic position coordinates of the external rectangular box of the road character data and the upper right corner geographic position coordinates of the external rectangular box of the road character data.
The text type levels are sequentially from high to low: road name, road sign.
In order to solve the problem of sorting the road character data with the same priority level of the parameters generated by a single parameter, a person skilled in the art can select more than two parameters from the above parameters to sort the road character data. For example, when the road grades are the same, the further judgment of the character string length can be increased. The priority of the road character data with long character string length is higher than that of the road character data with short character string length. When the parameters include: when the level grade of the road characters, the length of the character string, the size of the geographic position coordinate and the character type are four, the priority of the sequence formed by sequencing the road characters is sequentially from high to low: the level grade of the road characters, the length of the character string, the size of the geographic position coordinates and the character type.
S204-S206 are respectively the same as S101-S103 in the first embodiment of the method, and are not described herein again.
And performing gland judgment on the selected road character data and the obtained road character data, specifically:
s207: judging whether the selected road character data are repeated with the road character data in the typeset road character data queue; if not, executing S208; if yes (repeat), return to S204;
s208: judging whether the circumscribed rectangle frame of the selected road character data is intersected with the circumscribed rectangle frame of the obtained road character data; if not, executing S209, and if not, returning to S204;
it should be noted that, when determining whether the external rectangular frame intersects, the four positions of the external rectangular frame of the selected road character may be moved by one coordinate unit, respectively, and when the four positions are moved to intersect with the external rectangular frame of the road character within the range of the screened display screen, the intersection is determined. If there is a position disjointness after the move, the disjointness is determined. This is so that the road character display effect on the road is not affected, i.e., within a critical range, when the road character is fine-tuned.
S209: and if the intersection is not intersected, determining that no cover is covered, and adding the selected road characters into the typeset road character data queue.
It should be noted that, preferably, S207 and S208 are sequential, that is, it is determined whether the road characters are repeated first, and then it is determined whether the circumscribed rectangle frames intersect.
In order to reduce the number of pieces of road character data displayed on the electronic map, the following determination step may be added between S207 and S208: judging whether the number of the acquired road character data is smaller than a preset numerical value or not; if not, continuously judging whether the circumscribed rectangle frame of the selected road character data is intersected with the circumscribed rectangle frame of the obtained road character data.
For example, in order to reduce the number of pieces of road character data displayed on the electronic map, the number of pieces of road character data displayed at the maximum within the coordinate range of the display screen may be set to, for example, 100, and if the number exceeds 100, the road character data is no longer laid out within the coordinate range of the display screen.
The method provided by the embodiment can reduce the number of pieces of road character data displayed on the electronic map, for example, by using the method in the prior art, 1000 pieces of road character data are supposed to be displayed on the electronic map, but after the typesetting method of the embodiment is adopted, the number of pieces of road character data displayed on the electronic map is less than 1000. Repeated road character data are not displayed on the electronic map displayed on the current display screen, the maximum value of the number of the road character data which are allowed to be displayed is a preset numerical value, if the external rectangular frames of the two road character data are intersected, the road character data which are selected later are shielded and not typeset, and certainly, the road character data cannot be displayed on the electronic map subsequently. Therefore, the road character data displayed on each electronic map displayed on the current display screen are ensured to be uniform, and the situation that the road character data are displayed too sparsely or too densely can not occur.
Based on the method for typesetting the road character data in the electronic map provided by the embodiment, the embodiment of the invention also provides a typesetting device for the road character data in the electronic map, which is described in detail below with reference to the attached drawings.
The first embodiment of the device:
referring to fig. 3, the drawing is a schematic view of a typesetting apparatus for road text data in an electronic map according to an embodiment of the present invention.
The typesetting device for the road character data in the electronic map provided by the embodiment comprises: the device comprises a selection unit 301, a display screen coordinate obtaining unit 302, a road character data obtaining unit 303 and a gland judging unit 304;
the selecting unit 301 is configured to select one road character data from a pre-sorted road character data queue each time;
the road character data are sorted in advance according to a preset rule to form a queue, and it can be understood that the road character data in the pre-sorted queue are sorted according to priority, the high priority is sorted in the front, the low priority is sorted in the back, namely the road character data needing to be preferentially displayed on the electronic map are arranged in the front, and when the road character data are selected, the road character data in the queue in the front are selected to judge whether the typesetting is carried out.
It can be understood that the pre-ordered queue includes all the road text data on the electronic map in the prior art, but the road text data is not completely displayed on the electronic map after the method provided by the embodiment, but a part of the road text data is removed from the current screen and is not displayed, for example, the road text data displayed on the current screen of the original electronic map includes 200 pieces of road text data, but only 100 pieces of road text data may be displayed after the method of the embodiment.
The display screen coordinate obtaining unit 302 is configured to obtain a geographic position coordinate range of an electronic map displayed on a screen according to a geographic position coordinate of selected road text data, an electronic map scale, and a preset size of a display screen, where the electronic map includes the road text data and the road text data is located in the center of the display screen;
the road character queue obtaining unit 303 is configured to obtain road character data with a geographic position coordinate falling within a geographic position coordinate range of the electronic map from the typeset road character data queue;
it should be noted that the selecting unit 301 is a cyclic process, and when the electronic map is selected for the first time, the number of the road character data whose geographic position coordinates fall within the geographic position coordinate range of the electronic map is 0, but as the number of times of selection increases, the number of the road character data whose geographic position coordinates fall within the geographic position coordinate range of the electronic map includes N, and at this time, it is necessary to perform the capping judgment on the selected road character data and the N road character data.
The capping judgment unit 304 is configured to perform capping judgment on the selected road character data and the obtained road character data, and if the selected road character data is not capped, add the selected road character data to the typeset road character data queue.
For example, the selected road character data is a, the obtained road character data is N, and the capping judgment is performed on a and the N road character data. If there is a cover, A is not added to the composed road character data queue, and if there is no cover, A is added to the composed road character data queue. It should be noted that the typeset road character data queue refers to the road character data that has been typeset by the device provided in this embodiment in the whole electronic map, for example, M, and obviously M is greater than N. N is only the number of road character data in the geographic position coordinate range of the electronic map displayed by the current display screen included in M. Only when the layout of the road character data has not been started, M is 0, and N is also 0, where M is equal to N.
In the device provided by this embodiment, for each selected road character data, the geographic position coordinate range of the electronic map displayed on the display screen is obtained, the electronic map includes the road character data, and the road character data is located at the center of the display screen, and the road character data of which the geographic position coordinate falls into the geographic position coordinate range of the electronic map is obtained from the typeset road character data queue; . And performing cover judgment on the selected road character data and the acquired road character data, and adding the selected road character data into the typeset road character data queue only when the selected road character data does not cover the acquired road character data, so that the road character data in the typeset road character data queue are ensured not to be mutually covered, and the road character data in the typeset road character data queue is understood to be the road character data which is finally required to be displayed on the electronic map. Because the road character data in the typeset road character data queue are subjected to the capping judgment, the road character data on each electronic map displayed on the current display screen are uniform, and the situation of being too sparse or too dense can not occur.
The second device embodiment:
referring to fig. 4, the second embodiment of the typesetting apparatus for the road text data in the electronic map according to the present invention is shown.
Compared with the device in fig. 3, the typesetting device for the road character data in the electronic map provided by this embodiment further includes:
a geographic position coordinate obtaining unit 401 of road character data and a geographic position coordinate obtaining unit 402 of a vertex of an external rectangular frame;
the geographical position coordinate obtaining unit 401 is configured to obtain a geographical position coordinate of the road text data of the road according to the geographical position coordinate of the shape point of the road;
it should be noted that, in the electronic map, each road includes many shape points, and the shape points are connected to form the road. Each shape point has a geographic position coordinate, so that the geographic position coordinate of the road can be represented by the geographic position coordinate of the shape point, and the geographic position coordinate of the road character data corresponding to the road can be obtained by the geographic position coordinate of the shape point.
It can be understood that the road is divided into road segments by the intersection, and preferably, in the embodiment of the present invention, K geographic position coordinates of the road text data may be calculated for each road segment of the road in advance, where K is an integer greater than or equal to 1, for example, K is 3, that is, the length of the road segment is divided into 3 segments, and the geographic position coordinate of the road text data is the geographic position coordinate of the center point of each divided segment. For example, a road is divided into 3 road segments, and the geographic position coordinates of 3 road character data are preset for each road segment, and then 9 geographic position coordinates are finally calculated for the road character data of the road. At this time, the obtaining of the geographic position coordinates of the road character data of the road according to the geographic position coordinates of the shape points of the road specifically includes:
obtaining K x J geographic position coordinates for the road character data of the road according to the geographic position coordinates of the shape points of the road, wherein J is the number of road sections forming the road, K is the number of the geographic position coordinates of the road character data required to be calculated for each preset road section, and the numerical value of K can be set by technical personnel according to requirements. This embodiment is applicable to all embodiments of the invention.
The road character data can be a road name, namely a north four-ring middle road; road signs such as highway G1, national road G104, etc. are also possible.
And the geographic position coordinate obtaining unit 402 for obtaining the geographic position coordinate of the vertex of the external rectangular frame of the road character data according to the geographic position coordinate of the road character data, the character string length of the road character data, the width and the height of each character in the preset road character data, the electronic map scale and the size of the display screen.
The capping determination unit 304 includes: a repetition judgment subunit 304a, an intersection judgment subunit 304b, and a determination subunit 304 c;
the repetition judgment subunit 304a is configured to judge whether the selected road character data is repeated with the road character data in the typeset road character data queue;
the intersection judging subunit 304b is configured to, when the repetition judging subunit 304a judges that the selected road character data is not repeated with the road character data in the typeset road character data queue, judge whether the circumscribed rectangular frame of the selected road character data intersects with the circumscribed rectangular frame of the obtained road character data;
the determining subunit 304c is configured to determine that there is no capping when the intersection determining subunit 304b determines that the circumscribed rectangular frame of the selected road text data does not intersect with the circumscribed rectangular frame of the obtained road text data.
In order to reduce the number of pieces of road character data displayed on the electronic map, the capping determination unit further includes: a number judgment subunit 304 d;
the number judging subunit 304d is configured to judge whether the number of the acquired road character data is smaller than a preset value; if not, the intersection judgment subunit judges whether the circumscribed rectangle frame of the selected road character data intersects with the circumscribed rectangle frame of the obtained road character data.
For example, in order to reduce the number of pieces of road character data displayed on the electronic map, the number of pieces of road character data displayed at the maximum within the coordinate range of the display screen may be set to, for example, 100, and if the number exceeds 100, the road character data is no longer laid out within the coordinate range of the display screen.
The device provided in this embodiment can reduce the number of pieces of road character data displayed on the electronic map, for example, by using the method in the prior art, 1000 pieces of road character data are supposed to be displayed on the electronic map, but after the typesetting device of this embodiment is used, the number of pieces of road character data displayed on the electronic map is less than 1000. Repeated road character data are not displayed on the electronic map displayed on the current display screen, the maximum value of the number of the road character data which are allowed to be displayed is a preset numerical value, if the external rectangular frames of the two road character data are intersected, the road character data which are selected later are shielded and not typeset, and certainly, the road character data cannot be displayed on the electronic map subsequently. Therefore, the road character data finally displayed on the electronic map are not too much, and the situation that the road character data are too dense or too sparse is avoided.
The third device embodiment:
referring to fig. 5, the third schematic view of the typesetting apparatus for road text data in an electronic map provided by the invention is shown.
Compared with the device shown in fig. 4, the typesetting device for the road character data in the electronic map provided by the embodiment further includes: a sequence forming unit 501;
the sequence forming unit 501 is configured to sequence all the road character data to form the road character data queue according to at least one of the following parameters: road grade, character string length, geographic position coordinate size and character type;
the road grade priority is sequentially from high to low: expressway, national road, city expressway, provincial road, city main road, city secondary road;
the priority of the character string with long length is higher than that with short length;
the priority of the large geographic position coordinate is higher than the priority of the small geographic position coordinate, or the priority of the small geographic position coordinate is higher than the priority of the large geographic position coordinate;
the character type levels are sequentially from high to low: road name, road sign number;
the road grade, the length of the character string, the coordinates of the lower left corner of the external rectangular frame and the priority of the character type are sequentially from high to low: road grade, text string length, geographic location coordinate size, and text type.
The geographic location coordinate size is any one of: the geographic position coordinates of the road character data, the lower left corner geographic position coordinates of the external rectangular box of the road character data and the upper right corner geographic position coordinates of the external rectangular box of the road character data.
It can be understood that the geographic position coordinates of the circumscribed rectangle frame can be obtained from the lower left corner geographic position coordinates of the circumscribed rectangle frame and the upper right corner geographic position coordinates of the circumscribed rectangle frame.
The device provided by the invention can realize automatic typesetting of the road character data on the electronic map and ensure that the typesetted road character data can not be too sparse or too dense when displayed on the electronic map.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (2)

1. A method for typesetting road character data in an electronic map is characterized by comprising the following steps:
selecting one road character data from a pre-ordered road character data queue each time;
acquiring a geographical position coordinate range of an electronic map displayed by a display screen according to the geographical position coordinate of the selected road character data, the electronic map scale and the preset size of the display screen, wherein the electronic map comprises the road character data and the road character data is positioned in the center of the display screen;
acquiring road character data of which the geographic position coordinates fall into the geographic position coordinate range of the electronic map from the typeset road character data queue;
performing capping judgment on the selected road character data and the obtained typeset road character data, and if capping does not exist, adding the selected road character data into the typeset road character data queue;
the method comprises the following steps of selecting road character data, acquiring road character data, and carrying out capping judgment on the selected road character data and the acquired road character data, wherein the capping judgment specifically comprises the following steps:
judging whether the selected road character data are repeated with the road character data in the typeset road character data queue;
if the result is no, then,
judging whether the circumscribed rectangle frame of the selected road character data is intersected with the circumscribed rectangle frame of the obtained road character data;
if not, determining that there is no gland;
selecting one road character data from a pre-ordered road character data queue each time, wherein the method also comprises the following steps:
sequencing all the road character data according to at least one of the following parameters to form the road character data queue: road grade, character string length, geographic position coordinate size and character type;
the priority of the road grade is higher than that of the road grade;
the priority of the character string with long length is higher than that with short length;
the priority of the large geographic position coordinate is higher than the priority of the small geographic position coordinate, or the priority of the small geographic position coordinate is higher than the priority of the large geographic position coordinate;
the text type levels are sequentially from high to low: road name, road sign number;
the road grade, the length of the character string, the size of the geographic position coordinate and the priority of the character type are sequentially from high to low: road grade, character string length, geographic position coordinate size and character type;
in the pre-sorted road character data queue, selecting one road character data each time, the method further includes:
acquiring the geographic position coordinates of road character data of a road according to the geographic position coordinates of the shape points of the road;
acquiring the geographic position coordinate of the vertex of the circumscribed rectangular frame of the road character data according to the geographic position coordinate of the road character data, the character string length of the road character data, the width and the height of each character in the preset road character data, the electronic map scale and the size of the display screen;
before judging whether the circumscribed rectangle frame of the selected road character data intersects with the circumscribed rectangle frame of the obtained road character data, the method further comprises the following steps:
judging whether the number of the acquired road character data is smaller than a preset numerical value or not;
if not, continuously judging whether the circumscribed rectangle frame of the selected road character data is intersected with the circumscribed rectangle frame of the obtained road character data.
2. A typesetting device for road character data in an electronic map is characterized by comprising: the device comprises a selection unit, a display screen coordinate obtaining unit, a road character data obtaining unit and a gland judging unit;
the selecting unit is used for selecting one road character data from a pre-ordered road character data queue each time;
the display screen coordinate obtaining unit is used for obtaining the geographical position coordinate range of the electronic map displayed on the screen according to the geographical position coordinate of the selected road character data, the electronic map scale and the size of a preset display screen, wherein the electronic map comprises the road character data and the road character data is positioned in the center of the display screen;
the road character data acquisition unit is used for acquiring road character data of which the geographic position coordinates fall into the geographic position coordinate range of the electronic map from the typeset road character data queue;
the capping judgment unit is used for performing capping judgment on the selected road character data and the obtained typeset road character data, and if the capping is not performed, the selected road character data is added into the typeset road character data queue;
wherein the capping judgment unit includes: the repeated judgment subunit, the intersection judgment subunit and the determination subunit are connected;
the repeated judging subunit is used for judging whether the selected road character data is repeated with the road character data in the typeset road character data queue;
the intersection judging subunit is configured to judge whether the circumscribed rectangular frame of the selected road character data intersects with the circumscribed rectangular frame of the obtained road character data when the repetition judging subunit judges that the selected road character data is not repeated with the road character data in the typeset road character data queue;
the determining subunit is configured to determine that there is no capping when the intersection determining subunit determines that the circumscribed rectangular frame of the selected road text data does not intersect with the circumscribed rectangular frame of the obtained road text data;
the device also includes: a sequence forming unit;
the sequence forming unit is used for sequencing all the road character data according to at least one of the following parameters to form the road character data queue: road grade, character string length, geographic position coordinate size and character type;
the priority of the road grade is higher than that of the road grade;
the priority of the character string with long length is higher than that with short length;
the priority of the large geographic position coordinate is higher than the priority of the small geographic position coordinate, or the priority of the small geographic position coordinate is higher than the priority of the large geographic position coordinate;
the text type levels are sequentially from high to low: road name, road sign number;
the road grade, the length of the character string, the size of the geographic position coordinate and the priority of the character type are sequentially from high to low: road grade, character string length, geographic position coordinate size and character type;
the device also includes: a geographic position coordinate obtaining unit of road character data and a geographic position coordinate obtaining unit of the top point of the external rectangular frame;
the geographical position coordinate obtaining unit of the road character data is used for obtaining the geographical position coordinate of the road character data of the road according to the geographical position coordinate of the shape point of the road;
the geographic position coordinate obtaining unit of the vertex of the external rectangular frame is used for obtaining the geographic position coordinate of the vertex of the external rectangular frame of the road character data according to the geographic position coordinate of the road character data, the character string length of the road character data, the width and the height of each character in the preset road character data, the electronic map scale and the size of the display screen;
the capping judgment unit further includes: a number judgment subunit;
the number judging subunit is used for judging whether the number of the acquired road character data is smaller than a preset numerical value or not; if not, the intersection judgment subunit judges whether the circumscribed rectangle frame of the selected road character data intersects with the circumscribed rectangle frame of the obtained road character data.
CN201510627919.8A 2015-09-28 2015-09-28 Typesetting method and device for road character data in electronic map Expired - Fee Related CN106557504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510627919.8A CN106557504B (en) 2015-09-28 2015-09-28 Typesetting method and device for road character data in electronic map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510627919.8A CN106557504B (en) 2015-09-28 2015-09-28 Typesetting method and device for road character data in electronic map

Publications (2)

Publication Number Publication Date
CN106557504A CN106557504A (en) 2017-04-05
CN106557504B true CN106557504B (en) 2020-03-13

Family

ID=58415817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510627919.8A Expired - Fee Related CN106557504B (en) 2015-09-28 2015-09-28 Typesetting method and device for road character data in electronic map

Country Status (1)

Country Link
CN (1) CN106557504B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597930B (en) * 2018-06-11 2022-04-26 百度在线网络技术(北京)有限公司 Method, device, equipment and medium for detecting building block gland road in electronic map
CN110942371A (en) * 2019-11-20 2020-03-31 北京金和网络股份有限公司 Method and device for displaying merchants on map

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634557A (en) * 2009-09-01 2010-01-27 武汉光庭汽车电子有限公司 Method for preventing picture display characters from being mutually overlapped in navigation system
CN102136218A (en) * 2011-03-17 2011-07-27 武汉大学 Automatic collocation method for map lettering during map making through computer
CN103617296A (en) * 2013-12-18 2014-03-05 中国电子科技集团公司第五十四研究所 Optimized display method of place name annotation image layer
CN104143288A (en) * 2013-05-06 2014-11-12 北京四维图新科技股份有限公司 Method and device for marking electronic map road display text

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634557A (en) * 2009-09-01 2010-01-27 武汉光庭汽车电子有限公司 Method for preventing picture display characters from being mutually overlapped in navigation system
CN102136218A (en) * 2011-03-17 2011-07-27 武汉大学 Automatic collocation method for map lettering during map making through computer
CN104143288A (en) * 2013-05-06 2014-11-12 北京四维图新科技股份有限公司 Method and device for marking electronic map road display text
CN103617296A (en) * 2013-12-18 2014-03-05 中国电子科技集团公司第五十四研究所 Optimized display method of place name annotation image layer

Also Published As

Publication number Publication date
CN106557504A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
EP2273337A2 (en) Generating a graphic model of a geographic object and systems thereof
CN108204819B (en) Map data automatic detection method and device and hybrid navigation system
CN112233240B (en) Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment
US20100182342A1 (en) Map display method
CN102419927B (en) Map road annotating method of navigation terminal
CN106610976A (en) POI labeling method and device
WO2021051346A1 (en) Three-dimensional vehicle lane line determination method, device, and electronic apparatus
CN105224540A (en) Page composing method and device
CN106557504B (en) Typesetting method and device for road character data in electronic map
CN104102637A (en) Method and device for generating hot spot region
Jenny et al. Design principles for Swiss-style rock drawing
CN112579715B (en) Data processing method, device, electronic equipment and storage medium
CN104166715B (en) A kind of VxWorks platform clectronic sea chart engine processing system
JP7275555B2 (en) DRAWING INSPECTION SYSTEM, DRAWING INSPECTION DEVICE, DRAWING INSPECTION METHOD, AND PROGRAM
Geisthövel et al. Automated Swiss-style relief shading and rock hachuring
US9361719B1 (en) Label placement on a digital map
CN110866078A (en) Data processing method and device, display control method and device and vehicle
Herbei et al. Georeferencing of topographical maps using the software ARCGIS
Senaratne et al. An assessment and categorisation of quantitative uncertainty visualisation methods for geospatial data
CN111866722A (en) Method, system, device and storage medium for generating electronic fence
CN107591080B (en) Method and device for drawing road gland relation
CN109903358B (en) Drawing method of world natural heritage declaration drawing
JP2016176974A (en) Map image display apparatus, navigation apparatus, map image display program and map image display method
Mackaness et al. An algorithm for localised contour removal over steep terrain
CN110019584B (en) Map data generation method, map display method, server and terminal

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent 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

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

Address before: 102200, No. 8, No., Changsheng Road, Changping District science and Technology Park, Beijing, China. 1-5

Patentee before: AUTONAVI SOFTWARE Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200313

Termination date: 20200928

CF01 Termination of patent right due to non-payment of annual fee