Method, apparatus, and computer-readable storage medium for generating a simplified road network diagram
By obtaining the road information and standard direction of the road section, using preset functions to calculate the endpoint position of the road section, and automatically generate a road network diagram, solving the problem of large workload in the existing technology, and achieving efficient and automated road network diagram generation.
Patent Information
- Application Number
- CN202210167356.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-02-23
AI Technical Summary
In the prior art, the combination of semi-automation and manual relies on the combination of road network simplified diagrams, resulting in a large workload. As the road network complexity increases and the amount of data increases, the workload of manual drawing methods increases significantly.
By obtaining road information of multiple sections in the preset area, determining the standard direction of each section, and using the preset function to calculate the position information of the end points of the section in the road network diagram, generating a road network diagram, avoiding manual drawing, and using computer automation processing.
It reduces the workload of generating road network diagrams, improves efficiency, reduces manual intervention, and can automatically generate clear and intuitive road network topology.
Smart Images

Figure CN114565700B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of transportation systems, and particularly to a method, apparatus, and computer-readable storage medium for generating a road network sketch. Background Art
[0002] A road network sketch can clearly and intuitively represent the topological structure of a road network, and the direction of each road segment in the road network sketch is the standard direction. In the existing technology, a road network sketch is usually drawn by a semi-automated and manual combination method.
[0003] With the gradual development of the road network, the topological structure of the road network becomes increasingly complex, the geometric uncertainty of the road network increases, and the data volume of the road network increases. Since the road network can be the road network of any place in the country, the dimension of the road network may be the entire road network of any place, or it may be a local road network of any place. If each road network sketch is drawn by a semi-automated and manual combination method, the workload of the existing method for generating road network sketches that relies on manual labor will be greatly increased. Summary of the Invention
[0004] This application provides a method, apparatus, and computer-readable storage medium for generating a road network sketch, which can reduce the workload of generating a road network sketch.
[0005] To achieve the above object, this application adopts the following technical solutions:
[0006] In a first aspect, a method for generating a road network sketch is provided. This method can be executed by a device for generating a road network sketch. The method includes: obtaining road information of multiple road segments within a preset area, where the road information includes position information of the endpoints of the road segments; determining the standard direction corresponding to each road segment, where the standard direction is used to represent the direction of the road segment in the road network sketch, the road network sketch includes multiple standard directions, and the angle between any two adjacent standard directions among the multiple standard directions is the same; determining the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction of each road segment and a preset function; generating a road network sketch according to the position information corresponding to the endpoints of each road segment in the road network sketch, and there are no intersections other than the endpoints of the road segments in the road network sketch.
[0007] Compared with the existing technology, the generation scheme of the road network sketch in this application determines the standard directions corresponding to multiple road segments through the road information of multiple road segments within a preset area and determines the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard directions corresponding to the multiple road segments and a preset function, and then generates a road network sketch, no longer relying on semi-automatic manual drawing, and reducing the workload when generating a road network sketch.
[0008] In combination with the first aspect, in some embodiments of the first aspect, the location information of the road segment endpoints includes the location information of the starting point and the ending point of the road segment. The location information includes longitude and latitude. Determining the standard directions corresponding to multiple road segments includes: for any road segment among the multiple road segments, determining the angle corresponding to the road segment according to the first difference and the second difference of the road segment. The first difference is the difference between the longitude of the ending point and the longitude of the starting point of the road segment, and the second difference is the difference between the latitude of the ending point and the latitude of the starting point of the road segment; determining the standard direction corresponding to the road segment according to the angle corresponding to the road segment and the preset correspondence. The preset correspondence includes multiple angle intervals and the standard directions corresponding to each angle interval.
[0009] In combination with the first aspect, in some embodiments of the first aspect, the method further includes: if there are N road segments with the same starting point location information in the first standard direction, then deleting N - 1 road segments that do not meet the preset conditions among the N road segments, where N is a positive integer greater than 2, and the first standard direction is any one of the multiple standard directions.
[0010] In combination with the first aspect, in some embodiments of the first aspect, the method further includes: if there are a first road segment and a second road segment in the first standard direction, and the location information of the starting points of the first road segment and the second road segment is the same, then determining the first included angle of the first road segment and the second included angle of the second road segment. The included angle is the included angle between the actual direction of the road segment and the first standard direction. The actual direction of the road segment is the direction from the starting point of the road segment to the ending point of the road segment, and the first standard direction is any one of the multiple standard directions; if the first included angle is less than the second included angle, then determining that the standard direction corresponding to the first road segment is the first standard direction, and the standard direction corresponding to the second road segment is the second standard direction. The second standard direction is the standard direction adjacent to the first standard direction, and the actual direction of the second road segment is located between the first standard direction and the second standard direction.
[0011] In combination with the first aspect, in some embodiments of the first aspect, determining the location information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction corresponding to each road segment and the preset function includes: determining the first constraint condition corresponding to the endpoints of each road segment among the multiple road segments. The first constraint condition corresponding to the endpoints of the road segment corresponds to the standard direction of each road segment, and different standard directions correspond to different first constraint conditions; determining the location information corresponding to the endpoints of each road segment in the road network sketch according to the first constraint conditions corresponding to the endpoints of the multiple road segments and the preset function.
[0012] In combination with the first aspect, in some embodiments of the first aspect, the method further includes: determining a target section in the first road, where the target section is the section in the first road with the shortest distance to the second road, the first road and the second road include multiple consecutive sections with the same or opposite standard directions, and there are intersections other than section endpoints between the first road and the second road in the road network sketch; determining the positional relationship between the first road and the second road according to the road information of the target section and the road information of multiple sections in the second road; determining the position information corresponding to each section in the road network sketch according to the standard direction of each section and a preset function, including: determining a second constraint condition according to the positional relationship between the first road and the second road, and determining the position information corresponding to multiple sections in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function.
[0013] In a second aspect, there is provided a device for generating a road network sketch for implementing the above method for generating a road network sketch. The device for generating a road network sketch includes corresponding modules, units, or means for implementing the above method. The module, unit, or means can be implemented by hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.
[0014] In combination with the second aspect, in some embodiments of the second aspect, the device for generating a road network sketch includes: an acquisition module and a processing module; the acquisition module is configured to acquire the road information of multiple sections within a preset area, where the road information includes the position information of section endpoints; the processing module is configured to determine the standard direction corresponding to each section, where the standard direction is used to represent the direction of the section in the road network sketch, the road network sketch includes multiple standard directions, and the angle between any two adjacent standard directions among the multiple standard directions is the same; the processing module is further configured to determine the position information corresponding to the endpoints of each section in the road network sketch according to the standard direction of each section and a preset function; the processing module is further configured to generate a road network sketch according to the position information corresponding to the endpoints of each section in the road network sketch, and there are no intersections other than section endpoints in the road network sketch.
[0015] In combination with the second aspect, in some embodiments of the second aspect, the position information of section endpoints includes the position information of the section start point and the position information of the section end point, the position information includes longitude and latitude, and the processing module is configured to determine the standard directions corresponding to multiple sections, including: for any section among the multiple sections, determining the angle corresponding to the section according to the first difference and the second difference of the section, where the first difference is the difference between the longitude of the section end point and the longitude of the section start point, and the second difference is the difference between the latitude of the section end point and the latitude of the section start point; determining the standard direction corresponding to the section according to the angle corresponding to the section and a preset correspondence, where the preset correspondence includes multiple angle intervals and the standard direction corresponding to each angle interval.
[0016] In combination with the second aspect, in some embodiments of the second aspect, the processing module is further configured to: if there are N road segments with the same starting point position information in the first standard direction, delete N - 1 road segments that do not meet the preset conditions among the N road segments, where N is a positive integer greater than 2, and the first standard direction is any one of a plurality of standard directions.
[0017] In combination with the second aspect, in some embodiments of the second aspect, the processing module is further configured to: if there are a first road segment and a second road segment in the first standard direction, and the position information of the starting point of the first road segment and the starting point of the second road segment is the same, determine a first included angle of the first road segment and a second included angle of the second road segment, where the included angle is the angle between the actual direction of the road segment and the first standard direction, the actual direction of the road segment is the direction from the starting point of the road segment to the end point of the road segment, and the first standard direction is any one of a plurality of standard directions; if the first included angle is less than the second included angle, determine that the standard direction corresponding to the first road segment is the first standard direction, and the standard direction corresponding to the second road segment is the second standard direction, where the second standard direction is the standard direction adjacent to the first standard direction, and the actual direction of the second road segment is between the first standard direction and the second standard direction.
[0018] In combination with the second aspect, in some embodiments of the second aspect, the processing module is further configured to determine the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction corresponding to each road segment and a preset function, including: determining a first constraint condition corresponding to the endpoint of each road segment among a plurality of road segments, where the first constraint condition corresponding to the endpoint of the road segment corresponds to the standard direction of each road segment, and different standard directions correspond to different first constraint conditions; determining the position information corresponding to the endpoints of each road segment in the road network sketch according to the first constraint conditions corresponding to the endpoints of the plurality of road segments and the preset function.
[0019] In combination with the second aspect, in some embodiments of the second aspect, the processing module is further configured to: determine a target road segment in the first road, where the target road segment is the road segment in the first road that is the shortest distance from the second road, and the first road and the second road include a plurality of consecutive road segments with the same or opposite standard directions, and there are intersections other than the endpoints of the road segments between the first road and the second road in the road network sketch; determine the positional relationship between the first road and the second road according to the road information of the target road segment and the road information of a plurality of road segments in the second road; determine the position information corresponding to each road segment in the road network sketch according to the standard direction of each road segment and a preset function, including: determining a second constraint condition according to the positional relationship between the first road and the second road, and determining the position information corresponding to the plurality of road segments in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function.
[0020] In a third aspect, a device for generating a road network sketch is provided, including: at least one processor; the processor is configured to execute a computer program or instruction, so that the device for generating the road network sketch executes the method of the first aspect above.
[0021] In combination with the third aspect, in some embodiments of the third aspect, the device for generating the road network sketch further includes a memory, which is used to store necessary program instructions and data. The memory can be coupled with the processor, or can be independent of the processor.
[0022] In some possible designs, the device for generating the road network sketch can be a chip or a chip system. When the device for generating the road network sketch is a chip system, it can be composed of chips, or can include chips and other discrete devices.
[0023] In a fourth aspect, a computer-readable storage medium is provided, in which computer instructions are stored, and when executed by a computer, the computer can execute the method of the first aspect above.
[0024] In a fifth aspect, a computer program product containing instructions is provided, and when running on a computer, the computer can execute the method of the first aspect above.
[0025] Among them, the technical effects brought by any one of the design manners in the second aspect to the fifth aspect can refer to the technical effects brought by different design manners in the first aspect above, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic flowchart of a method for generating a road network sketch provided by this application;
[0027] Figure 2 It is a schematic diagram of a standard direction corresponding to a road segment provided by this application;
[0028] Figure 3 It is a schematic diagram of standard direction flipping provided by this application;
[0029] Figure 4 It is a schematic diagram of the interchange of the position information of the starting point and the ending point of a road segment with a preset standard direction as the standard direction provided by this application;
[0030] Figure 5 It is a schematic structural diagram of a real road network topology provided by this application;
[0031] Figure 6 It is a vector schematic diagram of a road segment with an incorrect intersection provided by this application;
[0032] Figure 7Another vector schematic diagram of a section of road with error intersections provided by this application;
[0033] Figure 8 A topological schematic diagram of multiple road sections starting from the same point provided by this application;
[0034] Figure 9 A schematic diagram of a normal road network sketch provided by this application;
[0035] Figure 10 A schematic diagram of an abnormal road network sketch provided by this application;
[0036] Figure 11 A topological schematic diagram of a target road section and a second road provided by this application;
[0037] Figure 12 A schematic diagram showing that multiple vectors are formed by the endpoints of a target road section and multiple endpoints in a second road provided by this application;
[0038] Figure 13 Another schematic diagram showing that multiple vectors are formed by the endpoints of a target road section and multiple endpoints in a second road provided by this application;
[0039] Figure 14 Another schematic diagram showing that multiple vectors are formed by the endpoints of a target road section and multiple endpoints in a second road provided by this application;
[0040] Figure 15 Another schematic diagram showing that multiple vectors are formed by the endpoints of a target road section and multiple endpoints in a second road provided by this application;
[0041] Figure 16 A topological diagram of a target road section and a second road provided by this application;
[0042] Figure 17 Another topological diagram of a target road section and a second road provided by this application;
[0043] Figure 18 Another topological diagram of a target road section and a second road provided by this application;
[0044] Figure 19 Another topological diagram of a target road section and a second road provided by this application;
[0045] Figure 20 Another topological diagram of a target road section and a second road provided by this application;
[0046] Figure 21 Another topological diagram of a target road section and a second road provided by this application;
[0047] Figure 22Another topological graph of the target road section and the second road provided by this application;
[0048] Figure 23 Another topological graph of the target road section and the second road provided by this application;
[0049] Figure 24 Schematic diagram of the standard direction unification processing of the road section in a road network sketch provided by this application;
[0050] Figure 25 Schematic diagram of the actual topology of the road network provided by this application;
[0051] Figure 26 Another schematic diagram of the road network sketch provided by this application;
[0052] Figure 27 Schematic flow diagram of another method for generating a road network sketch provided by this application;
[0053] Figure 28 Schematic structural diagram of a device for generating a road network sketch provided by this application;
[0054] Figure 29 Schematic structural diagram of another device for generating a road network sketch provided by this application. Detailed implementation manners
[0055] Next, the technical solutions in the embodiments of this application will be described in conjunction with the accompanying drawings in the embodiments of this application.
[0056] In the description of this application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple.
[0057] In addition, for the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific way for easy understanding.
[0058] It can be understood that the "embodiments" mentioned throughout the specification mean that specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, the various embodiments throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It can be understood that in various embodiments of the present application, the magnitude of the serial numbers of the various processes does not mean the order of execution, and the execution order of the various processes should be determined according to their functions and internal logics, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0059] It can be understood that in the present application, "when", "if" and "in case" all refer to corresponding processing under certain objective circumstances, which do not limit time, and do not require a judgment action when implemented, nor do they mean other limitations.
[0060] It can be understood that some optional features in the embodiments of the present application can, in some scenarios, be implemented independently without relying on other features, such as the current underlying solution, to solve corresponding technical problems and achieve corresponding effects. In some scenarios, they can also be combined with other features according to requirements. Correspondingly, the devices given in the embodiments of the present application can also implement these features or functions accordingly, which will not be elaborated here.
[0061] In this application, unless otherwise specified, the same or similar parts among various embodiments can be referred to each other. In various embodiments of this application, as well as in various implementation methods in each embodiment, if there is no special specification and logical conflict, the terms and / or descriptions among different embodiments, as well as among various implementation methods in each embodiment, are consistent and can be cross-referred. The technical features in different embodiments, as well as in various implementation methods in each embodiment, can be combined according to their inherent logical relationships to form new embodiments, implementation manners, implementation methods, or implementation ways. The following embodiments of this application do not constitute a limitation on the protection scope of this application.
[0062] Next, in conjunction with the accompanying drawings, the method for generating a road network sketch provided by the embodiments of this application will be elaborated.
[0063] As Figure 1 shown, it is a schematic flowchart of a method for generating a road network sketch provided by an embodiment of this application. The method for generating the road network sketch includes the following steps:
[0064] S101. The generating device of the road network sketch obtains the road information of multiple road segments within a preset area.
[0065] Among them, the road information of the road segment includes the position information of the endpoints of the road segment.
[0066] Optionally, the endpoints of the road segment can be two adjacent intersections or feature points on the road. The feature point is, for example, an inflection point at a curve where the radius of curvature is less than a preset threshold, and the preset threshold can be 10 meters.
[0067] Optionally, the position information of the endpoints of the road segment includes the position information of the starting point and the ending point of the road segment. The position information includes longitude and latitude. For example, the longitude and latitude of the starting point of the road segment are (x0, y0), and the longitude and latitude of the ending point of the road segment are (x1, y1). Of course, the position information of the endpoints can also be other information that can represent the position of the endpoints. This application does not limit this.
[0068] Optionally, the preset area can be a preset city or a preset district or county. Of course, the preset area can also be other preset areas with a larger or smaller scope. This application does not limit this.
[0069] S102. The generating device of the road network sketch determines the standard direction corresponding to each road segment.
[0070] Among them, the standard direction is used to represent the direction of the road segment in the road network sketch. The road network sketch includes multiple standard directions, and the angle between any two adjacent standard directions among the multiple standard directions is the same.
[0071] Optionally, taking the position information of the section endpoints including the position information of the section start point and the end point, and the position information including longitude and latitude as an example, for any section among multiple sections, the road network sketch generation device determines the angle corresponding to the section according to the first difference and the second difference of the section, and determines the standard direction corresponding to the section according to the corresponding relationship between the angle corresponding to the section and the preset corresponding relationship. Wherein, the first difference is the difference between the longitude of the section end point and the longitude of the start point, the second difference is the difference between the latitude of the section end point and the latitude of the start point, and the preset corresponding relationship includes multiple angle intervals and the standard direction corresponding to each angle interval.
[0072] As a possible implementation, the longitude and latitude of the section start point are (x0, y0), and the longitude and latitude of the section end point are (x1, y1). The first difference x = x1 - x0, and the second difference is y = y1 - y0. When x > 0 and y = 0, the road network sketch generation device determines that the angle corresponding to the section is 0°; when x > 0 and y > 0, the road network sketch generation device determines that the angle corresponding to the section is
arctan(y / x) * 180°
arctan(y / -x) * 180°
arctan(y / x) * 180°
arctan(-y / x) * 180°
[0073] As a possible implementation, Table 1 is an example of a preset corresponding relationship provided by this application. As shown in Table 1,
[0074] Table 1
[0075] Standard direction Angle range 0 【360° - Angle threshold, Angle threshold】 1
Angle threshold, 90° - Angle threshold
[0076] Among them, the value of the angle threshold in Table 1 is preset. For example, the value of the angle threshold can be 22.5°. Of course, the angle threshold can also take other angles, and this application does not limit this.
[0077] Combined with Table 1, after determining the angle corresponding to the section, the road network sketch generation device determines the standard direction corresponding to the angle interval where the angle corresponding to the section is located as the standard direction corresponding to the section.
[0078] As an example, Figure 2 This is a schematic diagram of the standard direction corresponding to a road segment provided by this application. Figure 2 There are a total of 8 standard directions, namely 0, 1, 2, 3, 4, 5, 6, and 7. The angle between each standard direction is the same, which is 45°. Of course, the angle between each standard direction can also be other angles, and this application does not limit this.
[0079] It can be understood that if the angle of the standard direction 0 is taken as 0°, then the angle of the standard direction 1 is 45°, the angle of the standard direction 2 is 90°, the angle of the standard direction 3 is 135°, the angle of the standard direction 4 is 180°, the angle of the standard direction 5 is 225°, the angle of the standard direction 6 is 270°, and the angle of the standard direction 7 is 315°.
[0080] S103. The generation device of the road network sketch determines the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction of each road segment and a preset function.
[0081] Optionally, before the generation device of the road network sketch determines the position information corresponding to the endpoints of each road segment in the road network sketch, it flips the standard direction of the road segment with the standard direction being the preset standard direction, and exchanges the position information of the starting point and the ending point of the road segment with the standard direction being the preset standard direction.
[0082] As a possible implementation, taking Figure 2 the standard direction shown as an example, the preset standard direction can be 4, 5, 6, 7, and the preset angle can be 180°. Figure 3 This is a schematic diagram of the flipping of the standard direction provided by this application. The generation device of the road network sketch flips the standard direction of the road segment with the standard direction being 4 by 180°. The standard direction of this road segment after flipping is the standard direction 0; it flips the standard direction of the road segment with the standard direction being 5 by 180°. The standard direction of this road segment after flipping is the standard direction 1. It flips the standard direction of the road segment with the standard direction being 6 by 180°. The standard direction of this road segment after flipping is the standard direction 2. It flips the standard direction of the road segment with the standard direction being 7 by 180°. The standard direction of this road segment after flipping is the standard direction 3. Figure 4 This is a schematic diagram of exchanging the position information of the starting point and the ending point of the road segment with the standard direction being the preset standard direction provided by this application. The generation device of the road network sketch takes the position information (x0, y0) of the starting point of the road segment before flipping the standard direction as the position information of the ending point of the road segment after flipping the standard direction, and takes the position information (x1, y1) of the ending point of the road segment before flipping the standard direction as the position information of the starting point of the road segment after flipping the standard direction. Through this step, the number of standard directions can be reduced, and thus the calculation amount can be reduced when determining the position information corresponding to each road segment in the road network sketch.
[0083] Optionally, the generation device of the road network sketch determines the first constraint condition corresponding to each end point of each of the multiple road segments, and determines the position information corresponding to each end point of each road segment in the road network sketch according to the first constraint condition corresponding to each end point of each road segment and a preset function, where the first constraint condition corresponding to each end point of each road segment corresponds to the standard direction of each road segment, and different standard directions correspond to different first constraint conditions.
[0084] As a possible implementation, when the generation device of the road network sketch flips the standard direction of the road segment with the standard direction being the preset standard direction and swaps the position information of the start point and the end point of the road segment with the standard direction being the preset standard direction, taking Figure 2 the standard direction shown as an example, the generation device of the road network sketch determines the number of end points in the multiple road segments. If there are N end points in the multiple road segments, the generation device of the road network sketch determines N a variables and N b variables, where (a, b) is used to indicate the position information of the N end points in the road network sketch. The first constraint condition between the start point position information (as, bs) and the end point position information (ae, be) of each road segment in the road network sketch is determined according to the standard direction of each road segment. When the standard direction of the road segment is 0, the generation device of the road network sketch determines that the first constraint condition corresponding to the road segment is as < ae, bs = be; when the standard direction of the road segment is 1, the generation device of the road network sketch determines that the first constraint condition corresponding to the road segment is as < ae, bs < be, be - bs = ae - as; when the standard direction of the road segment is 2, the generation device of the road network sketch determines that the first constraint condition corresponding to the road segment is as = ae, bs < be; when the standard direction of the road segment is 3, the generation device of the road network sketch determines that the first constraint condition corresponding to the road segment is as > ae, bs < be, be - bs = -ae + as, and the preset function can be
[0085] As an example, as Figure 5 shown, it is a schematic structural diagram of a real road network topology provided by the present application. Figure 5There are 5 sections in total, namely section 1, section 2, section 3, section 4, and section 5. There are 6 endpoints in these 5 sections, namely endpoint 1, endpoint 2, endpoint 3, endpoint 4, endpoint 5, and endpoint 6. Among them, the starting point of section 1 is endpoint 1, the ending point is endpoint 2, and the standard direction is standard direction 0. The starting point of section 2 is endpoint 2, the ending point is endpoint 4, and the standard direction is standard direction 2. The starting point of section 3 is endpoint 2, the ending point is endpoint 3, and the standard direction is standard direction 0. The starting point of section 4 is endpoint 5, the ending point is endpoint 2, and the standard direction is standard direction 2. The starting point of section 5 is endpoint 6, the ending point is endpoint 3, and the standard direction is standard direction 3. The generation device of the road network sketch determines 6 a variables and 6 b variables, namely endpoint 1 (a1, b1), endpoint 2 (a2, b2), endpoint 3 (a3, b3), endpoint 4 (a4, b4), endpoint 5 (a5, b5), and endpoint 6 (a6, b6). For section 1 with a standard direction of 0, the constraint condition between the starting point (a1, b1) and the ending point (a2, b2) of section 1 is determined as a1 < a2, b1 = b2. For section 2 with a standard direction of 2, the constraint condition between the starting point (a2, b2) and the ending point (a4, b4) of section 2 is determined as a2 = a4, b2 < b4. For section 3 with a standard direction of 0, the constraint condition between the starting point (a2, b2) and the ending point (a3, b3) of section 3 is determined as a2 < a3, b2 = b3. For section 4 with a standard direction of 2, the constraint condition between the starting point (a5, b5) and the ending point (a2, b2) of section 4 is determined as a5 = a2, b5 < b2. For section 5 with a standard direction of 3, the constraint condition between the starting point (a6, b6) and the ending point (a3, b3) of section 5 is determined as a6 > a3, b6 < b3, b3 - b6 = -a3 + a6. According to the constraint conditions corresponding to the above multiple sections and the preset function the position information corresponding to the starting point and the ending point of each section in the road network sketch can be determined.
[0086] S104. The generation device of the road network sketch generates a road network sketch according to the position information corresponding to the endpoints of each section in the road network sketch. There are no intersections other than the section endpoints in the road network sketch.
[0087] Optionally, when the position information corresponding to the starting points and the ending points of every two sections among multiple sections satisfies the first condition and the second condition in the road network sketch, the generation device of the road network sketch determines that there are no intersections other than the multiple section endpoints in the road network sketch.
[0088] As a possible implementation, taking the starting point 1s of section 1 as (a1s, b1s), the ending point 1e as (a1e, b1e), the starting point 2s of section 2 as (a2s, b2s), and the ending point 2e as (a2e, b2e) as an example, the first condition can be max(a1s, a1e) < min(a2s, a2e), max(b1s, b1e) < min(b2s, b2e), max(a2s, a2e) < min(a1s, a1e), or max(b2s, b2e) < min(b1s, b1e), and the second condition can be or
[0089] Combined with the second condition, Figure 6 This is a vector schematic diagram of a section with an incorrect intersection provided by the present application. After vector transformation, the condition in the second condition can also be expressed as [(a2s - a1s)*(b1e - b1s) - (a1e - a1s)*(b2s - b1s)] * [(a2e - a1s)*(b1e - b1s) - (a1e - a1s)*(b2e - b1s)] > 0.
[0090] Combined with the second condition, Figure 7 This is another vector schematic diagram of a section with an incorrect intersection provided by the present application. After vector transformation, the condition in the second condition can also be expressed as [(a1s - a2s)*(b2e - b2s) - (a2e - a2s)*(b1s - b2s)] * [(a1e - a2s)*(b2e - b2s) - (a2e - a2s)*(b1e - b2s)] > 0.
[0091] When it is determined that there are no intersections outside the endpoints of multiple sections in the road network sketch, since the road network sketch can be determined by the standard directions corresponding to multiple sections and the position information of the endpoints corresponding to multiple sections in the road network sketch, therefore, after determining the standard directions corresponding to multiple sections and the position information of the endpoints corresponding to multiple sections in the road network sketch, the generation device of the road network sketch can generate the road network sketch corresponding to these sections according to the standard direction of each section and the position information of the endpoints of each section in the road network sketch.
[0092] Compared with the prior art, the generation scheme of the road network sketch in the present application determines the standard directions corresponding to multiple sections through the road information of multiple sections within a preset area and determines the position information of the endpoints of each section in the road network sketch according to the standard directions corresponding to multiple sections and a preset function, and then generates the road network sketch, no longer relying on semi - automatic manual drawing, reducing the workload when generating the road network sketch.
[0093] The above is a general introduction to the solution of this application. Next, the solution of this application will be further described.
[0094] Optionally, after step S102, if there are N road sections with the same starting point position information in the first standard direction, the road network sketch generation device deletes N - 1 road sections that do not meet the preset conditions among the N road sections, where N is a positive integer greater than 2, and the first standard direction is any one of multiple standard directions.
[0095] As a possible implementation, the preset condition can be that the road grade is the highest. Of course, the preset condition can also be other conditions, and this application does not limit this.
[0096] As an example, taking the preset condition that the road grade is the highest as an example, if there are 3 road sections with the same starting point position information in the first standard direction, the road grade of road section 1 is expressway, the road grade of road section 2 is provincial road, and the road grade of road section 3 is rural road. Since the road grade of road section 1 is the highest, the road network sketch generation device deletes road section 2 and road section 3. In other words, if there are 3 road sections with the same starting point position information in the first standard direction, the road network sketch generation device retains the road section with the highest road grade.
[0097] Optionally, after the road network sketch generation device determines the standard direction corresponding to each road section, if there are a first road section and a second road section in the first standard direction, and the position information of the starting point of the first road section and the starting point of the second road section is the same, then determine the first included angle of the first road section and the second included angle of the second road section. The included angle is the included angle between the actual direction of the road section and the first standard direction. The actual direction of the road section is the direction from the starting point of the road section to the end point of the road section, and the first standard direction is any one of multiple standard directions. If the first included angle is less than the second included angle, then determine that the standard direction corresponding to the first road section is the first standard direction, and the standard direction corresponding to the second road section is the second standard direction. The second standard direction is the standard direction adjacent to the first standard direction, and the actual direction of the second road section is between the first standard direction and the second standard direction.
[0098] As an example, Figure 8 FIG. is a topological schematic diagram of multiple road sections with the same starting point provided by this application. Taking the first standard direction as standard direction 1 as an example, the road network sketch generation device determines that the included angle ∠1 between the actual direction of road section 1 and standard direction 1 is 5°, and determines that the included angle ∠2 between the actual direction of road section 2 and standard direction 1 is 7°. Then the road network sketch generation device determines that the standard direction corresponding to road section 1 is standard direction 1. Since the actual direction of road section 2 is between standard direction 1 and standard direction 0 and standard direction 0 is adjacent to standard direction 1, the road network sketch generation device determines that the standard direction corresponding to road section 2 is standard direction 0.
[0099] Based on the above solution, it is possible to avoid the situation where there are multiple road segments with the same starting point in the same standard direction.
[0100] In step S104, when the position information corresponding to the starting points and ending points of every two road segments among multiple road segments satisfies the first condition and the second condition, the road network sketch generating device determines that there are no intersections other than the endpoints of the multiple road segments in the road network sketch. Correspondingly, if the position information corresponding to the starting points and ending points of two road segments among the multiple road segments does not satisfy the first condition and the second condition, the road network sketch generating device determines that there are intersections other than the endpoints of the multiple road segments in the road network sketch. The situation where there are intersections other than the endpoints of the multiple road segments in the road network sketch will be described below.
[0101] For ease of description, in the following description, an intersection other than the endpoints of multiple road segments in the road network sketch is defined as abnormal intersection. For example, there is an intersection 1 other than the endpoints of multiple road segments in the road network sketch, and the two road segments passing through intersection 1 are road segment 1 and road segment 2, and road segment 1 and road segment 2 are defined as abnormal intersection.
[0102] Figure 9 This is a schematic diagram of a normal road network sketch provided by the present application. As Figure 9 shown, when the road network sketch is normal, road segment 2 is on the left side of road segment 1, and road segments 3 and 4 do not intersect with road segment 1, which can reflect the true road network topology. However, since the road network sketch generating device determines the constraint relationship between the starting point and the ending point of each road segment when determining the position information corresponding to the endpoints of each road segment in the road network sketch, and does not establish the constraint relationship between road segments 1-4, it may cause abnormal situations in the road network sketch.
[0103] On the basis of Figure 9 , Figure 10 This is a schematic diagram of an abnormal road network sketch provided by the present application. As Figure 10 shown, road segment 2 is on the right side of road segment 1, and road segments 3 and 4 intersect with road segment 1. At this time, the road network sketch reflects an incorrect road network topology and cannot reflect the Figure 9 normal road network topology in
[0104] Optionally, after the road network sketch generation device determines that multiple road segments intersect abnormally in the road network sketch, it determines the target road segment in the first road. The target road segment is the road segment in the first road that is the shortest distance from the second road. The first road and the second road include multiple consecutive road segments with the same or opposite standard directions, and there are intersections other than the segment endpoints between the first road and the second road in the road network sketch; it determines the positional relationship between the first road and the second road according to the road information of the target road segment and the road information of multiple road segments in the second road; according to the standard direction of each road segment and a preset function, it determines the corresponding position information of each road segment in the road network sketch, including: determining the second constraint condition according to the positional relationship between the first road and the second road, and determining the corresponding position information of the endpoints of each road segment in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function.
[0105] As a possible implementation, the road network sketch generation device determines the target road segment in the first road. The target road segment is the road segment in the first road that is the shortest distance from the second road, including: the road network sketch generation device determines the target road segment that is the shortest distance from the second road according to the road information of multiple road segments in the first road.
[0106] As Figure 11 shown, it is a topological schematic diagram of a target road segment and the second road provided by this application. According to the longitude and latitude of endpoints Q1, Q2, Q3, and Q4 in the first road, the distances between endpoints Q1, Q2, Q3, and Q4 and the second road are determined respectively, and the road segment corresponding to the two endpoints Q3 and Q4 that are the closest to the second road is used as the target road segment.
[0107] It should be noted that the standard directions of multiple road segments in the first road and the second road and the road information of multiple road segments in the first road and the second road have undergone a flipping operation in advance. Among them, the specific description of the flipping can refer to the relevant description in step S103 and will not be elaborated here.
[0108] As a possible implementation, the road network sketch generation device determines the positional relationship between the first road and the second road according to the road information of the target road segment and the road information of multiple road segments in the second road, including: the road network sketch generation device determines multiple cross product results of the vector from the starting point to the ending point of the target road segment and the vectors from the starting point of the target road segment to multiple endpoints in the second road, and determines the positional relationship between the first road and the second road according to the signs of the multiple cross product results.
[0109] As an example, on the basis of Figure 11 , Figure 12 it is a schematic diagram of multiple vectors formed by the endpoints of a target road segment and multiple endpoints in the second road provided by this application. As Figure 12 shown, the road network sketch generation device determines The cross - product result of the vectors, the signs of the cross - product results of four vectors are positive and negative, that is, the cross - product results of four vectors are of different signs. In this case, the road network sketch generation device determines that the positional relationship between the first road and the second road is that the starting point and the ending point of the second road are on both sides of the first road.
[0110] In Figure 12 this case, the road network sketch generation device will Figure 11 swap the first road and the second road in Figure 11 That is, take the first road in Figure 11 as the second road, and take the second road in Figure 11 as the first road. After swapping the first road and the second road, the road network sketch generation device re - determines the target section on the first road that is the shortest distance from the second road, and determines the positional relationship between the first road and the second road according to the road information of the target section and the road information of multiple sections on the second road.
[0111] Exemplarily, on the basis of Figure 11 , Figure 13 is a schematic diagram of another case where the endpoints of the target section provided by this application and multiple endpoints on the second road form multiple vectors. The road network sketch generation device determines that the target section corresponding to the starting point P2 and the ending point P3 is the shortest distance from the second road, and determines the cross - product result of four vectors. The signs of the cross - product results of four vectors are all positive, that is, the cross - product results of four vectors are of the same positive sign. At this time, the road network sketch generation device determines that the positional relationship between the first road and the second road is that the second road is in the counter - clockwise direction of the first road.
[0112] As another example, Figure 14 is a schematic diagram of another case where the endpoints of the target section provided by this application and multiple endpoints on the second road form multiple vectors. As shown in Figure 14 , the road network sketch generation device determines the cross - product result of four vectors. The signs of the cross - product results of four vectors are all positive, that is, the cross - product results of four vectors are of the same positive sign. In this case, the road network sketch generation device determines that the positional relationship between the first road and the second road is that the second road is in the counter - clockwise direction of the first road.
[0113] As another example, Figure 15 is a schematic diagram of another case where the endpoints of the target section provided by this application and multiple endpoints on the second road form multiple vectors. As shown in Figure 15 , the road network sketch generation device determines The cross - product results of the vectors, and the signs of the cross - product results of 4 vectors are all negative, that is, the cross - product results of the 4 vectors have the same negative sign. In this case, the road network sketch generation device determines that the positional relationship between the first road and the second road is that the second road is in the clockwise direction of the first road.
[0114] As a possible implementation, after the road network sketch generation device determines the positional relationship between the first road and the second road, it determines the second constraint condition according to the positional relationship between the first road and the second road, and determines the position information corresponding to the endpoints of each section in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function, including: The road network sketch generation device determines the second constraint condition corresponding to the endpoint of the target section and the endpoint of the second road that is closest to the target section according to the positional relationship between the first road and the second road and the standard direction of the target section, and determines the position information corresponding to the endpoints of each section in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function.
[0115] Among them, the specific descriptions of the first constraint condition and the preset function can be referred to the relevant descriptions in step S103, which will not be elaborated here. Only the second constraint condition will be described below.
[0116] As an example, taking the standard direction as Figure 3 the standard direction 0 - 3 in, and taking the starting point 2s(a2s, b2s) and the ending point 2e(a2e, b2e) of the target section and the endpoint 1s(a1s, b1s) of the second road that is closest to the target section as an example. In the case where the second road is in the counter - clockwise direction of the target section, Figure 16 This is a topological graph of a target section and a second road provided by this application. As shown in Figure 16 , if the standard direction of the target section is the standard direction 0, the road network sketch generation device determines that the second constraint condition is b2s < b1s; Figure 17 This is another topological graph of a target section and a second road provided by this application. As shown in Figure 17 , if the standard direction of the target section is the standard direction 1, the road network sketch generation device determines that the second constraint condition is After vector transformation, this second constraint condition can be expressed as a2s - b2s - a1s + b1s > 0; Figure 18 This is another topological graph of a target section and a second road provided by this application. As shown in Figure 18 , if the standard direction of the target section is the standard direction 2, the road network sketch generation device determines that the second constraint condition is a2s > a1s; Figure 19 This is another topological graph of a target section and a second road provided by this application. As shown in Figure 19As shown, if the standard direction of the target road segment is standard direction 3, the generation device of the road network sketch determines that the second constraint condition is After vector transformation, this second constraint condition can be expressed as -a2s - b2s + a1s + b1s < 0.
[0117] As another example, taking the standard directions 0 - 3 in Figure 3 as an example, for the starting point 2s(a2s, b2s) and the ending point 2e(a2e, b2e) of the target road segment and the endpoint 1s(a1s, b1s) of the second road that is the closest to the target road segment in the second road. In the case where the second road is in the clockwise direction of the target road segment, Figure 20 This is another topological graph of the target road segment and the second road provided by this application. As Figure 20 shown, if the standard direction of the target road segment is standard direction 0, the generation device of the road network sketch determines that the second constraint condition is b2s > b1s; Figure 21 This is another topological graph of the target road segment and the second road provided by this application. As Figure 21 shown, if the standard direction of the target road segment is standard direction 1, the generation device of the road network sketch determines that the second constraint condition is After vector transformation, this second constraint condition can be expressed as a2s - b2s - a1s + b1s < 0; Figure 22 This is another topological graph of the target road segment and the second road provided by this application. As Figure 22 shown, if the standard direction of the target road segment is standard direction 2, the generation device of the road network sketch determines that the second constraint condition is a2s < a1s; Figure 23 This is another sketch of the target road segment and the second road provided by this application. As Figure 23 shown, if the standard direction of the target road segment is standard direction 3, the generation device of the road network sketch determines that the second constraint condition is After vector transformation, this second constraint condition can be expressed as -a2s - b2s + a1s + b1s > 0.
[0118] After determining the second constraint condition, the generation device of the road network sketch determines the position information corresponding to the endpoints of each road segment in the road network sketch according to the first constraint condition, the second constraint condition, and a preset function. Among them, the specific process of the generation device of the road network sketch determining the position information corresponding to the endpoints of each road segment in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function is similar to the process in step S103 according to the first constraint condition and the preset function, and will not be elaborated here.
[0119] Optionally, after determining the position information corresponding to a road segment in the road network sketch according to the first constraint condition, the second constraint condition, and a preset function, the road network sketch generation device repeatedly executes the above solution. When there is no incorrect intersection in the position information corresponding to the determined road segment in the road network sketch, a road network sketch is generated according to the position information corresponding to the last determined road segment in the road network sketch, or the above solution is repeatedly executed 10 times, and a road network sketch is generated according to the position information corresponding to the multiple road segments determined for the 10th time in the road network sketch.
[0120] Optionally, after generating the road network sketch, the road network sketch generation device can further perform a double-line processing on the road network sketch.
[0121] As a possible implementation, the road network sketch generation device performs double-line processing on the road network sketch according to the first processing statement.
[0122] As an example, the first processing statement can be a Structured Query Language (SQL) statement:
[0123]
[0124]
[0125] It should be noted that the first processing statement can also be other processing statements, and this application does not limit this.
[0126] Figure 24 This is a schematic diagram for the unified standard direction processing of road segments in a road network sketch provided by this application. Through the above SQL statement, as Figure 24 shown, when the standard directions of multiple road segments connected end to end in sequence in the road network sketch are the same or opposite, the standard directions of the multiple road segments connected end to end in sequence can be unified, and then double-line processing can be performed on the road network sketch.
[0127] Optionally, the road network sketch generation device attaches the name and road condition information of the road segment to the corresponding road segment in the road network sketch.
[0128] Figure 25 This is a schematic diagram of the actual topology of a road network provided by this application, Figure 26 This is another schematic diagram of a road network sketch provided by this application. After the above solution, Figure 25 the irregular road network in Figure 26 is determined to be the regular road network sketch in
[0129]
[0130] Figure 27 A schematic diagram of another method for generating a road network diagram provided in this application is shown in FIG. Figure 27 As shown, the device for generating a road network diagram obtains the road information of multiple road sections in a preset area, determines the first constraint condition and the preset function according to the road information of the multiple road sections, and determines the corresponding position information of the road section in the road network diagram according to the first constraint condition and the preset function, and the number of cycles is 1 at this time. Then, it is determined whether the number of cycles is less than 10. If not, the road network diagram is generated according to the corresponding position information of the road section in the road network diagram. If so, it is further determined whether there is an abnormal intersection of the road section in the road network diagram according to the corresponding position information of the road section in the road network diagram. If it is determined that there is no abnormal intersection of the road section in the road network diagram, the road network diagram is generated according to the corresponding position information of the road section in the road network diagram. If it is determined that there is an abnormal intersection of the road section in the road network diagram, the second constraint condition is determined, and the corresponding position information of the road section in the road network diagram is re-determined according to the first constraint condition, the second constraint condition and the preset function. At this time, the number of cycles is +1. Execute the step of determining whether the number of cycles is less than 10 and the subsequent steps again until the number of cycles is not less than 10 or it is determined that there is no abnormal intersection in the road section in the road network diagram, and generate a road network diagram based on the corresponding position information of the road section in the road network diagram.
[0131] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method for generating a road network diagram executed by a device for generating a road network diagram. In order to achieve the above functions, the device for generating a road network diagram includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0132] Embodiments of the present application can divide the generation device of the road network sketch into functional modules according to the above method examples. For example, each functional module can be corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. Optionally, the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation. In addition, the "module" here can refer to a specific application-specific integrated circuit (ASIC), a circuit, a processor and a memory that execute one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions.
[0133] In the case of adopting functional module division, Figure 28 shows a schematic structural diagram of a generation device of a road network sketch. As Figure 28 shown, the generation device of the road network sketch includes an acquisition module 2801 and a processing module 2802.
[0134] In some embodiments, the generation device 280 of the road network sketch may further include a storage module ( Figure 28 not shown in the figure), which is used to store program instructions and data.
[0135] Among them, the acquisition module 2801 is used to acquire road information of multiple road segments within a preset area, and the road information includes the position information of the endpoints of the road segments; the processing module 2802 is used to determine the standard direction corresponding to each road segment, and the standard direction is used to represent the direction of the road segment in the road network sketch. The road network sketch includes multiple standard directions, and the included angle between any two adjacent standard directions among the multiple standard directions is the same; the processing module 2802 is further used to determine the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction of each road segment and a preset function; the processing module 2802 is further used to generate a road network sketch according to the position information corresponding to the endpoints of each road segment in the road network sketch, and there are no intersections other than the endpoints of the road segments in the road network sketch.
[0136] As a possible implementation, the location information of the road segment endpoints includes the location information of the start point and the end point of the road segment. The location information includes longitude and latitude. The processing module 2802 is configured to determine the standard directions corresponding to multiple road segments, including: for any road segment among the multiple road segments, determining the angle corresponding to the road segment according to the first difference and the second difference of the road segment. The first difference is the difference between the longitude of the end point and the longitude of the start point of the road segment, and the second difference is the difference between the latitude of the end point and the latitude of the start point of the road segment; determining the standard direction corresponding to the road segment according to the angle corresponding to the road segment and the preset corresponding relationship. The preset corresponding relationship includes multiple angle intervals and the standard direction corresponding to each angle interval.
[0137] As a possible implementation, the processing module 2802 is further configured to: if there are N road segments with the same start point location information in the first standard direction, delete N - 1 road segments that do not meet the preset conditions among the N road segments, where N is a positive integer greater than 2, and the first standard direction is any one of the multiple standard directions.
[0138] As a possible implementation, the processing module 2802 is further configured to: if there are a first road segment and a second road segment in the first standard direction, and the location information of the start points of the first road segment and the second road segment is the same, determine the first included angle of the first road segment and the second included angle of the second road segment. The included angle is the included angle between the actual direction of the road segment and the first standard direction. The actual direction of the road segment is the direction from the start point of the road segment to the end point of the road segment, and the first standard direction is any one of the multiple standard directions; if the first included angle is less than the second included angle, determine that the standard direction corresponding to the first road segment is the first standard direction, and the standard direction corresponding to the second road segment is the second standard direction. The second standard direction is the standard direction adjacent to the first standard direction, and the actual direction of the second road segment is located between the first standard direction and the second standard direction.
[0139] As a possible implementation, the processing module 2802 is further configured to determine the location information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction corresponding to each road segment and the preset function, including: determining the first constraint condition corresponding to the endpoints of each road segment among the multiple road segments. The first constraint condition corresponding to the endpoints of the road segment corresponds to the standard direction of each road segment, and different standard directions correspond to different first constraint conditions; determining the location information corresponding to the endpoints of each road segment in the topological graph according to the first constraint conditions corresponding to the endpoints of the multiple road segments and the preset function.
[0140] As a possible implementation, the processing module 2802 is further configured to: determine a target section in the first road, where the target section is the section in the first road with the shortest distance from the second road, and the first road and the second road include multiple consecutive sections with the same or opposite standard directions, and there are intersections other than the section endpoints between the first road and the second road in the road network sketch; determine the positional relationship between the first road and the second road according to the road information of the target section and the road information of multiple sections in the second road; determine the position information corresponding to each section in the road network sketch according to the standard direction of each section and a preset function, including: determining a second constraint condition according to the positional relationship between the first road and the second road, and determining the position information corresponding to multiple sections in the road network sketch according to the first constraint condition, the second constraint condition and the preset function.
[0141] All relevant contents of each step involved in the above method embodiment can be cited in the function description of the corresponding functional module, and will not be repeated here.
[0142] In the case of implementing the functions of the above functional modules in the form of hardware Figure 29 FIG. shows a schematic structural diagram of another road network sketch generation device. As Figure 29 shown, the road network sketch generation device includes a processor 2901, a memory 2902, and a bus 2903. The processor 2901 and the memory 2902 can be connected through the bus 2903.
[0143] The processor 2901 is the control center of the road network sketch generation device 290, and can be a single processor or a collective term for multiple processing elements. For example, the processor 2901 can be a general-purpose central processing unit (CPU), or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0144] As an embodiment, the processor 2901 may include one or more CPUs, such as Figure 29 the CPU0 and CPU 1 shown in
[0145] The memory 2902 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or can also be an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0146] As a possible implementation, the memory 2902 can exist independently of the processor 2901. The memory 2902 can be connected to the processor 2901 through the bus 2903 for storing instructions or program code. When the processor 2901 calls and executes the instructions or program code stored in the memory 2902, the one-time identity identification usage method provided by the embodiments of the present invention can be implemented.
[0147] In another possible implementation, the memory 2902 can also be integrated with the processor 2901.
[0148] The bus 2903 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 29 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0149] It should be noted that Figure 29 the structure shown does not constitute a limitation on the road network sketch generation device 290. Except Figure 29 for the components shown, the road network sketch generation device 290 can include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0150] As an example, in combination with Figure 28 , the functions implemented by the acquisition module 2801 and the processing module 2802 in the road network sketch generation device 280 are the same as those of Figure 8 the processor 801 in
[0151] Optionally, as Figure 29 shown, the road network sketch generation device 290 provided by the embodiments of the present application may further include a communication interface 2904.
[0152] The communication interface 2904 is used to connect to other devices through a communication network. The communication network may be an Ethernet, a radio access network, a wireless local area network (WLAN), etc. The communication interface 2904 may include a receiving unit for receiving data and a sending unit for sending data.
[0153] In a possible implementation manner, in the road network sketch generation device 290 provided by the embodiments of the present application, the communication interface 2904 may also be integrated in the processor 2901, and the embodiments of the present application do not make specific limitations on this.
[0154] As an example, in combination with Figure 28 , the functions implemented by the acquisition module 2801 and the processing module 2802 in the road network sketch generation device 280 are the same as those of Figure 29 the processor 2901 in
[0155] As a possible product form, the road network sketch generation device of the embodiments of the present application may also be implemented by using the following: one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gate logics, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout the present application.
[0156] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above division of each functional unit is used for illustration. In actual applications, the above functions may be allocated to different functional units according to needs, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above. The specific working processes of the systems, devices, and units described above may refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0157] The embodiments of the present invention also provide a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the foregoing method embodiments.
[0158] An embodiment of the present invention provides a computer program product including instructions that, when run on a computer, cause the computer to execute each step in the method flow shown in the above method embodiment.
[0159] Among them, a computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable Compact Disc Read-Only Memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in a specific-purpose ASIC. In the embodiments of the present application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.
[0160] Since the road network sketch generation device, computer-readable storage medium, and computer program product provided in this embodiment can be applied to the road network sketch generation method provided in the above, the technical effects that can be obtained can also refer to the above method embodiment, and the embodiments of the present invention will not be elaborated here.
[0161] Although the present application has been described in conjunction with various embodiments herein, however, in the process of implementing the claimed present application, those skilled in the art can understand and implement other changes of the disclosed embodiments by viewing the drawings, the disclosure content, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality of cases. A single processor or other unit can implement several functions recited in the claims. Certain measures are recited in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0162] Although the present application has been described in connection with specific features and their embodiments, it will be apparent that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the specification and drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. A method for generating a simplified road network diagram, characterized in that, The method includes: Obtaining road information of multiple road segments within a preset area, where the road information includes the position information of the endpoints of the road segments; Determining a standard direction corresponding to each road segment, where the standard direction is used to represent the direction of the road segment in the road network sketch, the road network sketch includes multiple standard directions, and the angle between any two adjacent standard directions among the multiple standard directions is the same; Determining the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction of each road segment and a preset function; Generating the road network sketch according to the position information corresponding to the endpoints of each road segment in the road network sketch, and there are no intersections in the road network sketch other than the endpoints of the road segments; The position information of the endpoints of the road segments includes the position information of the starting point and the ending point of the road segment, and the position information includes longitude and latitude. Determining the standard directions corresponding to the multiple road segments includes: For any road segment among the multiple road segments, determining the angle corresponding to the road segment according to the first difference and the second difference of the road segment, where the first difference is the difference between the longitude of the ending point and the longitude of the starting point of the road segment, and the second difference is the difference between the latitude of the ending point and the latitude of the starting point of the road segment; Determining the standard direction corresponding to the road segment according to the angle corresponding to the road segment and a preset correspondence, where the preset correspondence includes multiple angle intervals and the standard direction corresponding to each angle interval.
2. The method according to claim 1, wherein The method further includes: If there are N road segments with the same starting point position information in the first standard direction, deleting N - 1 road segments that do not meet the preset conditions among the N road segments, where N is a positive integer greater than 2, and the first standard direction is any one of the multiple standard directions.
3. The method according to claim 1, characterized in that, The method further includes: If there are a first road segment and a second road segment in the first standard direction, and the position information of the starting points of the first road segment and the second road segment is the same, then determining the first included angle of the first road segment and the second included angle of the second road segment, where the included angle is the angle between the actual direction of the road segment and the first standard direction, the actual direction of the road segment is the direction from the starting point of the road segment to the ending point of the road segment, and the first standard direction is any one of the multiple standard directions; If the first included angle is less than the second included angle, then determining that the standard direction corresponding to the first road segment is the first standard direction, and the standard direction corresponding to the second road segment is the second standard direction, where the second standard direction is the standard direction adjacent to the first standard direction, and the actual direction of the second road segment is between the first standard direction and the second standard direction.
4. The method according to any one of claims 1 to 3, characterized in that The determining the position information corresponding to the endpoints of each road segment in the road network sketch according to the standard direction of each road segment and a preset function includes: Determining the first constraint condition corresponding to the endpoints of each road segment among the multiple road segments, where the first constraint condition corresponding to the endpoints of the road segment corresponds to the standard direction of each road segment, and different standard directions correspond to different first constraint conditions; Determine the position information corresponding to the endpoints of each section in the topological graph according to the first constraint conditions corresponding to the endpoints of the multiple sections and the preset function.
5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Determine a target section in the first road, where the target section is the section with the shortest distance from the first road to the second road. The first road and the second road include multiple consecutive sections with the same or opposite standard directions. In the road network sketch, there are intersections other than the section endpoints between the first road and the second road; Determine the positional relationship between the first road and the second road according to the road information of the target section and the road information of multiple sections in the second road; The determining, according to the standard direction of each section and the preset function, the position information corresponding to each section in the road network sketch includes: Determine a second constraint condition according to the positional relationship between the first road and the second road, and determine the position information corresponding to the multiple sections in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function.
6. An apparatus for generating a simplified road network diagram, characterized in that The device includes: an acquisition module and a processing module; The acquisition module is configured to acquire road information of multiple sections in a preset area, where the road information includes the position information of the section endpoints; The processing module is configured to determine the standard direction corresponding to each section, where the standard direction is used to represent the direction of the section in the road network sketch. The road network sketch includes multiple standard directions, and the angle between any two adjacent standard directions among the multiple standard directions is the same; The processing module is further configured to determine the position information corresponding to the endpoints of each section in the road network sketch according to the standard direction of each section and the preset function; The processing module is further configured to generate the road network sketch according to the position information corresponding to the endpoints of each section in the road network sketch, and there are no intersections other than the section endpoints in the road network sketch; The position information of the section endpoints includes the position information of the section start point and the end point. The position information includes longitude and latitude. The processing module is configured to determine the standard directions corresponding to the multiple sections, including: For any section among the multiple sections, determine the angle corresponding to the section according to the first difference and the second difference of the section. The first difference is the difference between the longitude of the section end point and the longitude of the start point, and the second difference is the difference between the latitude of the section end point and the latitude of the start point; Determine the standard direction corresponding to the section according to the angle corresponding to the section and the preset correspondence relationship. The preset correspondence relationship includes multiple angle intervals and the standard direction corresponding to each angle interval.
7. The device according to claim 6, characterized in that, The processing module is further configured to: If there are N sections with the same start point position information in the first standard direction, delete N - 1 sections that do not meet the preset conditions among the N sections, where N is a positive integer greater than 2, and the first standard direction is any one of the multiple standard directions.
8. The device according to claim 6, characterized in that, The processing module is further configured to: If there are a first road segment and a second road segment in a first standard direction, and the position information of the starting point of the first road segment and the starting point of the second road segment is the same, then determine a first included angle of the first road segment and a second included angle of the second road segment. The included angle is the angle between the actual direction of the road segment and the first standard direction. The actual direction of the road segment is the direction from the starting point of the road segment to the ending point of the road segment, and the first standard direction is any one of the multiple standard directions; If the first included angle is less than the second included angle, then determine that the standard direction corresponding to the first road segment is the first standard direction, and the standard direction corresponding to the second road segment is a second standard direction. The second standard direction is a standard direction adjacent to the first standard direction, and the actual direction of the second road segment is located between the first standard direction and the second standard direction.
9. The device according to any one of claims 6 - 8, characterized in that, The processing module is further configured to determine, according to the standard direction corresponding to each road segment and a preset function, the position information corresponding to the endpoints of each road segment in the road network sketch, including: Determine a first constraint condition corresponding to the endpoints of each road segment among the multiple road segments. The first constraint condition corresponding to the endpoints of the road segment corresponds to the standard direction of each road segment, and different standard directions correspond to different first constraint conditions; Determine the position information corresponding to the endpoints of each road segment in the topological graph according to the first constraint conditions corresponding to the endpoints of the multiple road segments and the preset function.
10. The device according to any one of claims 6-8, characterized in that, The processing module is further configured to: Determine a target road segment in a first road. The target road segment is the road segment in the first road that is the shortest distance from a second road. The first road and the second road include multiple consecutive road segments with the same or opposite standard directions, and there are intersections other than the endpoints of the road segments between the first road and the second road in the road network sketch; Determine the positional relationship between the first road and the second road according to the road information of the target road segment and the road information of multiple road segments in the second road; The determining, according to the standard direction of each road segment and a preset function, the position information corresponding to each road segment in the road network sketch includes: Determine a second constraint condition according to the positional relationship between the first road and the second road, and determine the position information corresponding to the multiple road segments in the road network sketch according to the first constraint condition, the second constraint condition, and the preset function.
11. A generating device for a road network sketch, characterized in that, The device for generating the road network sketch includes: a processor; The processor is configured to read computer execution instructions in a memory and execute the computer execution instructions, so that the device for generating the road network sketch executes the method according to any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, A computer program or instruction is stored in the computer-readable storage medium. When the computer program or instruction is executed by the device for generating the road network sketch, the method according to any one of claims 1-5 is implemented.