Method and device for realizing water system visual presentation based on spatial data fusion

The method and device for visualizing water systems through spatial data fusion integrate detection site data with river lines using point and line element fusion, addressing inefficiencies in existing methods and improving data readability and accuracy.

CN119131183APending Publication Date: 2024-12-13YUNLI ZHIHUI TECH CLOUD WISDOM TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411167738.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing methods for visualizing water systems are inefficient, as they fail to establish a correlation between detection sites and river data, and the display is not intuitive, and the configuration process is cumbersome, making it difficult to integrate different types of monitoring data effectively.

Method used

A method and device for visualizing water systems based on spatial data fusion, utilizing point and line element fusion technology and interpolation calculation to integrate detection site data with river lines, allowing for intuitive and flexible data presentation.

Benefits of technology

The method and device enable intuitive and efficient visualization of water systems by integrating detection site data with river lines, reducing manual processing costs and errors while enhancing data readability and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131183A_ABST
    Figure CN119131183A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for realizing water system visual presentation based on spatial data fusion, electronic equipment and a medium, and relates to the technical field of computers. The method comprises the following steps: acquiring point element data in one-to-one correspondence with a plurality of detection sites, and acquiring line element data of a river line; searching the point element data corresponding to each detection site from the line element data for a nearest fitting point; attaching the monitoring data of each detection site to the corresponding fitting point, and selecting one index from the monitoring data as a target index value; matching the target index value corresponding to each fitting point with a preset index value and color corresponding relationship to obtain a target color corresponding to each fitting point; and for any two adjacent fitting points, rendering the river line between the two fitting points on the map by using the target color corresponding to the two fitting points. According to the scheme, the readability of the monitoring data can be improved, and the cost of manual data processing and the possibility of errors are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for realizing water system visualization based on spatial data fusion. Background Art

[0002] With the digital transformation of the government, the use of digital technology for analysis and decision-making in the field of water conservancy has become more and more common. Among them, the use of WEB technology and GIS technology to analyze multiple indicators of rivers based on the monitoring data of water conservancy detection stations is a typical industry application scenario. At present, the traditional common method of presenting river data is mainly: users present the monitoring data of the detection station on the WEB map by marking points or displaying pop-up windows.

[0003] However, the traditional monitoring data presentation method has the following defects: First, it is difficult to establish a correlation between the detection site data and the river data; specifically, the monitoring data of the water conservancy detection site is mostly used for river analysis, but from a topological relationship, the detection sites are generally around the river, and it is difficult to establish a topological relationship between the river and the detection site. The common practice is to split the river line into sections according to administrative divisions or watershed information and then manually establish a connection between the sections and the detection site data. The labor cost of doing so is very high, and there may be errors caused by human operation. Second, the display effect is not intuitive enough; specifically, the data of each detection site can only be displayed separately, and the data changes between sites cannot be reflected; and in most cases of river data, each river is an independent line layer, and the line layer can be simply assigned a single color, but it is impossible to present different effects for monitoring data at different locations. Third, the configuration process for displaying different types of indicator data is cumbersome; specifically, monitoring data is divided into but not limited to water flow, water quality, water depth, pollutant content, etc. according to different business needs. Whether it is displayed through point display or river segment display, only one type of data can be displayed. When switching to other types of data, it is necessary to reconfigure the point or river section with a new data type. This process involves data switching or updating, and the operation process is cumbersome. Therefore, the traditional way of visualizing water systems based on spatial data fusion continues to be improved. Summary of the invention

[0004] The present invention provides a method and device for realizing water system visualization based on spatial data fusion, so as to solve the problems in the prior art that water system visualization based on spatial data fusion is difficult, the display effect is not intuitive and the configuration process is cumbersome, and the method utilizes the point and line element fusion technology and the interpolation calculation method, and flexibly adjusts the business data type to be analyzed in combination with business needs, so as to realize the presentation of river detection indicators in an intuitive and visual manner.

[0005] According to a first aspect of the present invention, the present invention provides a method for realizing water system visualization based on spatial data fusion, the method comprising: Obtaining point feature data corresponding to a plurality of detection sites one by one, and obtaining line feature data of a river line; Find the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; Attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as a target indicator value; Match the target index value corresponding to each fitting point with the preset index value and color correspondence to obtain the target color corresponding to each fitting point; For any two adjacent fitting points, the river line between the two fitting points on the map is rendered using the target colors corresponding to the two fitting points.

[0006] According to the method for realizing water system visualization based on spatial data fusion of the present invention, the step of obtaining point feature data corresponding to a plurality of detection sites and obtaining line feature data of river lines includes: Read the latitude and longitude data corresponding to each detection site on the map in a traversal manner to obtain the point feature data; The longitude and latitude data corresponding to all points constituting each river line on the map are read in a traversal manner to obtain the line element data.

[0007] According to the method for realizing water system visualization based on spatial data fusion of the present invention, searching for the nearest fitting point for the point element data corresponding to each detection site from the line element data includes: Dividing the river line into a plurality of line segments consisting of two adjacent feature points based on the line feature data; Find the line segment with the closest distance to the point feature data corresponding to each detection site from all the line segments; The point closest to the corresponding point feature data is selected from the shortest distance line segment corresponding to each detection site as the fitting point.

[0008] According to the method for realizing water system visualization based on spatial data fusion of the present invention, the point closest to the corresponding point element data on the closest line segment corresponding to each detection station is selected as the fitting point, including: Iterate through all detection sites to perform the following operations on each detection site: Determine the slope of a vertical line perpendicular to the line segment closest to the distance according to the slope of the line segment closest to the distance; Obtaining a vertical line according to the vertical line slope and corresponding point element data; Calculate the foot of the perpendicular line and the line segment with the shortest distance, and determine whether the foot of the perpendicular line belongs to the line segment with the shortest distance; If the foot of the perpendicular belongs to the line segment with the shortest distance, the foot of the perpendicular is used as the fitting point; If the foot of the perpendicular does not belong to the line segment with the shortest distance, the endpoint closest to the foot of the perpendicular among the two endpoints of the line segment with the shortest distance is used as the fitting point.

[0009] According to the method for visualizing water systems based on spatial data fusion of the present invention, before the step of rendering the river line between any two adjacent fitting points on the map using the target colors corresponding to the two fitting points, the method also includes: obtaining a gradient rate configured by the user.

[0010] According to the method for visualizing a water system based on spatial data fusion of the present invention, for any two adjacent fitting points, the river line between the two fitting points on the map is rendered using the target colors corresponding to the two fitting points, including: Iterate through all adjacent snap points to perform the following operations on each pair of adjacent snap points: Divide the line sequence between two fitting points into equal parts according to the gradient rate; Take out the R, G, and B values ​​of the target colors of the two fitting points; The R, G, and B values ​​of the two fitting points are calculated arithmetic progression with the number of items as the gradient rate to obtain the R, G, and B values ​​of the starting point of each line sequence; Based on the R, G, B values ​​of the target color of the two fitting points and the R, G, B values ​​of the starting point of each line sequence, the corresponding position on the map is rendered and colored.

[0011] According to the method for realizing water system visualization based on spatial data fusion of the present invention, after the step of rendering the river line between any two adjacent fitting points on the map using the target colors corresponding to the two fitting points, the method further includes: A configuration legend is generated based on the corresponding relationship between the preset indicator value and the color, and the configuration legend and the gradient rate are added to a map for display.

[0012] According to a second aspect of the present invention, the present invention further provides a device for realizing water system visualization based on spatial data fusion, the device comprising: An acquisition module, used to acquire point feature data corresponding to a plurality of detection sites one by one, and acquire line feature data of a river line; A search module, used for searching the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; A selection module, used for attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as a target indicator value; A matching module is used to match the target index value corresponding to each fitting point with the preset index value and color correspondence to obtain the target color corresponding to each fitting point; The rendering module is used to render the river line between any two adjacent fitting points on the map using the target colors corresponding to the two fitting points.

[0013] According to the third aspect of the present invention, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for visualizing a water system based on spatial data fusion as described in any one of the above is implemented.

[0014] According to a fourth aspect of the present invention, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for visualizing a water system based on spatial data fusion as described in any one of the above.

[0015] The present invention provides a method for visualizing a water system based on spatial data fusion. The method first obtains point feature data of a detection site and line feature data of a river line. Then, for each detection site, the nearest fitting point is found on the river line, thereby fusing the data of the detection site to the river line. Then, a preset indicator value and a color correspondence are used to match a target color for a target indicator of each fitting point. Finally, the river line between two adjacent fitting points on the map is rendered using the target color corresponding to the two adjacent fitting points. This method not only realizes the fusion of point features of a water conservancy detection site and line features of a river, but also can perform spatial difference calculation based on the fused feature data and indicator data, obtain fine-grained river segmentation data and color the data, and finally obtain river line data with business significance, so that the river monitoring data can be visualized on the map, and the discontinuous monitoring data can be displayed in a continuous form. The rendering result can better reflect the river monitoring indicator situation outside the detection site, improve the readability of the monitoring data, and reduce the cost of manual data processing and the possibility of errors.

[0016] In addition, the present invention provides a water system visualization presentation device based on spatial data fusion, an electronic device and a non-transitory computer-readable storage medium, which can also achieve the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of the method for realizing water system visualization based on spatial data fusion provided by the present invention.

[0019] Figure 2 It is a schematic diagram of the process of reading data provided by the present invention.

[0020] Figure 3 It is a schematic diagram of detection sites and river lines presented on the map before rendering provided by the present invention.

[0021] Figure 4 It is a schematic diagram of the process of integrating the detection site and the river line provided by the present invention.

[0022] Figure 5 It is a schematic diagram of the process of determining the target indicator and color provided by the present invention.

[0023] Figure 6 It is a schematic diagram of the process of coloring using difference calculation provided by the present invention.

[0024] Figure 7 It is a flowchart of map presentation provided by the present invention.

[0025] Figure 8 It is a grayscale image of the detection sites and river lines presented on the rendered map provided by the present invention.

[0026] Fig. 9 is with Figure 8 Corresponding color map.

[0027] Fig.10 It is a structural schematic diagram of a device for realizing water system visualization based on spatial data fusion provided by the present invention.

[0028] Fig.11 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] Combine the following Figures 1 to 11 The present invention describes a method for realizing water system visualization based on spatial data fusion, a device for realizing water system visualization based on spatial data fusion, an electronic device and a non-transitory computer-readable storage medium.

[0031] Figure 1 This is a flow chart of a method for realizing water system visualization based on spatial data fusion provided by an embodiment of the present invention. Figure 1 As shown, this embodiment provides a method for visualizing a water system based on spatial data fusion. The method can be implemented through steps S100 to S500. Each step will be described in detail below: Step S100, obtaining point feature data corresponding to a plurality of detection sites one by one, and obtaining line feature data of a river line.

[0032] In this embodiment, the detection site refers to a site for river water quality monitoring. The setting of the river detection site needs to consider the water environment quality status of the basin or region, as well as the characteristics of environmental pollution. Point feature data corresponds to the detection site, and point feature data can characterize the data related to the location of the river detection site. There are many ways to obtain the point feature data of the detection site, including but not limited to reading from environmental monitoring and geographic information systems (GIS), or finding point feature data from a database used to record the location of the detection site through the names of each detection site. Stream Line is a method for describing the representation of a river on a map, which reflects the flow direction and position of the river. The river line is an indispensable part of the map and plays an important role in understanding the terrain, navigation, planning and environmental analysis. With the development of GIS technology, the representation and analysis of river lines have become more sophisticated and dynamic. There are many ways to obtain the line feature data of the river line, such as obtaining the line feature data of the river line through remote sensing technology, GIS analysis and image processing technology.

[0033] Step S200: searching the nearest fitting point for the point feature data corresponding to each detection site from the line feature data.

[0034] In this embodiment, the fitting point corresponds one-to-one to each detection site. The fitting point is a point in the river line feature data, and the distance between the fitting point and the detection site is shortest. There are many ways to determine the fitting point, including but not limited to the vertical distance method, the projection method, using GIS software tools to calculate the distance from the point to the line, and spatial database query.

[0035] Step S300, attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as a target indicator value.

[0036] In this embodiment, the monitoring data of the detection site refers to the data collected at a specific detection site for evaluating various indicators such as river environmental conditions, river pollution levels, and river resource status, which can be used for multiple purposes. The monitoring data includes but is not limited to water quality parameters (such as water temperature, pH value, dissolved oxygen, conductivity, and turbidity), nutrient indicators (such as ammonia nitrogen, permanganate index, total nitrogen, total phosphorus, etc.), river depth, river width, and water flow rate. The target indicator is an indicator selected from all monitored indicators, and the target indicator can be any indicator.

[0037] Step S400, matching the target index value corresponding to each fitting point with the preset index value and color correspondence to obtain the target color corresponding to each fitting point.

[0038] In this embodiment, the preset indicator value and color correspondence refers to a comparison table of each preset indicator value mapped to a color. Different indicator values ​​correspond to different colors. For example, the river depth is given a corresponding color in advance for different river depths. When a certain river depth value is obtained, the corresponding color can be obtained by querying the mapping relationship. It should be noted that the target color corresponds to the fitting point one-to-one. Since the fitting point corresponds to the detection site one-to-one, the target color also corresponds to the detection site one-to-one.

[0039] Step S500: for any two adjacent fitting points, the river line between the two fitting points on the map is rendered using the target colors corresponding to the two fitting points.

[0040] In this embodiment, there are many ways to render the color of the river line between two fitting points, including but not limited to linear gradient, radial gradient, custom curve gradient, etc. In the specific implementation process, when there are many detection sites, there may be many adjacent fitting points. In the specific implementation process, the adjacent fitting points corresponding to each detection site can be rendered along the flow direction of the river line. In addition, since the monitoring data of the detection site changes dynamically, in the specific implementation process, in order to ensure the effect of data presentation, the rendering can be triggered cyclically in a timing manner, or the rendering can be performed according to user-specific instructions.

[0041] The method for visualizing the water system based on spatial data fusion in this embodiment first obtains the point feature data of the detection site and the line feature data of the river line, then finds the nearest fitting point on the river line for each detection site, thereby fusing the data of the detection site to the river line, then uses the preset indicator value and color correspondence to match the corresponding target color for the target indicator of each fitting point, and finally uses the target color corresponding to the two adjacent fitting points to render the river line between two adjacent fitting points on the map, which not only realizes the fusion of the point features of the water conservancy detection site and the line features of the river, but also can perform spatial difference calculation based on the fused feature data and indicator data to obtain fine-grained river segmentation data and color the data, and finally obtains river line data with business significance, so that the river monitoring data can be visualized on the map, and the discontinuous monitoring data can be displayed in a continuous form. The rendering result can better reflect the river monitoring indicator situation outside the detection site, which can improve the readability of the monitoring data and reduce the cost of manual data processing and the possibility of errors.

[0042] In some possible implementations, the aforementioned step S100, obtaining point feature data corresponding to a plurality of detection sites one by one, and obtaining line feature data of a river line, specifically includes: Read the latitude and longitude data corresponding to each detection site on the map in a traversal manner to obtain the point feature data; The longitude and latitude data corresponding to all points constituting each river line on the map are read in a traversal manner to obtain the line element data.

[0043] The method for visualizing the water system based on spatial data fusion in this embodiment reads the exact locations of the detection sites and river lines by traversing all detection sites and river lines, thereby providing accurate data support for the subsequent fusion of monitoring data from the detection sites with the river lines.

[0044] In some possible implementations, the aforementioned step S200, searching for the closest fitting point for the point feature data corresponding to each detection site in the line feature data, specifically includes: Dividing the river line into a plurality of line segments consisting of two adjacent feature points based on the line feature data; Find the line segment with the closest distance to the point feature data corresponding to each detection site from all the line segments; The point closest to the corresponding point feature data is selected from the shortest distance line segment corresponding to each detection site as the fitting point.

[0045] In some possible implementations, selecting the point closest to the corresponding point feature data on the closest line segment corresponding to each detection site as the fitting point includes: Iterate through all detection sites to perform the following operations on each detection site: Determine the slope of a vertical line perpendicular to the line segment closest to the distance according to the slope of the line segment closest to the distance; Obtaining a vertical line according to the vertical line slope and corresponding point element data; Calculate the foot of the perpendicular line and the line segment with the shortest distance, and determine whether the foot of the perpendicular line belongs to the line segment with the shortest distance; If the foot of the perpendicular belongs to the line segment with the shortest distance, the foot of the perpendicular is used as the fitting point; If the foot of the perpendicular does not belong to the line segment with the shortest distance, the endpoint closest to the foot of the perpendicular among the two endpoints of the line segment with the shortest distance is used as the fitting point.

[0046] The method for visualizing the water system based on spatial data fusion in this embodiment is to segment the river line to obtain multiple straight line segments, then find the line segment closest to each detection station, and finally find the best fitting point on the river line for each detection station through a specific vertical line. This method can ensure the accuracy of the fusion of the two and has high precision.

[0047] In some possible implementations, in step S500, before rendering the river line between any two adjacent fit points on the map using the target colors corresponding to the two fit points, the method further includes: obtaining a gradient rate configured by the user.

[0048] In the specific implementation process, the gradient rate can be set by the user according to the needs or the normal range of changes of the indicators. In the specific implementation process, if the expected data presentation method has higher accuracy, the gradient rate can be set relatively larger. On the contrary, if the accuracy requirement is not high, it can be set relatively smaller. Alternatively, if the range of changes in the indicator data is large, the gradient rate can be set relatively larger.

[0049] In some possible implementations, step S500, for any two adjacent fit points, rendering a river line between the two fit points on the map using target colors corresponding to the two fit points, specifically includes: Iterate through all adjacent snap points to perform the following operations on each pair of adjacent snap points: Divide the line sequence between two fitting points into equal parts according to the gradient rate; Take out the R, G, and B values ​​of the target colors of the two fitting points; The R, G, and B values ​​of the two fitting points are calculated arithmetic progression with the number of items as the gradient rate to obtain the R, G, and B values ​​of the starting point of each line sequence; Based on the R, G, B values ​​of the target color of the two fitting points and the R, G, B values ​​of the starting point of each line sequence, the corresponding position on the map is rendered and colored.

[0050] The water system visualization presentation method based on spatial data fusion in this embodiment realizes a smooth transition of colors between two fitting points for all adjacent fitting points by means of difference operation through the R, G, B values ​​corresponding to the two points, so that the rendered map can not only intuitively and accurately display the monitoring data of the detection site, but also better predict the monitoring conditions of other rivers outside the monitoring points. The display method is more intuitive, reliable and has good readability.

[0051] In some possible implementations, in step S500, after rendering the river line between any two adjacent fit points on the map using the target colors corresponding to the two fit points, the method further includes: A configuration legend is generated based on the corresponding relationship between the preset indicator value and the color, and the configuration legend and the gradient rate are added to a map for display.

[0052] The water system visualization presentation method of this embodiment is based on spatial data fusion, and a configuration legend is used to characterize the relationship between the indicator value and the color. By synchronously presenting the configuration legend and the gradient rate on the rendered map, the user can better understand and analyze the monitoring data on the rendered map, and the abstract monitoring data can be converted into intuitive visual information, making the monitoring data easier to understand and analyze, thereby significantly improving the user experience.

[0053] In another embodiment, in order to facilitate understanding of the solution of the present invention, this embodiment provides another method for realizing water system visualization based on spatial data fusion. The implementation principle of this method is: a method for assigning values ​​to surrounding line elements according to point element data on a map and visually displaying them in the form of a color band, providing a configuration and display interface of a B / S framework, utilizing point and line element fusion technology and an interpolation calculation method, and flexibly adjusting the type of business data to be analyzed in combination with business needs. The specific implementation process is as follows: First, read the data of the detection site and river, please refer to Figure 2 As shown, specifically including: Step 101: Read the point element data of the detection site, including the latitude and longitude data of all points. The coordinate system is the WGS84 coordinate system. The detection site contains the detection indicator data to be analyzed. The display effect on the map is as follows: Figure 3 shown.

[0054] Step 102: Read the river line feature data, which includes the line geographic coordinate data of all rivers to be analyzed, and the coordinate system is the WGS84 coordinate system.

[0055] Next, merge the point feature data of the detection station onto the river line. Please refer to Figure 4 As shown in Figure 2, the data fusion process is as follows: Step 201: Segment each river line into multiple straight line segments consisting of two adjacent points.

[0056] Step 202: Calculate the shortest distance from the detection station to each line segment. To avoid the deviation of the calculation result caused by the curvature of the earth, we use a plane coordinate system for calculation. The following is a calculation method for calculating the vertical distance from a point to a line: The equation of the given straight line is , and point The coordinates of the calculated point Shortest distance to a straight line It can be calculated using the following formula: , where A, B, and C are the coefficients of the general form of the equation of a straight line. and They are points Using the above method, calculate the shortest distance from the point to all line segments in turn.

[0057] Step 203: Based on the shortest distance from the point to all line segments obtained in step 203, select the line segment with the shortest distance to the detection site.

[0058] Step 204: Calculate the perpendicular point from the point to the shortest line segment. The calculation method is as follows: (1) Calculate the slope of line AB: ,in and are the coordinates of any two points on the line; (2) Determine the general equation of line AB: First, the slope-intercept formula of line AB is , solve for b through point A or B to get the general formula: ,in, , , (or the corresponding point coordinates); (3) Find the equation of the line passing through point P and perpendicular to AB: The slope of this straight line is (The product of the slopes of vertical lines is -1), so the point-slope form of the line is: ; (4) Solve the two straight line equations to find the coordinates of the foot of the perpendicular N: Solve the general equations of the two lines simultaneously and , since the two lines intersect, we can set the right sides of the two equations to be equal, and then solve the system of equations. However, a more direct way is that since the foot of the perpendicular N not only satisfies the equation of the line AB, but is also on the perpendicular line through point P, we can use the distance formula from the point to the line to solve it indirectly, or directly establish a system of equations based on the relationship between the point and the line to solve it; (5) Solve the equation: Assuming that the simplified equation of the two linear equations has been obtained, first solve = the solved x-coordinate, and then substitute it into any straight line equation to obtain .

[0059] Step 205: Determine whether the vertical point (also called the foot of the perpendicular) is on the shortest line segment.

[0060] Step 206: If it is on the shortest line segment, the vertical point is used as the fitting point from the detection station to the river, and the coordinates of the fitting point are recorded.

[0061] Step 207: If it is not on the shortest line segment, take the endpoint of the shortest line segment closest to the vertical point as the fitting point, and record the coordinates of the fitting point.

[0062] Step 208: Attach the attribute data of the detection site to the fitting point.

[0063] Next, determine the analysis index and color, please refer to Figure 5 The specific implementation process is as follows: Step 301: Analyze the fused data and select the business indicators to be analyzed.

[0064] Step 302: Configure the legend, set corresponding colors for different ranges of the analysis indicator, and specify the gradient rate N of the legend.

[0065] Next, perform interpolation and coloring. Please refer to Figure 6 The specific implementation process is as follows: Step 401: According to the gradient frequency N, the line sequence between two fitting points is divided into N equal parts.

[0066] Step 402: convert the two fitting analysis index values ​​into corresponding color values ​​according to the legend configuration.

[0067] Step 403: extract the R, G, and B values ​​from the color value.

[0068] Step 404: The R, G, B values ​​of the two fitting points are calculated by arithmetic progression with the number of terms being N, to obtain the R, G, B values ​​of the starting point of each line segment sequence.

[0069] Step 405: sequentially assign R, G, and B values ​​of the starting point of each line segment to each line sequence.

[0070] Step 406: Perform the above difference operation on all two adjacent fitting points in sequence to complete the coloring process of the entire river.

[0071] Finally, the colored map is presented, please refer to Figure 7 As shown, the specific process is as follows: Step 501: Render the data on the map using the coloring data and line sequence data obtained above.

[0072] Step 502: Display the configuration legend on the map. Figure 8 As shown, different colors represent different indicator values. In order to see the effect of monitoring data more intuitively, you can refer to Fig. 9 As shown, let's assume that the rendering result is based on water quality as the target indicator. Green means relatively good water quality, and yellow means relatively poor water quality. Combined with the rendered map, the changes in water quality along the entire river line can be observed intuitively, and areas with poor water quality can be found intuitively and quickly. It should be noted that the above example of water quality is only for the convenience of understanding. In the specific implementation process, other monitoring indicators can also be used to render the map river line.

[0073] The present embodiment implements a method for visualizing a water system based on spatial data fusion, realizes the fusion of point elements of water conservancy detection sites and line elements of rivers, and performs spatial difference calculation based on the fused element data and business data, obtains fine-grained river segmentation data and colors the data, and finally obtains river line data with business significance, which is visualized on a map, so that the detection indicators of the river can be presented on the WEB side in an intuitive and visual manner, helping business personnel to complete monitoring data analysis intuitively, flexibly and efficiently.

[0074] The following is a description of the water system visualization presentation device based on spatial data fusion provided by the present invention. The water system visualization presentation device based on spatial data fusion described below and the water system visualization presentation method based on spatial data fusion described above can be referenced to each other.

[0075] Please refer to Fig.10 As shown, this embodiment provides a device for realizing water system visualization based on spatial data fusion. Specifically, the device includes: an acquisition module 1010, a search module 1020, a selection module 1030, a matching module 1040 and a rendering module 1050. The above modules are described in detail below: An acquisition module 1010 is used to acquire point feature data corresponding to a plurality of detection sites, and acquire line feature data of a river line; A search module 1020, configured to search the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; A selection module 1030 is used to attach the monitoring data of each detection site to the corresponding fitting point, and select an indicator from the monitoring data as a target indicator value; A matching module 1040 is used to match the target index value corresponding to each fitting point with the preset index value and color correspondence to obtain the target color corresponding to each fitting point; The rendering module 1050 is used to render the river line between any two adjacent fitting points on the map using the target colors corresponding to the two fitting points.

[0076] The device for visualizing a water system based on spatial data fusion in this embodiment first obtains point feature data of a detection site and line feature data of a river line, then finds the nearest fitting point on the river line for each detection site, thereby fusing the data of the detection site to the river line, and then uses a preset indicator value and color correspondence to match a corresponding target color for the target indicator of each fitting point, and finally uses the target color corresponding to the two adjacent fitting points to render the river line between two adjacent fitting points on the map, which not only realizes the fusion of point features of a water conservancy detection site and line features of a river, but also can perform spatial difference calculation based on the fused feature data and indicator data, obtain fine-grained river segmentation data and color the data, and finally obtains river line data with business significance, so that the river monitoring data can be visualized on the map, and the discontinuous monitoring data can be displayed in a continuous form. The rendering result can better reflect the river monitoring indicator conditions outside the detection site, which can improve the readability of the monitoring data and reduce the cost of manual data processing and the possibility of errors.

[0077] In some possible implementations, the acquisition module 1010 is further configured to: Read the latitude and longitude data corresponding to each detection site on the map in a traversal manner to obtain the point feature data; The longitude and latitude data corresponding to all points constituting each river line on the map are read in a traversal manner to obtain the line element data.

[0078] In some possible implementations, the search module 1020 is further configured to: Dividing the river line into a plurality of line segments consisting of two adjacent feature points based on the line feature data; Find the line segment with the closest distance to the point feature data corresponding to each detection site from all the line segments; The point closest to the corresponding point feature data is selected from the shortest distance line segment corresponding to each detection site as the fitting point.

[0079] In some possible implementations, selecting the point closest to the corresponding point feature data on the closest line segment corresponding to each detection site as the fitting point includes: Iterate through all detection sites to perform the following operations on each detection site: Determine the slope of a vertical line perpendicular to the line segment closest to the distance according to the slope of the line segment closest to the distance; Obtaining a vertical line according to the vertical line slope and corresponding point element data; Calculate the foot of the perpendicular line and the line segment with the shortest distance, and determine whether the foot of the perpendicular line belongs to the line segment with the shortest distance; If the foot of the perpendicular belongs to the line segment with the shortest distance, the foot of the perpendicular is used as the fitting point; If the foot of the perpendicular does not belong to the line segment with the shortest distance, the endpoint closest to the foot of the perpendicular among the two endpoints of the line segment with the shortest distance is used as the fitting point.

[0080] In some possible implementations, the device further includes a configuration acquisition module, and the configuration acquisition module is used to: acquire a gradient rate configured by a user.

[0081] In some possible implementations, the rendering module 1050 is further configured to: Iterate through all adjacent snap points to perform the following operations on each pair of adjacent snap points: Divide the line sequence between two fitting points into equal parts according to the gradient rate; Take out the R, G, and B values ​​of the target colors of the two fitting points; The R, G, and B values ​​of the two fitting points are calculated arithmetic progression with the number of items as the gradient rate to obtain the R, G, and B values ​​of the starting point of each line sequence; Based on the R, G, B values ​​of the target color of the two fitting points and the R, G, B values ​​of the starting point of each line sequence, the corresponding position on the map is rendered and colored.

[0082] In some possible implementations, the device further includes a display module, which is used to generate a configuration legend based on the corresponding relationship between the preset indicator value and the color, and add the configuration legend and the gradient rate to a map for display.

[0083] It should be noted that each module in the above-mentioned device for realizing water system visualization based on spatial data fusion can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0084] Fig.11 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.11 As shown, the electronic device may include: a processor 1111, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1111, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. The processor 1111 may call the logic instructions in the memory 1130 to execute a method for realizing water system visualization based on spatial data fusion, the method comprising: obtaining point feature data corresponding to a plurality of detection sites one by one, and obtaining line feature data of a river line; searching for the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as a target indicator value; matching the target indicator value corresponding to each fitting point with the preset indicator value and color correspondence relationship to obtain the target color corresponding to each fitting point; for any two adjacent fitting points, rendering the river line between the two fitting points on the map using the target color corresponding to the two fitting points.

[0085] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0086] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the water system visualization presentation method based on spatial data fusion provided by the above methods, the method including: obtaining point feature data corresponding to multiple detection sites one by one, and obtaining line feature data of river lines; searching for the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as the target indicator value; matching the target indicator value corresponding to each fitting point with the preset indicator value and color correspondence to obtain the target color corresponding to each fitting point; for any two adjacent fitting points, rendering the river line between the two fitting points on the map using the target color corresponding to the two fitting points.

[0087] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the water system visualization presentation method based on spatial data fusion provided by the above-mentioned methods, the method comprising: obtaining point feature data corresponding one-to-one to multiple detection sites, and obtaining line feature data of river lines; searching for the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as the target indicator value; matching the target indicator value corresponding to each fitting point with the preset indicator value and color correspondence to obtain the target color corresponding to each fitting point; for any two adjacent fitting points, rendering the river line between the two fitting points on the map using the target color corresponding to the two fitting points.

[0088] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for visualizing a water system based on spatial data fusion, characterized in that: The method comprises: Obtaining point feature data corresponding to a plurality of detection sites one by one, and obtaining line feature data of a river line; Find the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; Attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as a target indicator value; Match the target index value corresponding to each fitting point with the preset index value and color correspondence to obtain the target color corresponding to each fitting point; For any two adjacent fitting points, the river line between the two fitting points on the map is rendered using the target colors corresponding to the two fitting points.

2. The method for realizing water system visualization based on spatial data fusion according to claim 1 is characterized in that: The step of obtaining point feature data corresponding to a plurality of detection sites one by one, and obtaining line feature data of a river line, comprises: Read the latitude and longitude data corresponding to each detection site on the map in a traversal manner to obtain the point feature data; The longitude and latitude data corresponding to all points constituting each river line on the map are read in a traversal manner to obtain the line element data.

3. The method for realizing water system visualization based on spatial data fusion according to claim 1 is characterized in that: The step of searching the nearest fitting point for the point feature data corresponding to each detection site from the line feature data comprises: Dividing the river line into a plurality of line segments consisting of two adjacent feature points based on the line feature data; Find the line segment with the closest distance to the point feature data corresponding to each detection site from all the line segments; The point closest to the corresponding point feature data is selected from the shortest distance line segment corresponding to each detection site as the fitting point.

4. The method for realizing water system visualization based on spatial data fusion according to claim 3 is characterized in that: The step of selecting the point closest to the corresponding point feature data from the closest line segment corresponding to each detection site as the fitting point includes: Iterate through all detection sites to perform the following operations on each detection site: Determine the slope of a vertical line perpendicular to the line segment closest to the distance according to the slope of the line segment closest to the distance; Obtaining a vertical line according to the vertical line slope and corresponding point element data; Calculate the foot of the perpendicular line and the line segment with the shortest distance, and determine whether the foot of the perpendicular line belongs to the line segment with the shortest distance; If the foot of the perpendicular belongs to the line segment with the shortest distance, the foot of the perpendicular is used as the fitting point; If the foot of the perpendicular does not belong to the line segment with the shortest distance, the endpoint closest to the foot of the perpendicular among the two endpoints of the line segment with the shortest distance is used as the fitting point.

5. The method for realizing water system visualization based on spatial data fusion according to claim 1 is characterized in that: Before the step of rendering the river line between any two adjacent fit points on the map using the target colors corresponding to the two fit points, the method further includes: obtaining a gradient rate configured by the user.

6. The method for realizing water system visualization based on spatial data fusion according to claim 5 is characterized in that: The method of rendering a river line between any two adjacent fitting points on the map using target colors corresponding to the two fitting points includes: Iterate through all adjacent snap points to perform the following operations on each pair of adjacent snap points: Divide the line sequence between two fitting points into equal parts according to the gradient rate; Take out the R, G, and B values ​​of the target colors of the two fitting points; The R, G, and B values ​​of the two fitting points are calculated arithmetic progression with the number of items as the gradient rate to obtain the R, G, and B values ​​of the starting point of each line sequence; Based on the R, G, B values ​​of the target color of the two fitting points and the R, G, B values ​​of the starting point of each line sequence, the corresponding position on the map is rendered and colored.

7. The method for realizing water system visualization based on spatial data fusion according to claim 6 is characterized in that: After the step of rendering the river line between any two adjacent fitting points on the map using the target colors corresponding to the two fitting points, the method further includes: A configuration legend is generated based on the corresponding relationship between the preset indicator value and the color, and the configuration legend and the gradient rate are added to a map for display.

8. A device for visualizing a water system based on spatial data fusion, characterized in that: The device comprises: An acquisition module, used to acquire point feature data corresponding to a plurality of detection sites one by one, and acquire line feature data of a river line; A search module, used for searching the nearest fitting point for the point feature data corresponding to each detection site from the line feature data; A selection module, used for attaching the monitoring data of each detection site to the corresponding fitting point, and selecting an indicator from the monitoring data as a target indicator value; A matching module is used to match the target index value corresponding to each fitting point with the preset index value and color correspondence to obtain the target color corresponding to each fitting point; The rendering module is used to render the river line between any two adjacent fitting points on the map using the target colors corresponding to the two fitting points.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for visualizing a water system based on spatial data fusion as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for visualizing a water system based on spatial data fusion as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for realizing river water quality dynamic distribution based on GIS technology

    CN110967461A

  • River water quality visualization method and device, a storage medium and terminal equipment

    CN113554731A

  • River water quality rendering method and device, computer equipment and storage medium

    CN118247365A

  • Visual remote monitoring method for aquatic organism isolation field and related device

    CN118247406A

  • Image rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product

    US20240005588A1