One-to-many flow diagram layout method and device
By modeling the area to be laid out as plane digital elevation model DEM data and using the maze algorithm to determine the flow path, the inefficiency problem of the automation generation of one-to-many flow charts in the existing technology is solved, and efficient and unified flow chart generation is achieved .
Patent Information
- Application Number
- CN202111575945.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-12-21
AI Technical Summary
When the prior art automatically generates one-to-many flow charts, the degree of automation is low, the calculation cost is high, and it is difficult to adapt to different mapping tasks and constraints.
By modeling the area to be laid out as plane digital elevation model DEM data, the flow path from the end grid to all start grids is iteratively determined based on path length and path importance.
It realizes efficient and unified automatic generation of flow charts, meets common graph constraints, and improves computing efficiency and applicability.
Smart Images

Figure CN114254064B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of geographic information visualization technology, and in particular to a one-to-many flow diagram layout method and device. Background Art
[0002] Flow maps use paths to express the flow of elements from the starting point to the end point within a certain time range while ignoring the intermediate details. The expression is intuitive and concise. It is an effective visualization method for expressing the spatial flow of elements and is widely used in visualization tasks such as population migration, knowledge dissemination, and trade exchanges. Based on the different forms of flow data, flow map visualization methods that can be used to express different numbers of starting points, different flow forms, and different mapping spaces have been proposed. While effectively expressing the spatial distribution of element flows, flow map drawing must ensure that readers can clearly read map graphics, that is, it is necessary to reduce visual conflicts. The above methods are effective in reducing visual conflicts. The main strategies include hierarchical clustering, data aggregation, edge bundling, force-directed algorithms, spatial dendrograms, and matrix-based methods.
[0003] One-to-many flow diagrams are usually arranged in a tree-like layout, where the trunk and branches of the tree are drawn with different widths to depict the path and volume of the flow of elements by bundling edges into hierarchical results. To automatically generate one-to-many flow diagrams, the commonly used methods include a variety of methods based on spiral trees and force guidance. However, these methods generally have low automation and high computational costs. In addition, different methods are designed for different application purposes and are difficult to apply to different mapping constraints under other mapping task conditions. Therefore, it is necessary to develop an efficient and unified model to automatically complete the generation of one-to-many flow diagrams to meet the commonly used one-to-many flow diagram mapping constraints. Summary of the invention
[0004] The main purpose of the present disclosure is to provide a one-to-many flow diagram layout method and device, which can solve at least one of the above-mentioned technical problems.
[0005] To achieve the above-mentioned purpose, the first aspect of the embodiment of the present disclosure provides a one-to-many flow graph layout method, characterized by comprising:
[0006] Modeling the area to be laid out into planar digital elevation model (DEM) data, wherein the digital elevation model includes a plurality of grids, each of which carries resolution information and grid type information;
[0007] Calculating path length and path importance according to the resolution information and the grid type information;
[0008] Based on a preset maze algorithm, according to the path length and the path importance, a flow path from the end point grid to all the start point grids in the area to be laid out is iteratively determined.
[0009] In an embodiment of the present disclosure, the area to be laid out includes a plurality of mapping data point pairs, and the method further includes:
[0010] Obtaining the first N nearest mapping data points among the plurality of mapping data points, N>O;
[0011] Calculating the average distance between the first N nearest pairs of mapping data points in the mapping data points;
[0012] Half of the average distance is taken as the resolution of the grid.
[0013] In one embodiment of the present disclosure, the method further includes:
[0014] The grid type of the grid is determined by the type of the mapping area where the grid is located. When the grid types through which the flow path passes are different, the distance calculation weight α used to calculate the path length is different.
[0015] In one embodiment of the present disclosure, the path length is calculated according to the resolution information and the grid type information;
[0016] Assume that the generated flow path set is FpS = {Fp1, Fp2, ..., Fp n , ...}, the newly generated flow path Fp i The path length PL i The calculation formula is:
[0017] PL i =subPL 1 i +subPL 2 i ×ω;
[0018] subPL 1 i Fp i Fp n ∈FpS part of the subpath length, subPL 2 i Fp i Not in Fp n ∈FpS is the subpath length of the part, w is the weight parameter, w≤1.
[0019] The lengths of adjacent grids passed by the sub-paths of the flow path are accumulated to calculate the sub-path length of the flow path;
[0020] When the two adjacent grids are adjacent to each other in a straight line, the distance D between the two adjacent grids is cn =0.5Rs×α 1+0.5Rs×α 2 ;
[0021] When the two adjacent grids are diagonally adjacent, the distance between the two adjacent grids is
[0022] Among them, Rs is the resolution of the grid, α 1 and α 2 Calculate weights for the distances between two adjacent grids separately.
[0023] In one embodiment of the present disclosure, it is assumed that the generated flow path set is FpS={Fp1, Fp2, ..., Fp n , ...}, if the newly generated flow path Fp i Inflow Fp n ∈FpS, the inflow angle is less than the preset threshold condition or the newly generated flow path Fp i Not in Fp n If the length of the sub-path of the ∈FpS part is less than the preset threshold condition, a penalty coefficient PL is added to the path length PLi of the newly generated flow path Fpi. pen .
[0024] In one embodiment of the present disclosure, the path importance is calculated according to the path length;
[0025] Assume that the generated path set FpS = {Fp1, Fp2, ..., Fp n , ...}, given the newly generated flow path Fp i , the newly generated flow path Fp i The subpath is denoted as Fp′ i ∈Fp i , the newly generated flow path Fp i Path Importance PM i :
[0026]
[0027] Among them, Gim is a constant, take G im =50Rs, Rs is the resolution of the adjacent grid.
[0028] In one embodiment of the present disclosure, the preset maze algorithm only searches from the end grid in the direction toward the start grid, and the optional search direction range P ds :
[0029]
[0030] Among them, Angle ANIt indicates the angle of the line connecting the end grid and the start grid rotated clockwise to the horizontal direction. The full set of search directions is 8D = {0, 1, 2, 3, 4, 5, 6, 7}, the west direction is 0, and it is encoded clockwise.
[0031] In one embodiment of the present disclosure, the search direction of the preset maze algorithm has a priority, and the method further includes:
[0032] Calculate the cumulative flow P of the k-order neighboring area of the corresponding grid f , f ij is the grid G ij Traffic volume;
[0033] Based on the cumulative flow P of the neighboring grids of the corresponding grid f The difference Sa determines the priority of the search direction of the preset maze algorithm;
[0034]
[0035] in, and are two adjacent grids G c and G n Potential cumulative flow, T f is a constant, T f ∈R + .
[0036] In one embodiment of the present disclosure, the method further includes:
[0037] Obtaining the path flow rate of each of the flow paths;
[0038] calculating a width of each of the flow paths based on a path flow rate of each of the flow paths;
[0039]
[0040] Where Wi is the width of the flow path, FV sum is the total flow of the flow diagram data, FV i is the flow path flow rate, W max is the maximum width of the flow path.
[0041] A second aspect of an embodiment of the present disclosure provides a one-to-many flow graph layout device, including:
[0042] Establishing a module for modeling the area to be laid out into a planar digital elevation model DEM, wherein the digital elevation model includes a plurality of grids, each of which carries at least one of resolution information and grid type information;
[0043] A calculation module, used for calculating the path length and the path importance according to the resolution information and the grid type information;
[0044] The determination module is used to iteratively determine the flow path from the end point grid to all the starting point grids in the area to be laid out based on a preset maze algorithm according to the path length and the path importance.
[0045] A third aspect of the present disclosure provides an electronic device, including:
[0046] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the one-to-many flow graph layout method provided in the first aspect of the embodiment of the present disclosure when executing the program.
[0047] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the one-to-many flow graph layout method provided by the first aspect of an embodiment of the present disclosure is implemented.
[0048] It can be seen from the above embodiments of the present disclosure that the one-to-many flow graph layout method, device, electronic device and storage medium provided by the present disclosure have the following beneficial effects:
[0049] (1) The layout constraints of flow map drawing, such as no visual conflict, balanced distribution and high consistency of data expression, are fully considered, and the generated flow map has good visualization effect;
[0050] (2) The mapping space is modeled as planar DEM data, and the river flow distribution algorithm in DEM is used to generate a one-to-many flow map. The layout constraints of the flow map can be controlled by setting parameters, which is easy to implement and suitable for user interaction.
[0051] (3) The maze algorithm for water flow extraction is improved. When the search direction range is determined, only the search is performed from the end grid toward the starting grid, which speeds up the algorithm search efficiency and has high computational efficiency.
[0052] (4) The method has a wide range of application scenarios and is also suitable for the flow diagram representation in heterogeneous spaces and spaces with obstacles, and has strong scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 A schematic diagram of a flow chart of a one-to-many flow diagram layout method provided by an embodiment of the present disclosure;
[0055] Figure 2 A schematic diagram of the structure of a one-to-many flow diagram layout device provided by an embodiment of the present disclosure;
[0056] Figure 3 A schematic diagram of the hardware structure of an electronic device is shown. DETAILED DESCRIPTION
[0057] In order to make the disclosure purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0058] See also Figure 1 , Figure 1 This is a flow chart of a one-to-many flow diagram layout method provided by an embodiment of the present disclosure. The method can be applied to making a population migration flow diagram, a commodity sales flow diagram, etc. The method mainly includes the following steps:
[0059] S101, modeling the area to be laid out into planar digital elevation model DEM data, where the digital elevation model includes a plurality of grids, each of which carries resolution information and grid type information.
[0060] In the present disclosure, the end point and the start point are represented by corresponding grids, and the end point grid has outflow flow, and its flow eventually flows to the start point grid.
[0061] In one embodiment of the present disclosure, the area to be laid out includes a plurality of mapping data points. The first N nearest pairs of mapping data points in the plurality of mapping data points are obtained, N>0, and the average distance of the first N nearest pairs of mapping data points in the mapping data points is calculated, and half of the average distance is used as the resolution of the grid. The first N can be any value, such as 3%, 5%, 10%, etc.
[0062] In the present disclosure, the resolution Rs is calculated based on the proximity distance between mapping data points. Taking N as 5% as an example, the formula is as follows:
[0063]
[0064] Wherein, AveMinD(5%) is the average distance of the top 5% of the nearest neighboring mapping data points among the mapping data points.
[0065] In the present disclosure, the grid may further include range information, and the range may take into account possible blocking areas in the mapping space, and the DEM grid containing the blocking areas may be deleted.
[0066] In the present disclosure, the grid type of the DEM takes into account the heterogeneity of the mapping space, and is determined according to the type of the mapping area corresponding to the grid, and the grid type is determined by the type with the largest area in the grid. The grid type can be identified by different numbers, and when the flow path passes through different types of grids, the distance calculation weight α is different. In one example, α is specifically determined by the user according to needs. If the grid corresponding to the mapping area has a large cost, the larger the value of α.
[0067] S102: Calculate path length and path importance according to the resolution information and the grid type information.
[0068] In the present disclosure, the path length PL is the length of the flow path from the end grid to the start grid. The path length PL can be obtained by calculating the grids that the flow path passes through, and the distance D between two adjacent grids in the grids that the flow path passes through is cn The calculation formula is:
[0069]
[0070] Where Rs is the resolution of the grid, α 1 and α 2 Calculate weights for the distances between two adjacent grids separately.
[0071] In the present disclosure, the path length PL is calculated according to the resolution information and the grid type information. The calculation of the path length PL takes into account the constraint of minimizing the total length of the flow graph path. Assuming that the generated flow path set is FpS = {Fp1, Fp2, Fp n , …}, the newly generated flow path Fp i The path length PL i The calculation formula is:
[0072] PL i =subPL 1 i +subPL 2 i ×ω.
[0073] subPL 1 i Fp i Fp n ∈FpS part of the subpath length, subPL 2 i Fp i Not in Fp n∈FpS is the subpath length of the part, w is the weight parameter, w≤1.
[0074] In the present disclosure, the path length PL can also consider the balanced distribution of the flow diagram and avoidance of sharp inflow angle constraints. Assume that the generated flow path set is FpS = {Fp1, Fp2, ..., Fp n , ...}, if the newly generated flow path Fp i Inflow Fp n ∈FpS, the inflow angle is less than the preset threshold condition or the newly generated flow path Fp i Not in Fp n If the length of the sub-path of the ∈FpS part is less than the preset threshold condition, the newly generated flow path Fp i The path length PL i Add the penalty factor PL pen , the calculation formula is:
[0075] PL i =PL i +PL pen .
[0076] Among them, PLpen is a constant, PL pen =50Rs.
[0077] In one embodiment of the present disclosure, the importance of the path is calculated according to the path length. The definition of the importance of the path PM needs to take into account the constraint of the balanced distribution of the graph. Assume that the generated path set FpS = {Fp1, Fp2, ..., Fp n , ...}, given the newly generated flow path Fp i , the newly generated flow path Fp i The subpath is denoted as Fp′ i ∈Fp i , the newly generated flow path Fp i Path Importance PM i :
[0078]
[0079] Among them, Gim is a constant, take G im =50Rs, Rs is the resolution of the grid.
[0080] S103 , based on a preset maze algorithm, iteratively determine the flow path from the end point grid to all the start point grids in the area to be laid out according to the path length and the path importance.
[0081] In one embodiment of the present disclosure, in order to speed up the search efficiency of the maze algorithm, the maze algorithm only searches from the end grid in the direction toward the start grid, and the optional search direction range Pds The calculation formula is as follows:
[0082]
[0083] Among them, Angle AN It indicates the angle of the line connecting the end grid and the start grid rotated clockwise to the horizontal direction. The full set of search directions is 8D = {0, 1, 2, 3, 4, 5, 6, 7}, the west direction is 0, and it is encoded clockwise.
[0084] In the present disclosure, the search direction of the preset maze algorithm has a priority, and the cumulative flow Pf of the k-order neighboring area of the corresponding grid is calculated. Based on the difference Sa of the cumulative flow Pf of the neighboring grids of the corresponding grid, the priority of the search direction of the preset maze algorithm is determined.
[0085]
[0086] Among them, f ij is the grid G ij of traffic.
[0087]
[0088] in, and are two adjacent grids G c and G n Potential cumulative flow, T f is a constant, T f ∈R + .
[0089] In the present disclosure, when determining the path from the end grid to the start grid according to the maze algorithm, the search range may also consider avoiding node and path overlap and path intersection constraints, and the generated path grids and the remaining end grids should be deleted from the current search range.
[0090] In one embodiment of the present disclosure, Figure 1 The one-to-many flow diagram layout method shown also includes: obtaining the path flow of each of the flow paths, and calculating the width of each of the flow paths based on the path flow of each of the flow paths.
[0091]
[0092] Where Wi is the width of the flow path, FV sum is the total flow of the flow diagram data, FV i is the flow rate of the flow path, W max The maximum width of the flow path. The minimum width can be set to 0.2mm based on the visual resolution of the human eye.
[0093] In the present disclosure, an n-order Bezier curve algorithm may be used to render the flow path from coarse to fine.
[0094] See also Figure 2 , Figure 2 : is a schematic diagram of the structure of a one-to-many flow diagram layout device provided by an embodiment of the present disclosure. The device can be built into an electronic device. The device mainly includes:
[0095] Establishing module 210, for modeling the area to be laid out into planar digital elevation model DEM data, the digital elevation model includes a plurality of grids, each of which carries resolution information and grid type information;
[0096] A calculation module 220, configured to calculate a path length and a path importance according to the resolution information and the grid type information;
[0097] The determination module 230 is used to iteratively determine the flow path from the end grid to all the starting grids in the area to be laid out based on a preset maze algorithm according to the path length and the path importance.
[0098] The area to be laid out includes a plurality of mapping data points, and the device further includes:
[0099] A data point acquisition module, used to acquire the first N most adjacent mapping data point pairs among the multiple mapping data points, N>0;
[0100] A calculation module, used for calculating the average distance between the first N nearest pairs of mapping data points in the mapping data point;
[0101] A confirmation module is used to use half of the average distance as the resolution of the grid.
[0102] In one embodiment of the present disclosure, the device also includes: a grid type determination module, which is used to determine the grid type of the grid according to the type of the mapping area where the grid is located. When the grid types of the grids passed by the flow path are different, the distance calculation weight α used to calculate the path length is different.
[0103] In one embodiment of the present disclosure, the path length is calculated according to the resolution information and the grid type information. Assuming that the generated flow path set is FpS={Fp1, Fp2, ..., F pn , ...}, the newly generated flow path Fp i The path length PL i The calculation formula is:
[0104] PL i =subPL 1 i +subPL 2 i ×ω;
[0105] subPL 1 i Fp i Fp n ∈FpS part of the subpath length, subPL 2 i Fp i Not in Fp n ∈FpS is the subpath length of the part, w is the weight parameter, w≤1.
[0106] The lengths of adjacent grids passed by the sub-paths of the flow path are accumulated to calculate the sub-path length of the flow path;
[0107] When the two adjacent grids are adjacent to each other in a straight line, the distance D between the two adjacent grids is cn =0.5Rs×α 1 +0.5Rs×α 2 ;
[0108] When the two adjacent grids are diagonally adjacent, the distance between the two adjacent grids is
[0109] Among them, Rs is the resolution of the grid, α 1 and α 2 Calculate weights for the distances between two adjacent grids separately.
[0110] In one embodiment of the present disclosure, it is assumed that the generated flow path set is FpS={Fp1, Fp2, ..., Fp n , …}, if the newly generated flow path Fp i Inflow Fp n ∈FpS, the inflow angle is less than the preset threshold condition or the newly generated flow path Fp i Not in Fp n If the length of the sub-path of the ∈FpS part is less than the preset threshold condition, the newly generated flow path Fp i The path length PL i Add the penalty factor PL pen .
[0111] In one embodiment of the present disclosure, the path importance is calculated according to the path length. Assuming that a path set FpS={Fp1, Fp2, ..., F pn , …}, given the newly generated flow path Fp i , the newly generated flow path Fp i The subpath is denoted as Fp′ i ∈Fp i, the newly generated flow path Fp i Path Importance PM i :
[0112]
[0113] Among them, Gim is a constant, take G im =50Rs, Rs is the resolution of the adjacent grid.
[0114] In one embodiment of the present disclosure, the preset maze algorithm only searches from the end grid in the direction toward the start grid, and the optional search direction range P ds :
[0115]
[0116] Among them, Angle AN It indicates the angle of the line connecting the end grid and the start grid rotated clockwise to the horizontal direction. The full set of search directions is 8D = {0, 1, 2, 3, 4, 5, 6, 7}, the west direction is 0, and it is encoded clockwise.
[0117] In one embodiment of the present disclosure, the search direction of the preset maze algorithm has a priority, and the device further includes:
[0118] The flow calculation module is used to calculate the cumulative flow Pf of the k-order neighboring area of the corresponding grid. f ij is the grid G ij Traffic volume;
[0119] A priority determination module, used to determine the priority of the search direction of the preset maze algorithm based on the difference Sa of the cumulative flow Pf of the adjacent grids of the corresponding grid;
[0120]
[0121] in, and are two adjacent grids G c and G n Potential cumulative flow, T f is a constant, T f ∈R + .
[0122] In one embodiment of the present disclosure, the device further includes:
[0123] An acquisition module, used for acquiring the path flow of each flow path;
[0124] A width calculation module, used for calculating the width of each flow path based on the path flow of each flow path;
[0125]
[0126] Where Wi is the width of the flow path, FV sum is the total flow of the flow diagram data, FV i is the flow rate of the flow path, W max is the maximum width of the flow path.
[0127] See also Figure 3 , Figure 3 A hardware structure diagram of an electronic device is shown.
[0128] The electronic device described in this embodiment includes:
[0129] The memory 41, the processor 42 and the computer program stored in the memory 41 and executable on the processor, when the processor executes the program, the aforementioned Figure 1 The synchronous control method of the multi-axis motion system is described in the illustrated embodiment.
[0130] Furthermore, the electronic device also includes:
[0131] At least one input device 43 ; at least one output device 44 .
[0132] The memory 41 , processor 42 , input device 43 and output device 44 are connected via a bus 45 .
[0133] The input device 43 may be a camera, a touch panel, a physical button or a mouse, etc. The output device 44 may be a display screen.
[0134] The memory 41 may be a high-speed random access memory (RAM) memory or a non-volatile memory, such as a disk memory. The memory 41 is used to store a set of executable program codes, and the processor 42 is coupled to the memory 41 .
[0135] Furthermore, the present disclosure also provides a computer-readable storage medium, which may be disposed in the electronic device in the above embodiments. Figure 3 The electronic device in the embodiment shown. The computer readable storage medium stores a computer program, which, when executed by the processor, implements the aforementioned Figure 1The one-to-many flow diagram layout method described in the illustrated embodiment. Furthermore, the computer storage medium may also be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other medium that can store program codes.
[0136] It should be noted that the functional modules in the various embodiments of the present disclosure may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0137] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
[0138] It should be noted that, for the convenience of description, the aforementioned method embodiments are described as a series of actions, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0139] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0140] The above is a description of a one-to-many flow diagram layout method, device, electronic device and readable storage medium provided by the present invention. For technicians in this field, according to the ideas of the embodiments of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A one-to-many flow diagram layout method, characterized in that: include: Modeling the area to be laid out into planar digital elevation model (DEM) data, wherein the digital elevation model includes a plurality of grids, each of which carries resolution information and grid type information; Calculating path length and path importance according to the resolution information and the grid type information; Based on a preset maze algorithm, iteratively determine the flow path from the end point grid to all the starting point grids in the area to be laid out according to the path length and the path importance; wherein the path length is calculated according to the resolution information and the grid type information; Assume that the generated flow path set is , the newly generated flow path Fp i The path length PL i The calculation formula is: ; Fp i belongs to The length of the subpath of the part, Fp i Does not belong to The length of the subpath of the part, is the weight parameter, ; The lengths of adjacent grids passed by the sub-paths of the flow path are accumulated to calculate the sub-path length of the flow path; When the two adjacent grids are adjacent to each other in a straight line, the distance between the two adjacent grids is ; When the two adjacent grids are diagonally adjacent, the distance between the two adjacent grids is ); Where Rs is the resolution of the grid, and Calculate the weights for the distances of two adjacent grids respectively; wherein the path importance is calculated according to the path length; Assume that a set of paths has been generated , given the newly generated flow path Fp i , the newly generated flow path Fp i The subpath is recorded as , the newly generated flow path Fp i Path Importance PM i : ; Among them, G im As a constant, take , Rs is the resolution of the adjacent grid; The preset maze algorithm only searches from the end grid in the direction toward the start grid, and the search direction range P is optional. ds : ; Among them, Angle AN Indicates that the line connecting the end grid and the start grid is rotated clockwise to the horizontal angle. The full set of search directions is , the west direction is 0, and the encoding is clockwise.
2. The one-to-many flow diagram layout method according to claim 1, characterized in that: The area to be laid out includes a plurality of mapping data points, and the method further includes: Obtaining the first N nearest pairs of mapping data points from the plurality of mapping data points, where N>0; Calculating the average distance between the first N nearest pairs of mapping data points in the mapping data points; Half of the average distance is taken as the resolution of the grid.
3. The one-to-many flow diagram layout method according to claim 1, characterized in that: The method further comprises: The grid type of the grid is determined by the type of the mapping area where the grid is located. When the grid types of the flow path are different, the distance calculation weight used to calculate the path length is different.
4. The one-to-many flow diagram layout method according to claim 1, characterized in that: in, Assume that the generated flow path set is , if the newly generated flow path Fp i Inflow When the inflow angle is less than the preset threshold condition or the newly generated flow path Fp i Does not belong to If the length of some sub-paths is less than the preset threshold condition, the newly generated flow path Fp i The path length PL i Add the penalty factor PL pen .
5. The one-to-many flow diagram layout method according to claim 1, characterized in that: in, The search direction of the preset maze algorithm has a priority, and the method further includes: Calculate the cumulative flow P of the k-order neighboring area of the corresponding grid f , , f ij is the grid G ij Traffic volume; Based on the cumulative flow P of the neighboring grids of the corresponding grid f The difference Sa determines the priority of the search direction of the preset maze algorithm; in, and are two adjacent grids G c and G n Potential cumulative flow, T f is a constant, .
6. The one-to-many flow diagram layout method according to claim 1, characterized in that: in, The method further comprises: Obtaining the path flow rate of each of the flow paths; calculating a width of each of the flow paths based on a path flow rate of each of the flow paths; ; Where Wi is the width of the flow path, FV sum is the total flow of the flow diagram data, FV i is the flow path flow rate, W max is the maximum width of the flow path.
7. A one-to-many flow diagram layout device, used to implement the one-to-many flow diagram layout method according to any one of claims 1 to 6, characterized in that: include: Establishing a module for modeling the area to be laid out into a planar digital elevation model (DEM) data, wherein the digital elevation model includes a plurality of grids, each of which carries resolution information and grid type information; A calculation module, used for calculating the path length and the path importance according to the resolution information and the grid type information; The determination module is used to determine the flow path from the end point grid to all the starting point grids in the area to be laid out based on a preset maze algorithm according to the path length and the path importance.
Citation Information
Patent Citations
Bus station site selection method and device and computer readable storage medium
CN111738484A
Flow direction map path optimization display method based on road network image
CN112529243A