A three-dimensional dynamic visualization method, system and device for urban waterlogging
By converting SWMM model data into grayscale images and mapping them to water depth thermal texture maps, and combining this with a 3D Earth engine to draw waterlogged areas, the problem of the high level of specialization of SWMM models is solved, realizing 3D dynamic visualization of urban waterlogging and supporting urban flood control.
Patent Information
- Application Number
- CN202410628245.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-05-21
AI Technical Summary
SWMM models are highly specialized, requiring users to possess professional knowledge. Furthermore, they cannot intuitively display the water accumulation simulation process and results, making it difficult to quickly, accurately, and comprehensively grasp the urban water accumulation situation.
The water accumulation data generated by the SWMM model is collected, converted into a canvas coordinate system and normalized to generate a grayscale image. Color mapping is performed by combining the preset water depth color palette. The water depth thermal texture map of the water accumulation area is drawn using a 3D earth engine to realize the 3D dynamic visualization of urban water accumulation.
It enables rapid and dynamic visualization of SWMM model data on the web, allowing users to intuitively view the extent and depth of water accumulation at different times, thus supporting the management of urban flooding issues.
Smart Images

Figure CN118447178B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban waterlogging treatment, and in particular to a three-dimensional dynamic visualization method, system and device for urban waterlogging. Background Art
[0002] The SWMM model is a hydrological and hydraulic simulation software mainly used in urban areas. It reflects the occurrence and development process of urban waterlogging in the form of quantitative data. Its calculation results include urban waterlogging data, which includes waterlogging evolution time, waterlogging grid and waterlogging depth.
[0003] However, the SWMM model is highly professional and requires users to have certain professional knowledge in order to correctly understand and use it. In addition, the SWMM model cannot intuitively display the simulation process and results, which is not conducive to quickly, accurately and comprehensively understanding the urban waterlogging situation. Summary of the invention
[0004] The purpose of the present invention is to provide a three-dimensional dynamic visualization method, system and device for urban waterlogging to solve at least one of the above-mentioned technical problems existing in the prior art.
[0005] In a first aspect, in order to solve the above technical problems, the present invention provides a three-dimensional dynamic visualization method of urban waterlogging, comprising the following steps:
[0006] Step 1: Collect the waterlogging result data of the measured city generated by the SWMM model; the waterlogging result data includes waterlogging grid, waterlogging depth and waterlogging surface geometry data.
[0007] In a feasible implementation, the size of the water accumulation grid may be 0.5*0.5 meters, 2*2 meters, etc. The smaller the size of the water accumulation grid is, the more delicate the subsequent visualization effect is.
[0008] Step 2: According to the time sequence of waterlogging evolution in the waterlogging result data, the waterlogging result data at different times are stored in a time-sharing manner, thereby realizing independent storage and management of the waterlogging result data at different times.
[0009] Step 3: read the water accumulation data at different times in sequence, and convert the geographic coordinate system of the water accumulation grid into the canvas coordinate system; normalize the water accumulation depth corresponding to all water accumulation grids at that moment to obtain normalized data; and convert the normalized data into a grayscale image based on the canvas coordinate system.
[0010] In a feasible implementation manner, the step 3 includes:
[0011] Step 31, read the waterlogging data at different times in sequence, and convert the geographic coordinate system of the waterlogging grid into the canvas coordinate system through the coordinate conversion formula. The specific formula can be:
[0012] X = (waterLat - minLat) / gridxUnit;
[0013] Y = (maxLon - waterLon) / gridyUnit;
[0014] Among them, X represents the X-axis coordinate value of the waterlogging grid in the canvas coordinate system; Y represents the Y-axis coordinate value of the waterlogging grid in the canvas coordinate system; waterLat represents the latitude data of the waterlogging grid; waterLon represents the longitude data of the waterlogging grid; minLat represents the minimum latitude value within the measured city; maxLon represents the maximum longitude value within the measured city; gridxUnit represents the length value of a single waterlogging grid; gridyUnit represents the width value of a single waterlogging grid;
[0015] Step 32: normalize the water depth corresponding to each waterlogging grid at that moment through a normalization formula to obtain normalized data. The specific normalization formula may be:
[0016] deep_normalized
[0017] =(X-minWaterDeep) / (maxWaterDeep-minWaterDeep);
[0018] Among them, deep_normalized represents the normalized water depth value; X represents the water depth value before normalization; maxWaterDeep represents the maximum value in the current water depth data; minWaterDeep represents the minimum value in the current water depth data;
[0019] Step 33, define the grayscale color Gray (R, G, B) calculation formula to calculate the grayscale color of each waterlogged grid. The specific formula can be:
[0020] R=deep_normalized*255;
[0021] G=deep_normalized*255;
[0022] B=deep_normalized*255;
[0023] Create a blank bitmap in ARGB format based on the canvas coordinate system;
[0024] According to the coordinate values (X, Y) of each waterlogged grid in the canvas coordinate system and the preset ellipse radius, an ellipse path graphic is created in a blank bitmap, wherein the ellipse path graphic includes the center point coordinates and the enclosing primitives;
[0025] Furthermore, the coordinates of the center point of the elliptical path figure are defined as: (X-radius, Y-radius), and the width and height of the enclosing primitive of the elliptical path figure are defined as: radius; the width and height of the enclosing primitive correspond to the long radius value and the short radius value of the elliptical path figure respectively; in the initial state where the impact range of the accumulated water is unclear, the enclosing primitive obtained by setting the elliptical path figure to a circular path figure is more convenient for subsequent data calculation and processing, and the width and height of the enclosing primitive can be adjusted according to actual conditions later.
[0026] The grayscale color corresponding to each waterlogged grid is filled into the corresponding elliptical path graphic, and then the elliptical path graphic is filled into the blank bitmap according to the corresponding center point coordinates to obtain a grayscale image.
[0027] Step 4: Based on the preset water dark color band palette data, color mapping processing is performed according to the grayscale image to obtain a water depth thermal texture map of the waterlogged area of the measured city.
[0028] In a feasible implementation manner, the specific steps of the color mapping process include:
[0029] Step 41, sequentially read the ARGB value of each pixel in the preset water dark color band image, and store it in the palette, thereby completing the loading of the preset water dark color band palette data;
[0030] Step 42, starting from the origin in the upper left corner of the grayscale image, traverse and obtain each pixel in the order of pixels from left to right and from top to bottom, invert the alpha channel value (high 8 bits) of each pixel, and use the result as an index; based on the index, retrieve the corresponding color from the palette and color the pixel points with the same pixel order in the measured city bitmap.
[0031] In a feasible implementation, the preset water dark color band image refers to a gradient color image with a length of 256 pixels and a width of 1 pixel, and the ARGB value of each pixel is read according to the pixel order in the length direction and stored in the palette.
[0032] In a feasible implementation manner, the formula for the negation operation can be expressed as:
[0033] 255-current grayscale value, that is, 255 minus the current grayscale value;
[0034] Since the pixel value range of the grayscale image is 0-255, 0 represents white and 255 represents black, the greater the depth of the water, the darker the color and the larger the grayscale value; the length of the preset water dark band image is 256 pixels, and the index value 0-255 in the palette corresponds to the stored color, which represents the color value of the water from deep to shallow, so the alpha channel of the grayscale image must be inverted to get the correct color value.
[0035] Step 5. In a three-dimensional earth engine, such as Cesium, iteratively read the waterlogging surface geometry data and the water depth thermal texture map of the waterlogging area of the measured city in step 4 according to the time sequence of waterlogging evolution, and draw the waterlogging surface geometry data into the measured city scene of the three-dimensional earth engine through a three-dimensional drawing protocol, such as WebGL, and paste the water depth thermal texture map of the waterlogging area corresponding to the waterlogging surface geometry data into the corresponding position of the scene to obtain a visualized image of the waterlogging area of the measured city, thereby achieving a three-dimensional visualization rendering effect of the waterlogging area of the measured city.
[0036] In the second aspect, based on the same inventive concept, the present application also provides a three-dimensional dynamic visualization system for urban waterlogging, including a data acquisition module, a data processing module and a result generation module arranged in sequence;
[0037] The data acquisition module is used to collect waterlogging result data of the measured city generated by the SWMM model; the waterlogging result data includes waterlogging grid, waterlogging depth and waterlogging surface geometry data;
[0038] The data processing module includes a preprocessing unit, a grayscale image unit, a texture image unit and a visualization unit;
[0039] The preprocessing unit sequentially stores the waterlogging result data at different times in a time-division manner according to the waterlogging evolution time sequence in the waterlogging result data;
[0040] The grayscale image unit sequentially reads the water accumulation data at different times, converts the coordinate system of the water accumulation grid into the canvas coordinate system; normalizes the water accumulation depths corresponding to all the water accumulation grids at the time to obtain normalized data; and converts the normalized data into a grayscale image based on the canvas coordinate system;
[0041] The texture map unit performs color mapping processing according to the grayscale image based on the preset water dark color band palette data to obtain a water depth thermal texture map of the waterlogged area of the measured city;
[0042] The visualization unit, in a three-dimensional earth engine, iteratively reads the geometric data of the water accumulation surface and the water depth thermal texture map of the water accumulation area of the measured city according to the time sequence of the water accumulation evolution, draws the geometric data of the water accumulation surface into the measured city scene of the three-dimensional earth engine through a three-dimensional drawing protocol, and pastes the water depth thermal texture map of the water accumulation area corresponding to the geometric data of the water accumulation surface into the corresponding position of the scene, so as to obtain a visualization image of the water accumulation area of the measured city;
[0043] The result generation module is used to send the visualization image externally.
[0044] On the third aspect, based on the same inventive concept, the present application also provides a three-dimensional dynamic visualization device for urban waterlogging, including a processor, a memory and a bus, wherein the memory stores instructions and data readable by the processor, and the processor is used to call the instructions and data in the memory to execute the three-dimensional dynamic visualization method for urban waterlogging as described above, and the bus connects the functional components for transmitting information.
[0045] By adopting the above technical solution, the present invention has the following beneficial effects:
[0046] The present invention provides a three-dimensional dynamic visualization method, system and device for urban waterlogging, which utilize GIS technology to couple SWMM model data, generate a water depth thermal texture map of the waterlogged area by converting and processing the SWMM model data, and render the water depth thermal texture map of the waterlogged area into the three-dimensional urban scene based on the three-dimensional earth engine using a three-dimensional drawing protocol, thereby realizing rapid dynamic visualization expression of SWMM model data on the web side, and being able to intuitively view the scope of the urban waterlogged area at different precipitation stages, the water depth of the waterlogged area and the urban features affected by the waterlogging, etc., thereby providing effective and reliable technical support for urban waterlogging control measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A flow chart of a three-dimensional dynamic visualization method of urban waterlogging provided by an embodiment of the present invention;
[0049] Figure 2 for Figure 1 Specific flow chart of step 3 in ;
[0050] Figure 3A grayscale legend diagram provided for an embodiment of the present invention;
[0051] Figure 4 A color example of a water depth thermal texture map of a waterlogged area provided in an embodiment of the present invention;
[0052] Figure 5 for Figure 1 Specific flow chart of step 4 in ;
[0053] Figure 6 A color example of a preset water dark color band image provided by an embodiment of the present invention;
[0054] Figure 7 A color example of a visualization image provided by an embodiment of the present invention;
[0055] Figure 8 An enlarged view of a color example of a visualization image provided by an embodiment of the present invention;
[0056] Fig. 9 A three-dimensional dynamic visualization system diagram of urban waterlogging provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. 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.
[0058] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0059] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0060] The present invention is further explained below in conjunction with specific implementation modes.
[0061] It should also be noted that the following specific embodiments or specific implementations are a series of optimized settings listed in the present invention to further explain the specific content of the invention, and these settings can be used in combination or in association with each other.
[0062] Embodiment 1:
[0063] like Figure 1 As shown, this embodiment provides a three-dimensional dynamic visualization method of urban waterlogging, comprising the following steps:
[0064] Step 1: Collect the waterlogging result data of the measured city generated by the SWMM model; the waterlogging result data includes waterlogging grid, waterlogging depth and waterlogging surface geometry data.
[0065] Furthermore, the size of the water accumulation grid may be 0.5*0.5 meters or 2*2 meters. The smaller the size of the water accumulation grid is, the more delicate the subsequent visualization effect is.
[0066] Step 2: According to the time sequence of waterlogging evolution in the waterlogging result data, the waterlogging result data at different times are stored in a time-sharing manner, thereby realizing independent storage and management of the waterlogging result data at different times.
[0067] Step 3: read the water accumulation data at different times in sequence, and convert the geographic coordinate system of the water accumulation grid into the canvas coordinate system; normalize the water accumulation depth corresponding to all water accumulation grids at that moment to obtain normalized data; and convert the normalized data into a grayscale image based on the canvas coordinate system.
[0068] Furthermore, if Figure 2 As shown, the step 3 includes:
[0069] Step 31, read the waterlogging data at different times in sequence, and convert the geographic coordinate system of the waterlogging grid into the canvas coordinate system through the coordinate conversion formula. The specific formula can be:
[0070] X = (waterLat - minLat) / gridxUnit;
[0071] Y = (maxLon - waterLon) / gridyUnit;
[0072] Among them, X represents the X-axis coordinate value of the waterlogging grid in the canvas coordinate system; Y represents the Y-axis coordinate value of the waterlogging grid in the canvas coordinate system; waterLat represents the latitude data of the waterlogging grid; waterLon represents the longitude data of the waterlogging grid; minLat represents the minimum latitude value within the measured city; maxLon represents the maximum longitude value within the measured city; gridxUnit represents the length value of a single waterlogging grid; gridyUnit represents the width value of a single waterlogging grid;
[0073] Step 32: normalize the water depth corresponding to each waterlogging grid at that moment through a normalization formula to obtain normalized data. The specific normalization formula may be:
[0074] deep_normalized
[0075] =(X-minWaterDeep) / (maxWaterDeep-minWaterDeep);
[0076] Among them, deep_normalized represents the normalized water depth value; X represents the water depth value before normalization; maxWaterDeep represents the maximum value in the current water depth data; minWaterDeep represents the minimum value in the current water depth data;
[0077] Step 33, define the grayscale color Gray (R, G, B) calculation formula to calculate the grayscale color of each waterlogged grid. The specific formula can be:
[0078] R=deep_normalized*255;
[0079] G=deep_normalized*255;
[0080] B=deep_normalized*255;
[0081] Create a blank bitmap in ARGB format based on the canvas coordinate system;
[0082] According to the coordinate values (X, Y) of each waterlogged grid in the canvas coordinate system and the preset ellipse radius radius, an ellipse path graphic is created in a blank bitmap, the center point coordinates of the ellipse path graphic are defined as: (X-radius, Y-radius), and the width and height of the enclosing primitive of the ellipse path graphic are defined as: radius; the width and height of the enclosing primitive correspond to the long radius value and the short radius value of the ellipse path graphic respectively; in the initial state where the impact range of waterlogging is unclear, the enclosing primitive obtained by setting the ellipse path graphic to a circular path graphic is more convenient for subsequent data calculation and processing, and the width and height of the enclosing primitive can be adjusted according to actual conditions later;
[0083] Fill the grayscale color corresponding to each waterlogged grid into the corresponding elliptical path graphic, and then fill the elliptical path graphic into the blank bitmap according to the corresponding center point coordinates to obtain a grayscale image, such as Figure 3 shown.
[0084] Step 4: Based on the preset water depth color palette data, color mapping is performed according to the grayscale image to obtain a water depth thermal texture map of the waterlogged area of the measured city, such as Figure 4 shown.
[0085] Furthermore, if Figure 5 As shown, the specific steps of the color mapping process include:
[0086] Step 41, sequentially read the ARGB value of each pixel in the preset water dark color band image, and store it in the palette, thereby completing the loading of the preset water dark color band palette data;
[0087] Step 42, starting from the origin in the upper left corner of the grayscale image, traverse and obtain each pixel in the grayscale image in pixel order from left to right and from top to bottom, invert the Alpha channel value (upper 8 bits) of each pixel, and use the obtained result as an index; based on the index, retrieve the corresponding color from the palette and color the pixel points with the same pixel order in the measured city bitmap.
[0088] Furthermore, the preset water dark color band image refers to a gradient color image with a length of 256 pixels and a width of 1 pixel, such as Figure 6 As shown, the ARGB value of each pixel is read from 1 to 256 according to the pixel order in the length direction and stored in the palette.
[0089] Furthermore, the formula for the negation operation can be expressed as:
[0090] 255-current grayscale value;
[0091] Since the pixel value range of the grayscale image is 0-255, 0 represents white and 255 represents black, the greater the depth of the water, the darker the color and the larger the grayscale value; the length of the preset water dark band image is 256 pixels, and the index value 0-255 in the palette corresponds to the stored color, which represents the color value of the water from deep to shallow, so the alpha channel of the grayscale image must be inverted to get the correct color value.
[0092] Step 5. In the Cesium 3D Earth Engine, the geometric data of the waterlogging surface and the water depth thermal texture map of the waterlogging area of the measured city in step 4 are iteratively read according to the time sequence of the waterlogging evolution. The geometric data of the waterlogging surface are drawn into the measured city scene of the 3D Earth Engine through the WebGL 3D drawing protocol, and the water depth thermal texture map of the waterlogging area corresponding to the geometric data of the waterlogging surface is pasted to the corresponding position of the scene to obtain a visualized image of the waterlogging area of the measured city, thereby realizing a 3D visualized rendering effect of the waterlogging area of the measured city, such as Figure 7-8 shown.
[0093] Embodiment 2:
[0094] like Fig. 9 As shown, this embodiment provides a three-dimensional dynamic visualization system for urban waterlogging, including a data acquisition module, a data processing module and a result generation module arranged in sequence;
[0095] The data acquisition module is used to collect waterlogging result data of the measured city generated by the SWMM model; the waterlogging result data includes waterlogging grid, waterlogging depth and waterlogging surface geometry data;
[0096] The data processing module includes a preprocessing unit, a grayscale image unit, a texture image unit and a visualization unit;
[0097] The preprocessing unit sequentially stores the waterlogging result data at different times in a time-division manner according to the waterlogging evolution time sequence in the waterlogging result data;
[0098] The grayscale image unit sequentially reads the water accumulation data at different times, converts the coordinate system of the water accumulation grid into the canvas coordinate system; normalizes the water accumulation depths corresponding to all the water accumulation grids at the time to obtain normalized data; and converts the normalized data into a grayscale image based on the canvas coordinate system;
[0099] The texture map unit performs color mapping processing according to the grayscale image based on the preset water dark color band palette data to obtain a water depth thermal texture map of the waterlogged area of the measured city;
[0100] The visualization unit, in a three-dimensional earth engine, iteratively reads the geometric data of the water accumulation surface and the water depth thermal texture map of the water accumulation area of the measured city according to the time sequence of the water accumulation evolution, draws the geometric data of the water accumulation surface into the measured city scene of the three-dimensional earth engine through a three-dimensional drawing protocol, and pastes the water depth thermal texture map of the water accumulation area corresponding to the geometric data of the water accumulation surface into the corresponding position of the scene, so as to obtain a visualization image of the water accumulation area of the measured city;
[0101] The result generation module is used to send the visualization image externally.
[0102] Embodiment three:
[0103] The present embodiment provides a three-dimensional dynamic visualization device for urban waterlogging, including a processor, a memory and a bus. The memory stores instructions and data that can be read by the processor. The processor is used to call the instructions and data in the memory to execute the three-dimensional dynamic visualization method for urban waterlogging as described above. The bus connects the functional components to transmit information.
[0104] In another embodiment, the present solution can be implemented by a device, which may include a corresponding module for performing each or several steps in the above-mentioned embodiments. The module may be one or more hardware modules specially configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.
[0105] The processor performs the various methods and processes described above. For example, the method implementation in the present solution can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be executed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods by any other appropriate means (for example, by means of firmware).
[0106] The device can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus connects various circuits including one or more processors, memories, and / or hardware modules together. The bus can also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0107] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0108] 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 replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional dynamic visualization method for urban waterlogging, characterized in that: include: Step 1, collecting waterlogging result data of the measured city generated by the SWMM model; the waterlogging result data includes waterlogging grid, waterlogging depth and waterlogging surface geometry data; Step 2, according to the waterlogging evolution time sequence in the waterlogging result data, the waterlogging result data at different times are sequentially stored in time-sharing manner; Step 3: read the waterlogging data at different times in sequence, convert the geographic coordinate system of the waterlogging grid into the canvas coordinate system; normalize the waterlogging depths corresponding to all the waterlogging grids at that time to obtain normalized data; Based on the canvas coordinate system, convert the normalized data into a grayscale image; Step 4: Based on the preset water depth color palette data, color mapping is performed according to the grayscale image to obtain a water depth thermal texture map of the waterlogged area of the measured city; the specific steps of the color mapping process include: Step 41, sequentially read the ARGB value of each pixel in the preset water dark color band image and store it in the palette; Step 42, starting from the origin in the upper left corner of the grayscale image, traverse and obtain each pixel in the order of pixels from left to right and from top to bottom, perform an inversion operation on the alpha channel value of each pixel, and use the obtained result as an index; based on the index, call the corresponding color from the palette, and color the pixel points with the same pixel order in the tested city bitmap; Step 5. In the three-dimensional earth engine, the water accumulation surface geometry data and the water depth thermal texture map of the water accumulation area of the measured city in step 4 are iteratively read according to the time sequence of water accumulation evolution. Through the three-dimensional drawing protocol, the water accumulation surface geometry data are drawn into the measured city scene of the three-dimensional earth engine, and the water depth thermal texture map of the water accumulation area corresponding to the water accumulation surface geometry data is pasted to the corresponding position of the scene to obtain a visualized image of the water accumulation area of the measured city.
2. The method according to claim 1, characterized in that The size of the water accumulation grid is 0.5*0.5 meters or 2*2 meters.
3. The method according to claim 1, characterized in that The step 3 comprises: Step 31, read the water accumulation data at different times in sequence, and convert the geographic coordinate system of the water accumulation grid into the canvas coordinate system through the coordinate conversion formula. The specific formula is: X = (waterLat - minLat) / gridxUnit; Y = (maxLon - waterLon) / gridyUnit; Among them, X represents the X-axis coordinate value of the waterlogging grid in the canvas coordinate system; Y represents the Y-axis coordinate value of the waterlogging grid in the canvas coordinate system; waterLat represents the latitude data of the waterlogging grid; waterLon represents the longitude data of the waterlogging grid; minLat represents the minimum latitude value within the measured city; maxLon represents the maximum longitude value within the measured city; gridxUnit represents the length value of a single waterlogging grid; gridyUnit represents the width value of a single waterlogging grid; Step 32: normalize the water depth corresponding to each waterlogging grid at this moment through a normalization formula to obtain normalized data. The specific normalization formula is: deep_normalized =(X-minWaterDeep) / (maxWaterDeep-minWaterDeep); Among them, deep_normalized represents the normalized water depth value; X represents the water depth value before normalization; maxWaterDeep represents the maximum value in the current water depth data; minWaterDeep represents the minimum value in the current water depth data; Step 33, define the grayscale color Gray (R, G, B) calculation formula, calculate the grayscale color of each waterlogged grid, the specific formula is: R=deep_normalized*255; G=deep_normalized*255; B=deep_normalized*255; Create a blank bitmap in ARGB format based on the canvas coordinate system; According to the coordinate values (X, Y) of each waterlogged grid in the canvas coordinate system and the preset ellipse radius, an ellipse path graphic is created in a blank bitmap, wherein the ellipse path graphic includes the center point coordinates and the enclosing primitives; The grayscale color corresponding to each waterlogged grid is filled into the corresponding elliptical path graphic, and then the elliptical path graphic is filled into the blank bitmap according to the corresponding center point coordinates to obtain a grayscale image.
4. The method according to claim 3, characterized in that The coordinates of the center point of the elliptical path graphic are defined as: (X-radius, Y-radius), and the width and height of the enclosing primitive of the elliptical path graphic are defined as: radius.
5. The method according to claim 1, characterized in that The preset water dark color band image in step 41 refers to a gradient color image with a length of 256 pixels and a width of 1 pixel, and the ARGB value of each pixel is read according to the pixel order in the length direction and stored in the palette.
6. The method according to claim 5, characterized in that The formula for the negation operation is expressed as: 255 - Current grayscale value.
7. The method according to claim 1, characterized in that The three-dimensional earth engine is Cesium; the three-dimensional drawing protocol is WebGL.
8. A three-dimensional dynamic visualization system for urban waterlogging, characterized in that: It includes a data acquisition module, a data processing module and a result generation module which are arranged in sequence; The data acquisition module is used to collect waterlogging result data of the measured city generated by the SWMM model; the waterlogging result data includes waterlogging grid, waterlogging depth and waterlogging surface geometry data; The data processing module includes a preprocessing unit, a grayscale image unit, a texture image unit and a visualization unit; The preprocessing unit sequentially stores the waterlogging result data at different times in a time-division manner according to the waterlogging evolution time sequence in the waterlogging result data; The grayscale image unit sequentially reads the water accumulation data at different times, converts the coordinate system of the water accumulation grid into the canvas coordinate system; normalizes the water accumulation depths corresponding to all the water accumulation grids at the time to obtain normalized data; Based on the canvas coordinate system, convert the normalized data into a grayscale image; The texture map unit performs color mapping processing according to the grayscale image based on the preset water depth band palette data to obtain a water depth thermal texture map of the waterlogged area of the measured city; The specific steps of the color mapping process include: Step 41, sequentially read the ARGB value of each pixel in the preset water dark color band image and store it in the palette; Step 42, starting from the origin in the upper left corner of the grayscale image, traverse and obtain each pixel in the order of pixels from left to right and from top to bottom, perform an inversion operation on the alpha channel value of each pixel, and use the obtained result as an index; based on the index, call the corresponding color from the palette, and color the pixel points with the same pixel order in the tested city bitmap; The visualization unit reads the water accumulation surface geometry data and the water depth thermal texture map of the water accumulation area in the measured city in the three-dimensional earth engine according to the time sequence of water accumulation evolution, draws the water accumulation surface geometry data into the measured city scene of the three-dimensional earth engine through the three-dimensional drawing protocol, and pastes the water depth thermal texture map of the water accumulation area corresponding to the water accumulation surface geometry data into the corresponding position of the scene, so as to obtain a visualization image of the water accumulation area of the measured city; The result generation module is used to send the visualization image externally.
9. A three-dimensional dynamic visualization device for urban waterlogging, characterized in that: It includes a processor, a memory and a bus, wherein the memory stores instructions and data read by the processor, the processor is used to call the instructions and data in the memory to execute any method as claimed in claim 1-7, and the bus connects the functional components to transmit information.
Citation Information
Patent Citations
Simulating and predicting method of urban storm flood
CN101694680A
Urban inland inundation analysis method and device based on BIM and SWMM of unmanned aerial vehicle, and medium
CN114048943A
