CN111914040B - Automatic road segmentation method, device, equipment and computer readable storage medium - Google Patents

Automatic road segmentation method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111914040B
CN111914040B CN201910380883.6A CN201910380883A CN111914040B CN 111914040 B CN111914040 B CN 111914040B CN 201910380883 A CN201910380883 A CN 201910380883A CN 111914040 B CN111914040 B CN 111914040B
Authority
CN
China
Prior art keywords
road
point
coordinate
specific mark
line segment
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.)
Active
Application number
CN201910380883.6A
Other languages
Chinese (zh)
Other versions
CN111914040A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910380883.6A priority Critical patent/CN111914040B/en
Publication of CN111914040A publication Critical patent/CN111914040A/en
Application granted granted Critical
Publication of CN111914040B publication Critical patent/CN111914040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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)
  • Navigation (AREA)
  • Traffic Control Systems (AREA)

Abstract

The present disclosure provides an automatic road segmentation method, apparatus, device and computer readable storage medium. The method comprises the following steps: acquiring line segment data of a road; determining coordinate points forming the road according to the line segment data of the road; identifying a specific mark point on the road according to the line segment data of the road; and determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road. According to the embodiment of the application, the automatic segmentation of the road can be realized with higher efficiency.

Description

Automatic road segmentation method, device, equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an automatic road segmentation method, an automatic road segmentation device, automatic road segmentation equipment and a computer readable storage medium.
Background
When the road congestion degree is calculated by using the geographic data of the road, the road needs to be segmented according to the distribution condition of the road because the length of the complete road is overlarge. When the amount of road data is small, a key position can be confirmed by a map and a GPS (global positioning system) coordinate of the key position is acquired, and the road is segmented according to the acquired coordinate. However, the road is segmented in the mode, and GPS information of the stations is manually collected, so that the cost is high and the efficiency is low.
Disclosure of Invention
Embodiments of the present application provide a road automatic segmentation method, apparatus, device, and computer-readable storage medium to enable automatic segmentation of roads with high efficiency and low cost.
According to a first aspect of an embodiment of the present application, there is disclosed a road automatic segmentation method, the method comprising:
acquiring line segment data of a road;
determining coordinate points forming the road according to the line segment data of the road;
identifying a specific mark point on the road according to the line segment data of the road;
and determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road.
According to a second aspect of an embodiment of the present application, there is disclosed an automatic road segmentation apparatus, comprising:
a line segment data acquisition unit configured to acquire line segment data of a road;
a coordinate point determination unit configured to: determining coordinate points forming the road according to the line segment data of the road;
an identification unit configured to: identifying a specific mark point on the road according to the line segment data of the road;
a segmentation unit configured to: and determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road.
According to a third aspect of embodiments of the present application, a computing device is disclosed comprising a processor and a memory, the memory having stored thereon a computer program, the processor, when executing the computer program on the memory, being configured to implement any one of the method embodiments described in the first aspect.
According to a fourth aspect of embodiments of the present application, a computer-readable storage medium is disclosed, having stored thereon a computer program which, when executed by a processor, implements any of the method embodiments described in the first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in one or more of the embodiments of the present application, with respect to line segment data corresponding to a road, coordinate points on the road are determined, specific mark points (e.g., road turning points and/or road crossing points) of the road are identified, and segmentation points of the road are determined and automatically segmented according to the specific mark points and the coordinate points constituting the road, so that automation of road segmentation is realized, and since manual collection and identification of road key points are not required, the efficiency of road segmentation is improved; in addition, because GPS information of the road key points is not required to be acquired manually, the cost of road segmentation is reduced.
Other features and advantages of embodiments of the application will be apparent from the following detailed description, or may be learned by the practice of embodiments of the application.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The above and other objects, features and advantages of embodiments of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 illustrates an exemplary application environment diagram of a road automatic segmentation method according to an exemplary embodiment of the present application.
Fig. 2 shows a schematic flow chart of a road automatic segmentation method according to an exemplary embodiment of the application.
Fig. 3 shows a schematic diagram of all coordinate points constituting one road according to an exemplary embodiment of the present application.
Fig. 4 shows a schematic flow chart of an exemplary implementation of identifying turning points of a road from line segment data of the road according to an exemplary embodiment of the application.
Fig. 5 shows a schematic flow chart of an example embodiment of identifying an intersection of a road with other roads from segment data of the road according to another example embodiment of the application.
Fig. 6 shows a schematic flow chart of an example implementation of step S240 in fig. 2 according to an example embodiment of the present application.
FIG. 7 shows a schematic flow chart for segmenting a link according to a specific landmark using a combination of an ST_LineLocatePoint function and an ST_LineStubstring function according to an exemplary embodiment of the present application.
Fig. 8 shows a schematic block diagram of a road automatic segmentation apparatus 800 according to an exemplary embodiment of the present application.
FIG. 9 illustrates a schematic block diagram of a computing device, according to an exemplary embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The drawings are merely schematic illustrations of embodiments of the application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more example embodiments. In the following description, numerous specific details are provided to give a thorough understanding of example implementations of embodiments of the application. One skilled in the relevant art will recognize, however, that embodiments of the application may be practiced without one or more of the specific details, or with other methods, components, steps, etc. In other instances, well-known structures, methods, implementations, or operations are not shown or described in detail to avoid obscuring aspects of embodiments of the application.
Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 illustrates an exemplary application environment diagram of a road automatic segmentation method according to an exemplary embodiment of the present application. As shown in fig. 1, computing device 110 may obtain geographic data for an area, such as a city overview or a portion of an area, including point, line, area data, and Map attributes, from an OSM (Open Street Map) website. OSM provides a free-sourced, editable map service commonly created by the internet masses that utilizes the collective effort and gratuitous contributions of the public to improve map-related geographic data.
The computing device 110 may extract segment data pertaining to the road attribute from the geographic data and automatically segment the road with respect to the segment data of the road. In one embodiment, computing device 110 may have a PostgreSQL database therein. PostgreSQL is an Object-relational database management system (Object-Relational Database Management System, ordms), and is also a powerful, feature-rich, free software database system. It originates from the database study plan of the university of california, berkeley division, and is one of the important open source database product development projects.
Computing device 110 may import line segment data for the road into database PostgreSQL. In one embodiment, a PostGIS plug-in to the PostgreSQL database may be installed in computing device 110. PostGIS is a spatial operation extension of PostgreSQL that provides the ability for PostgreSQL to store, query and modify spatial relationships, e.g., postGIS provides the following spatial information service functions: spatial objects, spatial indexes, spatial operation functions, and spatial operators. Meanwhile, postGIS complies with the specifications of OpenGIS. The computing device 110 may automatically process segment data of a road by means of functions provided by the PostGIS plug-in to implement the road automatic segmentation method according to an embodiment of the present application, for example, determining coordinate points constituting the road, identifying key points of the road, determining segmentation points of the road from the coordinate points according to the key points, and segmenting, thereby outputting segmented road data.
In table 1 below, examples of the functions provided by the PostGIS plug-in are listed. In some embodiments of the application, the computing device 110 may implement automatic segmentation of roads by means of these functions.
Table 1 functions provided by PostGIS plug-in
In embodiments of the present application, the computing device 110 may be any electronic device with data computing capabilities, which may be a server type electronic device or a terminal device type electronic device.
In the above and following embodiments, while the computing device is described as implementing the road automatic segmentation method according to the embodiments of the present application by means of PostgreSQL and PostGIS plug-ins, it should be understood that the computing device may also use a database management system with similar functions to perform the road automatic segmentation method according to the embodiments of the present application, or may also be caused to perform the road automatic segmentation method according to the embodiments of the present application by other software and/or hardware configuration means, for example, by causing the computing device to execute computer instructions implementing similar functions.
The embodiments described above are merely descriptions of an example application environment to which the content update method according to the embodiment of the present application is applied, and it should be understood that there are various modifications and changes to the application environment.
An exemplary implementation of the road automatic segmentation method according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings. Fig. 2 shows a schematic flow chart of a road automatic segmentation method according to an exemplary embodiment of the application. The example method may be performed by any computing device (e.g., computing device 110 shown in fig. 1). As shown in fig. 2, the example method includes:
s210, acquiring line segment data of a road.
As used herein, "line segment data of a road" refers to data of a line segment corresponding to the road, and the shape, position, and other properties of the line segment agree with those of the road.
The computing device may obtain line segment data of the road from other devices, or may receive input line segment data of the road via an input interface. For example, as described above, in one embodiment, geographic data containing segment data of a road may be obtained (e.g., from an OSM website) and data having road attributes may be extracted therefrom, resulting in segment data of the road.
S220, determining coordinate points forming the road according to the line segment data of the road.
In one embodiment, the st_dumppoints function provided by the PostGIS plug-in may be used to determine the coordinate points that make up the link. As shown in table 1 above, the input of the st_dumppoints function is a line segment and the output is the latitude and longitude coordinates of all points making up the line segment. In one embodiment, line segment data of a road to be segmented may be input as an st_dumppoints function, thereby obtaining coordinate points constituting the road as an output of the st_dumppoints function.
It should be understood that the PostGIS plug-in and st_dumppoints functions described in the above embodiments are merely examples, and other software or hardware modules capable of determining coordinate points constituting a line segment from data of the line segment may be used to determine coordinate points constituting a road.
For all the coordinate points determined to constitute a road, they may be numbered along the extending direction of the road. For example, fig. 3 shows a schematic diagram of all coordinate points constituting one road according to an embodiment of the present application. As shown in fig. 3, all coordinate points constituting the road are numbered from 1 (start coordinate point) in order from right to left until the end coordinate point 47 of the road. It will be appreciated that all coordinate points may be numbered in a left-to-right order.
S230, identifying a specific mark point on the road according to the line segment data of the road.
Herein, "specific mark points" on a road refer to specific key points on the road that can be the basis of the segmentation of the road. The types of specific mark points may be specified in advance to identify these types of specific mark points after the line segment data of the road is acquired. For example, the type of a particular landmark point may be designated as a turning point of a road and/or an intersection point with other roads. In this embodiment, identifying the specific landmark point on the road may include at least one of: identifying turning points on the road as specific mark points; the intersection point of the road with other roads is identified as a specific mark point.
The specific mark points on the road identified according to the line segment data of the road in the embodiments of the present application are different from the key points on the road identified by a machine or manually by human eyes through image identification technology according to map data. For example, the turning points and the intersecting points of the identified road in the embodiments of the present application are identified by data operation with respect to line segment data of the road, and image identification is not performed on image data of a map using an image identification technique. Fig. 4 and 5 show schematic flowcharts of exemplary embodiments of identifying turning points of a road and intersections with other roads, respectively, from segment data of the road. Fig. 4 and 5 may be performed by any computing device, such as computing device 110 shown in fig. 1.
As shown in fig. 4, an example process of identifying a turning point of a road from line segment data may include:
s410, determining the direction angle of each coordinate point forming the road, wherein the direction angle of each coordinate point is the included angle between a vector formed by the coordinate point and the next adjacent coordinate point and a preset direction.
The next coordinate point refers to an adjacent coordinate point located downstream of the present coordinate point along the extending direction of the road. In general, the direction of extension of the road may be bi-directional, e.g. the road in fig. 3 may be said to extend either to the left or to the right. In determining the direction angle of the coordinate point, one fixed direction of the extending direction may be selected as the reference direction for all the coordinate points constituting the road. For example, with respect to fig. 3, a road extending direction from right to left may be selected as a reference direction to determine a next coordinate point of a coordinate point. For example, the next coordinate point of the coordinate point 1 in fig. 3 is the adjacent coordinate point 2 on the left side thereof, and the next coordinate point of the coordinate point 2 is the adjacent coordinate point 3 on the left side thereof.
The predetermined direction may be any specified direction, for example, a true north/south/east/west direction, a north-east 30 degree direction, a south-west 50 degree direction, and the like. An exemplary embodiment for determining the direction angle of the coordinate point is described below taking the coordinate point 1 and the coordinate point 2 in fig. 3 as an example. In this embodiment, the next coordinate point of the coordinate point 1 is the coordinate point 2, the next coordinate point of the coordinate point 2 is the coordinate point 3, and the predetermined direction is the north direction. For the coordinate point 1, the direction of the vector from the coordinate point 1 to the coordinate point 2 may be calculated from the coordinates of the coordinate point 1 and the coordinate point 2 which is the next coordinate point, and then the angle between the direction and the predetermined direction may be determined as the direction angle of the coordinate point 1. For the coordinate point 2, the direction of the vector from the coordinate point 2 to the coordinate point 3 may be calculated from the coordinates of the coordinate point 2 and the coordinate point 3 which is the next coordinate point, and then the angle between the direction and the predetermined direction may be determined as the direction angle of the coordinate point 2.
As can be seen from table 1 above, the st_azimuth function of the PostGIS plug-in can return, for two coordinate point coordinates as input, the angle of the vector from the previous point to the next point of the two points with the north direction. Thus, as an example embodiment, the inventors of the present application realized that the determination of the direction angle of a coordinate point may be accomplished using the st_azimuth function of a PostGIS plug-in. Each coordinate point and the next adjacent coordinate point can be taken as input of an st_azimuth function of the PostgreSQL, so as to obtain an included angle between a vector formed by the coordinate point and the next coordinate point and a preset direction, which is output of the st_azimuth function, and the included angle is taken as a direction angle of the coordinate point. For example, for coordinate point 1, coordinates of coordinate points 1 and 2 may be taken as input of the st_azimuth function, and an angle output by the st_azimuth function may be taken as the direction angle α1 of coordinate point 1; for coordinate point 2, coordinates of coordinate points 2 and 3 may be taken as input of the st_azimuth function, and an angle output by the st_azimuth function may be taken as a direction angle α2 of coordinate point 2; and so on until the direction angles of all coordinate points are determined.
Through S410, the direction angle of each coordinate point constituting the road may be obtained, after which the example method proceeds to S420.
S420, for each coordinate point, determining the next coordinate point as a turning point on the road in a case where an absolute value of a difference between a direction angle of the coordinate point and a direction angle of the next coordinate point is greater than a predetermined threshold.
In step S420, the computing device determines whether the change in the direction angle of two adjacent coordinate points is excessive, and if so, indicates that the road may have turned, thereby determining the latter one of the two coordinate points as a turning point on the road. Conversely, if the direction angle varies little although it varies, it is considered that the road is not turning. The predetermined threshold may be a suitable angle value predetermined based on experience, experimentation, statistics, historical data, machine learning, etc. For example, with respect to coordinate points 1 and 2 in fig. 3, if the absolute value |α1- α2| of their direction angle difference values is greater than a predetermined threshold β, it is determined that the road has changed in the direction prescribed at coordinate point 2 when extending from coordinate point 1 to coordinate point 2, and coordinate point 2 is the road turning point. Conversely, if the absolute value |α1- α2| of the difference in the direction angles of the coordinate points 1 and 2 is smaller than the predetermined threshold β, it is determined that no road turning has occurred. In this way, it is possible to determine whether each coordinate point is a road turning point in turn.
Through the above steps S410 to S420, turning points among coordinate points constituting the road can be identified by analysis and calculation of line segment data of the road.
Fig. 5 shows an exemplary embodiment of how the intersection points with other roads are identified. As shown in fig. 5, an example process of identifying intersections of a road with other roads from line segment data may include:
s510, one or more intersecting road groups of the road are determined, wherein each intersecting road group consists of the road and another road intersecting the road.
In S510, it is determined whether the road and the obtained line segment data of other roads intersect, so as to find out all other roads intersecting with the road, and each other road and the road form an intersecting road group, so as to obtain one or more intersecting road groups of the road. In some embodiments, no other road may intersect the road.
As shown in table 1 above, the st_intersections function of the PostGIS plug-in may give a boolean value for the data of line segments a and B as inputs, whether they intersect, where "yes" indicates intersection and "no" indicates non-intersection. Thus, the inventors of the present application realized that, as an exemplary embodiment, the st_interfaces function of the PostGIS plug-in may be used to determine whether one road Intersects other roads. For example, for the line segment data of the road a and the other roads B, C, D, … K included in the acquired geographic data, the line segment data of the road a and the line segment data of each other road may be input as st_interfaces function, respectively, so as to determine whether the road a Intersects each other road according to the output of the st_interfaces function. In the case where the output of the st_intersections function indicates that the road a Intersects with one other road, the road a is regarded as one intersecting road group of the road a, and so on to all other roads intersecting with the road a.
In this way, one or more intersecting road groups of the road to be segmented can be obtained. After that, the exemplary process advances to S520.
S520, determining the intersection point of the two roads of each intersecting road group according to the line segment data of the two roads of each intersecting road group.
For each intersecting road group, it is necessary to determine the intersection point of two roads (a road to be segmented and another road intersecting with it) of the intersecting road group.
As shown in table 1 above, the st_intersection function of the PostGIS plug-in may return the Intersection of two line segments for the two line segment data that it inputs. The inventors of the present application have therefore appreciated that, as an exemplary embodiment, the st_interaction function of the PostGIS plug-in may be used to determine the Intersection of two roads. For example, for each intersecting road group, line segment data of two roads constituting the intersecting road group may be input as an st_interaction function to obtain an Intersection of the two roads as an output of the st_interaction function. Thus, all the intersecting points of the road to be segmented and other roads can be obtained.
Table 2 below shows an example of the POINT of intersection (POINT) of the example road 292313592 with other roads.
TABLE 2 intersection of road 292313592 with other roads
Road ID to be segmented Other road IDs Intersection point of road to be segmented and other roads
292313592 292313594 SRID=4326;POINT(113.9215498 22.5480148)
292313592 292313595 SRID=4326;POINT(113.9215408 22.5484105)
292313592 292313582 SRID=4326;POINT(113.9215333 22.5487424)
292313592 154879196 SRID=4326;POINT(113.9215232 22.5491903)
Through S230 or S410-S420, S510-S520 as described above, the turning point of the road and the intersection point of the road with other roads can be identified as specific mark points of the road according to the line segment data of the road.
In general, a specific mark point of a road may be a basis for segmentation of the road, that is, the road may be segmented at the specific mark point, but the specific mark point obtained in the above process may not be a coordinate point constituting the road, which may result in failure of segmentation of the road according to the specific mark point. To avoid such a problem, in the embodiment of the present application, an appropriate segmentation point is determined according to a specific landmark point and a coordinate point of a road and segmentation is performed, i.e., an exemplary method proceeds to S240.
And S240, determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road.
In one embodiment, for each specific mark point that is not a coordinate point constituting a road, a coordinate point closest to the specific mark point among the coordinate points constituting the road may be determined as one segment point of the road. Fig. 6 shows a schematic flow chart of such an exemplary embodiment. As shown in fig. 6, the schematic process includes:
S610, it is determined whether the specific mark point is one of the coordinate points constituting the road.
For example, the specific mark point may be compared with each coordinate point constituting the road to make a judgment.
S620, in the case where the specific mark point is one of the coordinate points, the coordinate point is determined as one segment point of the road.
If the specific mark point itself is a coordinate point constituting the road, the specific mark point may be directly used as a segment point of the road.
S630, in the case where the specific mark point is not one of the coordinate points, determining one of the coordinate points that is closest to the specific mark point as a segment point of the road.
If the specific mark point itself is not a coordinate point constituting the road, a coordinate point closest to the specific mark point may be determined as a segment point of the road. In this way, the failure of the segmentation caused by the segmentation with the specific mark point other than the road coordinate point as the segmentation point can be avoided.
As can be seen from table 1, the st_linelocation function of the PostGIS plug-in can return the position of the input point on the line segment relative to the start point of the line segment, i.e. the ratio (fraction) of the length of the start point of the line segment to the input point to the total length of the line segment, for the line segment data and the point input by the st_linelocation function, which is the input of the PostGIS plug-in, ranges from [0,1]. In addition, the st_linestring function of the PostGIS plugin can segment the input line segment data and two length ratios according to the two length ratios, namely the fraction1 and the fraction2, and return to the sub-line segment in the two length ratio ranges after segmentation. The inventors of the present application have realized that these two functions can be used in combination to automatically segment a road with certain determined landmark points and to obtain segmentation points. FIG. 7 shows a schematic flow chart for using the ST_LineLocatePoint function and the ST_LineStubstring function in combination to segment a road according to a particular landmark, according to an example embodiment. As shown in fig. 7, this example process includes:
S710, taking the line segment data of the road and each specific mark point as the input of the ST_LineLocatePoint function of the PostgreSQL to obtain the line segment length proportion corresponding to each specific mark point.
Through S710, a ratio of the length from the road start point to each specific mark point to the total length of the road, that is, a length ratio of each specific mark point can be obtained.
S720, regarding each specific mark point, taking the line segment data of the road including the coordinate point and the length proportion of the line segment corresponding to the specific mark point and the next specific mark point as the input of the ST_LineSub function of the PostgreSQL, so as to obtain sub-line segment data between the length proportion of the line segment corresponding to the specific mark point and the next specific mark point in the line segment data, wherein the beginning coordinate point and the ending coordinate point of the sub-line segment data are the segment points of the road.
In S720, the road is segmented in a manner of a group of every two adjacent specific mark points, so as to obtain sub-line segment data of the segmented road between the two adjacent specific mark points, wherein the start coordinate point and the end coordinate point of the sub-line segment data are the determined segmented points of the road.
By the method, the sub-segment data of all the segmented roads and all the segmented points obtained after the segmentation according to all the specific mark points can be obtained, so that the automatic segmentation of the roads is realized.
In some embodiments, there may be a case where a plurality of specific marking points are clustered together, in which case the segmented road length obtained by segmenting the road according to each of the clustered specific marking points is relatively small, and traffic conditions may not change from each other, so that such segmentation is unnecessary. To avoid such unnecessary segmentation, the following process may be performed before segmenting the road according to a specific mark point or determining a segment point of the road:
s810, judging whether other specific mark points exist in a preset range near the specific mark point;
s820, in the case that other specific mark points exist in a predetermined range around the specific mark point, a new specific mark point is determined according to the specific mark point and the other specific mark points to replace the specific mark point and the other specific mark points.
Through S810-S820, a new specific landmark can be determined from a plurality of specific landmarks clustered together within a predetermined range to replace the plurality of specific landmarks, thereby avoiding unnecessary segmentation of the road in a range set. As an example, the coordinate values of the specific marker point and other specific marker points within a predetermined range may be averaged to obtain the coordinate values of the new specific marker point.
In some embodiments, there may be segmented roads of greater length in the segmented roads, and there may be greater differences in traffic conditions on these segmented roads of greater length, so that it may be desirable to segment these segmented roads again. In one example, for a sub-segment included in a segmented road, determining whether a length of the sub-segment exceeds a predetermined length; and in the case that the length of the sub-segment exceeds a predetermined length, segmenting the sub-segment again. For example, sub-segments exceeding a predetermined length (e.g., 1000 meters) are equally segmented by length such that the segmented length is less than the predetermined length.
By the embodiments of the automatic road segmentation method, the automation of road segmentation can be realized, and the efficiency of road segmentation is improved because manual acquisition and identification of road key points are not required; in addition, because GPS information of the road key points is not required to be acquired manually, the cost of road segmentation is reduced.
In some of the above embodiments, the various functions of the PostgreSQL and the PostGIS plug-in thereof are used skillfully to implement some processing steps of the road automatic segmentation method according to the embodiments of the present application, so that the processing efficiency is improved, and the road segmentation method is more efficient and more convenient to implement.
It should be understood that the road automatic segmentation method according to embodiments of the present application is not limited to the embodiments using the various functions described above of PostgreSQL and its PostGIS plug-in, but may also be implemented using other software/hardware modules with similar functionality.
According to another aspect of embodiments of the present application, there is also provided an automatic road segmentation apparatus operable to perform the embodiments of the automatic road segmentation method as described above. Fig. 8 shows a schematic block diagram of a road automatic segmentation apparatus 800 according to an exemplary embodiment of the present application, and as shown in fig. 8, the apparatus 800 includes:
a line segment data acquisition unit 810 configured to acquire line segment data of a road;
a coordinate point determination unit 820 configured to: determining coordinate points forming the road according to the line segment data of the road;
an identification unit 830 configured to: identifying a specific mark point on the road according to the line segment data of the road;
a segmentation unit 840 configured to: and determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road.
According to an exemplary embodiment, the recognition unit 830 may include:
A first identification subunit configured to: identifying turning points on the road as specific mark points;
a second identification subunit configured to: the intersection point of the road with other roads is identified as a specific mark point.
According to an exemplary embodiment, the first recognition subunit may include:
a direction angle determination unit configured to: determining a direction angle of each coordinate point forming the road, wherein the direction angle of each coordinate point is an included angle between a vector formed by the coordinate point and the next adjacent coordinate point and a preset direction;
a turning point determination unit configured to: for each coordinate point, in the case where the absolute value of the difference between the direction angle of the coordinate point and the direction angle of the next coordinate point is greater than a predetermined threshold value, the next coordinate point is determined as a turning point on the road.
According to an exemplary embodiment, the second recognition subunit may include:
a road group determination unit configured to: determining one or more intersecting road groups of the road, wherein each intersecting road group consists of the road and another road intersecting the road;
an intersection point determining unit configured to: and determining the intersection point of the two roads of each intersecting road group according to the line segment data of the two roads of each intersecting road group.
According to an exemplary embodiment, the coordinate point determination unit 820 is configured to:
the segment data of the road is input as st_dumppoints function of PostgreSQL to obtain the coordinate point of the road as output of st_dumppoints function.
According to an exemplary embodiment, the direction angle determining unit is configured to:
and taking each coordinate point and the next adjacent coordinate point as the input of the ST_Azimuth function of the PostgreSQL, so as to obtain the included angle between the vector formed by the coordinate point and the next coordinate point and the preset direction as the direction angle of the coordinate point, wherein the included angle is the output of the ST_Azimuth function.
According to an exemplary embodiment, the road group determination unit is configured to:
taking the line segment data of the road and the line segment data of another road as the input of the ST_Intercts function of the PostgreSQL to obtain a judging result of whether the road and the another road intersect as the output of the ST_Intercts function;
in the case where the output of the st_intersections function indicates that the road Intersects with the other road, the road and the other road are regarded as one intersecting road group of the road.
According to an exemplary embodiment, the intersection point determining unit is configured to:
For each intersecting road group, line segment data of two roads constituting the intersecting road group is taken as an input of an st_interaction function of PostgreSQL to obtain an intersecting point of the two roads as an output of the st_interaction function.
According to an exemplary embodiment, segmentation unit 840 is configured to:
for each specific mark point, a coordinate point closest to the specific mark point among the coordinate points composing the road is determined as one segment point of the road.
According to an exemplary embodiment, segmentation unit 840 is configured to:
taking the line segment data of the road and each specific mark point as the input of an ST_LineLocatePoint function of the PostgreSQL to obtain the length proportion of the line segment corresponding to each specific mark point;
and for each specific mark point, taking the line segment data of the road including the coordinate point and the length proportion of the line segment corresponding to the specific mark point and the next specific mark point as the input of the ST_LineStudication function of the PostgreSQL to obtain sub-line segment data between the length proportion of the line segment corresponding to the specific mark point and the next specific mark point in the line segment data, wherein the beginning coordinate point and the ending coordinate point of the sub-line segment data are the segment points of the road.
According to an exemplary embodiment, segmentation unit 840 is configured to:
determining whether the specific mark point is one of coordinate points constituting the road;
in the case where the specific mark point is one of the coordinate points, determining the coordinate point as a segment point of the road;
in a case where the specific mark point is not one of the coordinate points, one of the coordinate points that is closest to the specific mark point is determined as one of the segment points of the road.
According to an exemplary embodiment, segmentation unit 840 is configured to:
judging whether other specific mark points exist in a preset range near the specific mark point or not;
in the case that other specific mark points exist in a predetermined range near the specific mark point, a new specific mark point is determined according to the specific mark point and the other specific mark points to replace the specific mark point and the other specific mark points.
The implementation process of the functions and roles of each unit/module in each device is specifically detailed in the implementation process of the corresponding steps in the method embodiment, and will not be repeated herein.
The above embodiments of the apparatus may be implemented by hardware, software, firmware, or a combination thereof, and may be implemented as a single apparatus or as a logic integrated system where constituent units/modules are dispersed in one or more computing devices and perform corresponding functions, respectively. The units/modules constituting the respective apparatuses in the above embodiments are divided according to logic functions, they may be re-divided according to logic functions, and the apparatuses may be realized by more or less units/modules, for example. These constituent units/modules may be implemented by hardware, software, firmware or a combination thereof, and they may be separate independent components or may be integrated units/modules where a plurality of components are combined to perform corresponding logic functions. The means for hardware, software, firmware, or a combination thereof may include: separate hardware components, functional modules implemented by programming, functional modules implemented by programmable logic devices, or the like, or a combination thereof.
According to one exemplary embodiment, each of the above-described apparatus embodiments may be implemented as a computing device including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the computing device to perform any one of the road automatic segmentation method embodiments described above, or that, when executed by the processor, causes the computing device to perform the functions implemented by the constituent elements/modules of the apparatus embodiments described above.
The processors described in the above embodiments may refer to a single processing unit, such as a central processing unit CPU, or may be distributed processor systems including a plurality of discrete processing units/processors.
The memory described in the above embodiments may include one or more memories, which may be internal memory of the computing device, such as various memories, transient or non-transient, or external storage connected to the computing device through a memory interface.
Fig. 9 illustrates a schematic block diagram of one exemplary embodiment of such a computing device 901. As shown in fig. 9, the computing device may include, but is not limited to: at least one processing unit 910, at least one memory unit 920, a bus 930 connecting the different system components, including the memory unit 920 and the processing unit 910.
The storage unit stores program code that is executable by the processing unit 910 such that the processing unit 910 performs steps according to various exemplary embodiments of the present application described in the description section of the exemplary method described above in this specification. For example, the processing unit 910 may perform the various steps shown in the figures.
The storage unit 920 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 921 and/or cache memory 922, and may further include Read Only Memory (ROM) 923.
The storage unit 920 may also include a program/utility 924 having a set (at least one) of program modules 925, such program modules 925 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 930 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The computing device can also communicate with one or more external devices 970 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the computing device, and/or any devices (e.g., routers, modems, etc.) that enable the computing device to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 950. In one embodiment, the computing device may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet, through a network adapter 960. As shown, the network adapter 960 communicates with other modules of the computing device over the bus 930. It should be appreciated that although not shown, the computing device may be implemented using other hardware and/or software modules, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk array (Redundant Arrays of Independent Drives, RAID) systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present application.
In an exemplary embodiment of the present application, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method embodiments described in the method embodiment section above.
According to an embodiment of the present application, there is also provided a program product for implementing the method in the above method embodiment, which may employ a portable compact disc read only memory (CD-ROM) and comprise program code and may be run on a terminal device, such as a personal computer. However, the program product of the embodiments of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer program embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, radio Frequency (RF), etc., or any suitable combination of the foregoing.
Program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as C or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of embodiments of the application following, in general, the principles of the embodiments of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.

Claims (9)

1. A method of automatic road segmentation, the method comprising:
acquiring line segment data of a road;
determining coordinate points forming the road according to the line segment data of the road;
identifying a specific mark point on the road according to the line segment data of the road, wherein the specific mark point comprises at least one of a turning point on the road and an intersection point of the road and other roads;
determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road;
wherein identifying the turning point on the road comprises:
Determining a direction angle of each coordinate point forming the road, wherein the direction angle of each coordinate point is an included angle between a vector formed by the coordinate point and a next adjacent coordinate point and a preset direction, and obtaining the included angle between the vector formed by the coordinate point and the next adjacent coordinate point output by the ST_Azimuth function by taking each coordinate point and the next adjacent coordinate point as the input of the ST_Azimuth function of the PostgreSQL;
for each coordinate point, determining the next coordinate point as a turning point on the road in the case that the absolute value of the difference between the direction angle of the coordinate point and the direction angle of the next coordinate point is greater than a predetermined threshold;
identifying the intersection of the road with other roads includes:
taking line segment data of the road and line segment data of another road as input of an ST_Intercts function of the PostgreSQL to obtain a judging result of whether the road and the another road are intersected or not, and taking the road and the another road as an intersecting road group of the road to obtain one or more intersecting road groups of the road when the output of the ST_Intercts function indicates that the road and the another road are intersected;
And for each intersecting road group, taking line segment data of two roads forming the intersecting road group as the input of an ST_Interaction function of the PostgreSQL, so as to obtain an intersecting point of the two roads output by the ST_Interaction function.
2. The method of claim 1, wherein determining the coordinate points that make up the link comprises:
and taking the line segment data of the road as the input of the ST_Dumppoints function of the PostgreSQL to obtain the coordinate point of the road output by the ST_Dumppoints function.
3. The method according to claim 1 or 2, wherein determining a segmentation point of the road from the coordinate points comprises:
for each specific mark point, a coordinate point closest to the specific mark point among the coordinate points composing the road is determined as one segment point of the road.
4. The method according to claim 1 or 2, wherein determining a segmentation point of the road from the coordinate points and segmenting the road comprises:
taking the line segment data of the road and each specific mark point as the input of an ST_LineLocatePoint function of the PostgreSQL to obtain the length proportion of the line segment corresponding to each specific mark point;
And for each specific mark point, taking the line segment data of the road including the coordinate point and the length proportion of the line segment corresponding to the specific mark point and the next specific mark point as the input of the ST_LineStudication function of the PostgreSQL to obtain sub-line segment data between the length proportion of the line segment corresponding to the specific mark point and the next specific mark point in the line segment data, wherein the beginning coordinate point and the ending coordinate point of the sub-line segment data are the segment points of the road.
5. A method according to claim 3, wherein determining, as a segment point of the road, a coordinate point closest to the specific mark point among coordinate points constituting the road includes:
determining whether the specific mark point is one of coordinate points constituting the road;
in the case where the specific mark point is one of the coordinate points, determining the coordinate point as a segment point of the road;
in a case where the specific mark point is not one of the coordinate points, one of the coordinate points that is closest to the specific mark point is determined as one of the segment points of the road.
6. A method according to claim 3, wherein, prior to determining the coordinate point closest to the specific marker point among the coordinate points making up the road, the method further comprises:
judging whether other specific mark points exist in a preset range near the specific mark point or not;
in the case that other specific mark points exist in a predetermined range near the specific mark point, a new specific mark point is determined according to the specific mark point and the other specific mark points to replace the specific mark point and the other specific mark points.
7. An automatic road segmentation apparatus, comprising:
a line segment data acquisition unit configured to acquire line segment data of a road;
a coordinate point determination unit configured to: determining coordinate points forming the road according to the line segment data of the road;
an identification unit configured to: identifying a specific mark point on the road according to the line segment data of the road, wherein the specific mark point comprises at least one of a turning point on the road and an intersection point of the road and other roads;
a segmentation unit configured to: determining a segmentation point of the road from the coordinate points according to the specific mark points and segmenting the road;
Wherein the identification unit is further configured to:
determining a direction angle of each coordinate point forming the road, wherein the direction angle of each coordinate point is an included angle between a vector formed by the coordinate point and a next adjacent coordinate point and a preset direction, and obtaining the included angle between the vector formed by the coordinate point and the next adjacent coordinate point output by the ST_Azimuth function by taking each coordinate point and the next adjacent coordinate point as the input of the ST_Azimuth function of the PostgreSQL;
for each coordinate point, determining the next coordinate point as a turning point on the road in the case that the absolute value of the difference between the direction angle of the coordinate point and the direction angle of the next coordinate point is greater than a predetermined threshold;
taking line segment data of the road and line segment data of another road as input of an ST_Intercts function of the PostgreSQL to obtain a judging result of whether the road and the another road are intersected, which is output by the ST_Intercts function, and taking the road and the another road as an intersecting road group of the road when the output of the ST_Intercts function indicates that the road and the another road are intersected, so as to obtain one or more intersecting road groups of the road;
And for each intersecting road group, taking line segment data of two roads forming the intersecting road group as the input of an ST_Interaction function of the PostgreSQL, so as to obtain an intersecting point of the two roads output by the ST_Interaction function.
8. A computing device comprising a processor and a memory, the memory having stored thereon a computer program, the processor, when executing the computer program on the memory, being configured to implement the road automatic segmentation method according to any one of claims 1 to 6.
9. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the road automatic segmentation method according to any one of claims 1 to 6.
CN201910380883.6A 2019-05-08 2019-05-08 Automatic road segmentation method, device, equipment and computer readable storage medium Active CN111914040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910380883.6A CN111914040B (en) 2019-05-08 2019-05-08 Automatic road segmentation method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910380883.6A CN111914040B (en) 2019-05-08 2019-05-08 Automatic road segmentation method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111914040A CN111914040A (en) 2020-11-10
CN111914040B true CN111914040B (en) 2023-10-31

Family

ID=73241988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910380883.6A Active CN111914040B (en) 2019-05-08 2019-05-08 Automatic road segmentation method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111914040B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186986A (en) * 2011-12-31 2013-07-03 高德软件有限公司 Method and device used for terminal to display road conditions, and equipment
CN105701222A (en) * 2016-01-15 2016-06-22 武汉光庭信息技术股份有限公司 Calculating method extracting road radius of curvature according to arc buffer zone
CN108229510A (en) * 2016-12-21 2018-06-29 ***通信集团辽宁有限公司 Determine the method, apparatus and system of road area
CN109711336A (en) * 2018-12-26 2019-05-03 深圳高速工程顾问有限公司 Roadmarking determines method, apparatus, storage medium and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186986A (en) * 2011-12-31 2013-07-03 高德软件有限公司 Method and device used for terminal to display road conditions, and equipment
CN105701222A (en) * 2016-01-15 2016-06-22 武汉光庭信息技术股份有限公司 Calculating method extracting road radius of curvature according to arc buffer zone
CN108229510A (en) * 2016-12-21 2018-06-29 ***通信集团辽宁有限公司 Determine the method, apparatus and system of road area
CN109711336A (en) * 2018-12-26 2019-05-03 深圳高速工程顾问有限公司 Roadmarking determines method, apparatus, storage medium and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
动态分段技术在城市交通地理信息***中的应用研究;牟春鹏等;《矿山测量》(第06期);第22-26页 *

Also Published As

Publication number Publication date
CN111914040A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
US11105638B2 (en) Method, apparatus, and computer readable storage medium for updating electronic map
EP3109842B1 (en) Map-centric map matching method and apparatus
CN109478184B (en) Identifying, processing, and displaying clusters of data points
US9243925B2 (en) Generating a sequence of lane-specific driving directions
CN105509743A (en) A positioning processing method, a business platform and a network system
CN104422451A (en) Road recognition method and road recognition apparatus
CN113450455A (en) Method, device and computer program product for generating a map of road links of a parking lot
JP2023022185A (en) Map data processing method and device, electronic equipment, storage medium, and computer program
CN112579715B (en) Data processing method, device, electronic equipment and storage medium
CN111337045A (en) Vehicle navigation method and device
CN117171288B (en) Grid map analysis method, device, equipment and medium
CN114116946A (en) Data processing method and device, electronic equipment and storage medium
CN111914040B (en) Automatic road segmentation method, device, equipment and computer readable storage medium
CN112837555A (en) Test route selection method and device, computer equipment and storage medium
US11821746B2 (en) Method and apparatus of processing traffic data, device and medium
CN115797310A (en) Method for determining inclination angle of photovoltaic power station group string and electronic equipment
CN104567887A (en) Path matching method and device
US11802773B2 (en) Method for navigating and route planning based on HD map, electronic device, and server thereof
CN113624245A (en) Navigation method and device, computer storage medium and electronic equipment
CN112163056A (en) Ground object insertion method based on path diagram
CN113761990B (en) Road boundary detection method, device, unmanned vehicle and storage medium
CN111400418A (en) Lane positioning method and device, vehicle, storage medium and map construction method
CN116539036B (en) Vehicle position determining method, vehicle track compensating method and electronic equipment
CN113823082B (en) Navigation data processing method, device, equipment and storage medium
CN110263114B (en) Road section description method, device, equipment and medium

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