River and lake simulation generation method and device, storage medium and electronic equipment

CN122548948APending Publication Date: 2026-08-11CRSC INST OF SMART CITY RES &DESIGN
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-22
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,这些方法在实际应用中面临诸多限制:实地测绘成本高、周期长,难以满足大规模场景快速构建的需求;遥感影像解耦技术门槛高,处理流程复杂,且受影像质量和覆盖范围限制;现有地图数据调用则存在数据更新滞后、格式转换困难、定制化程度低等问题

Benefits of technology

[0008] The beneficial effects of this disclosure are as follows: The technical means of determining river paths based on linear interpolation and multi-winding offset algorithms can generate river morphologies with multi-scale composite bending characteristics. At the macroscopic level, it presents a clear overall flow direction and large bends, while at the microscopic level, it includes numerous small bends and local variations, significantly improving the naturalness of the river morphology. For lake generation, the technique of generating polygons with multiple vertices based on the lake area and lake center coordinates as lake boundaries ensures that the generated lakes possess both irregular natural forms and relatively regular overall outlines, balancing the naturalness and usability of the lake morphology. Simultaneously, the parameter calculation mechanism in the river and lake generation process is entirely based on automatic calculation of the region size. It can automatically calculate reasonable river lengths and lake areas according to the region size, achieving regional adaptability of the generation parameters. This allows the same algorithm to be applied to simulation scenarios of different scales, from urban blocks to regional watersheds, without requiring manual parameter adjustment by the user, greatly improving the versatility and ease of use of the technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548948A_ABST
    Figure CN122548948A_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, storage medium, and electronic device for simulating and generating rivers and lakes. The method includes: receiving a generation request submitted by a user and determining the actual physical dimensions of the generation area based on the generation request; determining the river length based on the actual physical dimensions, and determining the river's starting and ending points based on the river length, and determining the river path based on linear interpolation and a multi-winding offset algorithm; determining the lake area based on the actual physical dimensions, and determining the lake's center coordinates within the generation area, generating a polygon with multiple vertices as the lake boundary based on the lake area and the lake's center coordinates; and outputting the river path and / or lake boundary as standard geographic information vector data. This disclosure achieves parametric simulation and generation of rivers and lakes, generating highly natural water body morphologies through regional adaptive calculation, multi-frequency winding algorithms, and multi-vertex irregular polygon technology, thereby improving the efficiency and realism of 3D scene construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of geographic information systems and computer simulation technology, and in particular to a method, apparatus, storage medium and electronic device for simulating rivers and lakes. Background Technology

[0002] With the rapid development of low-altitude economy, smart cities, and digital twins, the demand for realistic geographic simulation data is increasing. Rivers and lakes, as core elements of surface water bodies, play a crucial role in applications such as urban 3D scene construction, flight obstacle assessment, hydrological simulation, and environmental monitoring. Traditional methods for acquiring geographic simulation data mainly include on-site surveying, remote sensing image decoupling, and accessing existing map data. However, these methods face many limitations in practical applications: on-site surveying is costly and time-consuming, making it difficult to meet the needs of rapid construction of large-scale scenes; remote sensing image decoupling technology has high barriers to entry, complex processing procedures, and is limited by image quality and coverage; accessing existing map data suffers from problems such as data update delays, difficulties in format conversion, and low customization. Summary of the Invention

[0003] The purpose of this disclosure is to provide a method, apparatus, storage medium, and electronic device for simulating and generating rivers and lakes, in order to solve the problems existing in the prior art.

[0004] The embodiments of this disclosure adopt the following technical solution: a method for simulating and generating rivers and lakes, comprising: receiving a generation request submitted by a user, and determining the actual physical size of the generation area according to the generation request, wherein the generation request includes: geographic boundary parameters and subject type, wherein the subject type includes rivers and lakes; when the subject type is a river, determining the river length according to the actual physical size, and determining the river start point and river end point according to the river length, and determining the river path based on linear interpolation and multi-winding offset algorithms; when the subject type is a lake, determining the lake area according to the actual physical size, and determining the lake center coordinates within the generation area, generating a polygon with multiple vertices as the lake boundary based on the lake area and the lake center coordinates; and outputting the river path and / or the lake boundary as standard geographic information vector data.

[0005] This disclosure also provides a simulation generation device for rivers and lakes, comprising: a regional parameter calculation module, used to receive a generation request submitted by a user and determine the actual physical size of the generation area according to the generation request, the generation request including: geographic boundary parameters and subject type, the subject type including rivers and lakes; a river generation module, used to determine the river length according to the actual physical size when the subject type is a river, and determine the river start point and river end point according to the river length, and determine the river path based on linear interpolation and multi-winding offset algorithms; a lake generation module, used to determine the lake area according to the actual physical size when the subject type is a lake, and determine the lake center coordinates within the generation area, and generate a polygon with multiple vertices as the lake boundary based on the lake area and the lake center coordinates; and a packaging output module, used to output the river path and / or the lake boundary as standard geographic information vector data.

[0006] This disclosure also provides a storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for simulating and generating rivers and lakes.

[0007] This disclosure also provides an electronic device, including at least a memory and a processor. The memory stores a computer program, and the processor executes the computer program in the memory to implement the steps of the above-described method for simulating and generating rivers and lakes.

[0008] The beneficial effects of this disclosure are as follows: The technical means of determining river paths based on linear interpolation and multi-winding offset algorithms can generate river morphologies with multi-scale composite bending characteristics. At the macroscopic level, it presents a clear overall flow direction and large bends, while at the microscopic level, it includes numerous small bends and local variations, significantly improving the naturalness of the river morphology. For lake generation, the technique of generating polygons with multiple vertices based on the lake area and lake center coordinates as lake boundaries ensures that the generated lakes possess both irregular natural forms and relatively regular overall outlines, balancing the naturalness and usability of the lake morphology. Simultaneously, the parameter calculation mechanism in the river and lake generation process is entirely based on automatic calculation of the region size. It can automatically calculate reasonable river lengths and lake areas according to the region size, achieving regional adaptability of the generation parameters. This allows the same algorithm to be applied to simulation scenarios of different scales, from urban blocks to regional watersheds, without requiring manual parameter adjustment by the user, greatly improving the versatility and ease of use of the technology. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart of the simulation generation method for rivers and lakes in the first embodiment of this disclosure; Figure 2 This is a schematic diagram of the structure of the simulation generation device for rivers and lakes in the second embodiment of this disclosure. Detailed Implementation

[0011] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.

[0012] To address the problems existing in the prior art, the first embodiment of this disclosure provides a method for simulating and generating rivers and lakes. This method can be applied to geographic information system servers, 3D simulation platforms, or digital twin systems, and is used to automatically generate simulated river and lake data that conforms to natural geographical laws based on user-specified geographic boundaries.

[0013] Figure 1 The flowchart of the river and lake simulation generation method of this embodiment is shown, which mainly includes steps S10 to S40: S10 receives the generation request submitted by the user and determines the actual physical size of the generation area based on the generation request.

[0014] A generation request refers to a data request submitted by a user to the system, containing geographic boundary parameters and subject type, used to trigger the corresponding river or lake generation process. Among them, geographic boundary parameters are key parameters that define the spatial range of the generation area, mainly including minimum longitude (min_lon), maximum longitude (max_lon), minimum latitude (min_lat), and maximum latitude (max_lat). These four parameters together determine the rectangular boundary range of the generation area on the Earth's surface. Subject type refers to the category of geographic features that the user wishes to generate, including two types: rivers and lakes. The system executes the corresponding generation algorithm according to the different subject types. In the same generation request, the user can generate both rivers and lakes simultaneously, or choose one of them.

[0015] After receiving the user's generation request, the system determines the actual physical dimensions of the generated region, including its width, height, diagonal length, and physical area. During the conversion, the curvature of the Earth's surface must be considered, particularly the differences in longitude conversion factors at different latitudes. Specifically, the center latitude coordinates and width of the generated region are determined based on the maximum and minimum latitudes. The center latitude coordinates (center_lat) are equal to the arithmetic mean of the minimum and maximum latitudes, and the width (width_deg) is the absolute value of the difference between the minimum and maximum latitudes. Similarly, the center longitude coordinates and length of the generated region are determined based on the maximum and minimum longitudes. The center longitude coordinates (center_lon) are equal to the arithmetic mean of the minimum and maximum longitudes, and the length (length_deg) is the absolute value of the difference between the maximum and minimum longitudes.

[0016] Because the distance conversion factors differ at different latitudes on the Earth's surface, based on latitudinal cosine correction, the actual width of the generated region is:

[0017] in, The actual width of the generated region is given by 111.32, where 111.32 represents the average distance per degree in the latitude direction, and the remainder is in kilometers. This represents the latitudinal projection correction factor; further, it represents the actual length of the generated region. for:

[0018] Then you can base it on the actual length. and actual width Calculate the physical area (Area) and diagonal length (diagonal) of the generated region, where, , The calculations based on the actual physical dimensions described above can serve as a benchmark for subsequent calculations of river length and lake area, ensuring that the generated geographic features maintain a reasonable proportional relationship with the area size. Furthermore, when the size of the simulation area changes, the generated rivers and lakes automatically adapt to the new scale without requiring manual parameter adjustments by the user, greatly improving the versatility of the technology.

[0019] S20, when the main body type is a river, the river length is determined according to the actual physical dimensions, and the river start and end points are determined according to the river length. The river path is determined based on linear interpolation and multi-winding offset algorithms.

[0020] When a user requests river generation, the river length (adaptive_length) is first calculated based on the diagonal length and a first random coefficient. This first random coefficient, randomly selected from 0.3 to 0.6, controls the ratio of the river length to the region's diagonal length, ensuring the generated river can adapt to applications of varying scales and precision. In actual generation, to guarantee a reasonable river length, the calculation results are further truncated, ensuring the river length does not exceed 1 km to 50 km.

[0021] Subsequently, the river's starting and ending points are determined at the boundary points of the generated region. The straight-line distance between the river's starting and ending points is determined based on the river's length and a preset meandering coefficient. The preset meandering coefficient characterizes the river's curvature, typically ranging from 2.0 to 2.8. A larger meandering coefficient indicates a more severe river curvature, and a higher ratio of the actual path length to the straight-line distance. Dividing the river length by the meandering coefficient yields the target straight-line distance between the starting and ending points. This distance constraint ensures that the actual path length is close to the preset river length when generating the meandering path. In determining the river's starting and ending points, a point on the region boundary can be randomly selected as the starting point. Then, based on the target straight-line distance, the ending point is determined at other locations on the region boundary, ensuring that the straight-line distance between the two points meets the calculation requirements.

[0022] In practical implementation, considering the characteristic that natural rivers typically have a certain overall flow direction, this embodiment limits the flow control mechanism to a west-to-east direction. The region is divided into several strips along the latitudinal direction, and the river flows as a whole in the direction of increasing longitude. That is, the river's starting point is chosen near the western boundary in longitude, and the ending point is chosen near the eastern boundary in longitude, ensuring that the river's overall flow trend is from west to east. The river meanders frequently within the strips, producing a natural curved shape.

[0023] The number of nodes in the river path is then determined based on the straight-line distance between the river's starting and ending points. The number of nodes equals the straight-line distance divided by 0.003 times the maximum area size (i.e., 0.003 times the diagonal distance), and is limited to no less than 20 and no more than 60 nodes. Longer rivers have more nodes. This adaptive node number determination ensures path precision while avoiding computational resource waste due to excessive nodes. Subsequently, the basic coordinates of each node are determined using a linear interpolation algorithm. Linear interpolation is a method of calculating the coordinates of intermediate points based on a linear relationship between two known points. Let the river path consist of N nodes, with the starting point coordinates as... The endpoint coordinates are For the i-th node ( First, calculate its normalization parameter. This represents the relative position of the node in the path, and then its basic coordinates are calculated using linear interpolation as follows:

[0024]

[0025] Get the base coordinates of the i-th node ( ).

[0026] However, the basic coordinates of the nodes can only form a straight river path from the river's starting point to its ending point, which cannot reflect its meandering characteristics. In this embodiment, based on this, multiple waveform components with different frequencies and weights are superimposed to calculate the meandering offset of each node, and the meandering offset of the node is vertically superimposed on its basic coordinates to obtain the actual coordinates of each node after the meandering offset processing. By sorting out the actual coordinates of all nodes, a river path with a meandering effect can be determined.

[0027] Specifically, multiple waveform components of different frequencies refer to sine or cosine wave functions of different frequencies used to generate the meandering effect. The weights represent the degree of influence of the waveform component on the meandering offset. The four frequency components and their weights used in this embodiment include: (1) The first frequency component is the main bend frequency of the river, with a frequency range of 0.8 to 1.5 and an amplitude weight of 1.0. A sine wave function is used to generate a classic S-shaped bend effect. (2) The second frequency component is a medium bending frequency, with a frequency range of 2.0 to 3.5, an amplitude weight of 0.4, and uses a cosine wave function with added... The phase shift is used to create an asymmetrical bending effect; (3) The third frequency component is a slightly varying frequency, ranging from 4.0 to 6.0, with an amplitude weight of 0.15. A cubic sine wave function is used to generate small-scale waveform changes. (4) The fourth frequency component is a high-frequency fine-tuning frequency with a frequency range of 12.0 to 20.0 and an amplitude weight of 0.05. It uses the form of sine wave product to generate fine sawtooth fluctuations.

[0028] By superimposing these four waveform components with different frequencies and weights, a meandering offset with multi-scale composite bending characteristics is generated. After being superimposed onto the base coordinates, a river path with multi-scale composite bending characteristics can be generated, achieving a clear overall flow direction and large turns at the macroscopic level, while containing numerous small bends and local variations at the microscopic level, significantly improving the naturalness of the river morphology. It should be noted that when actually generating the meandering offset, the amplitude of each frequency component is affected by both the maximum meandering amplitude (max_amplitude) and the amplitude weight. The maximum meandering amplitude is taken as 12% of the straight-line distance, and the weights of the aforementioned frequency components can also be adjusted according to actual needs; this embodiment does not impose specific limitations.

[0029] In some embodiments, attenuation functions and terrain noise can also be calculated based on the normalized parameters of the nodes to make the generated river morphology more natural. The attenuation function adopts... The maximum value is achieved at t=0.5, ensuring the natural characteristic of a river with smaller bends at both ends and larger bends in the middle. Terrain noise is simulated by superimposing sine and cosine product terms at multiple scales to represent the influence of local geological conditions. The noise intensity is 8% of the maximum meandering amplitude, and the aforementioned attenuation function is applied to maintain a smooth transition at both ends. Finally, based on the simultaneous application of meandering offset, attenuation function, and terrain noise to the base coordinates, a river morphology that better reflects actual terrain characteristics and natural features is obtained.

[0030] In some embodiments, tributaries can be further generated. The starting point of the tributary is randomly selected from the region boundary or within the region, and the ending point is a random node on the main river. It should be noted that the selection of the endpoint avoids the starting and ending areas of the main river, and the selection range is from 1 / 4 to 3 / 4 of the main river node index. The generation of the tributary path can also be implemented based on the above-described linear interpolation and multi-winding offset algorithm, which will not be repeated in this embodiment.

[0031] In some embodiments, the actual coordinates of the nodes are smoothed before the river path is formed to eliminate potential sharp corners and discontinuities. Specifically, the smoothing process can employ a three-point weighted average method, where the original path point sequence is... The smoothed path point sequence is With the endpoints remaining unchanged, the smoothed coordinates of the intermediate node i are calculated using a weighted average method:

[0032]

[0033] In this method, adjacent points have weights of 0.25 and 0.25 respectively, while the center point has a weight of 0.5. This effectively eliminates local unevenness while maintaining the overall shape of the path. In some embodiments, for paths with a large number of nodes, a weighted average method with a dynamic window size can be used. The window size is the total number of nodes divided by 4, with a maximum of 7. The weights of each point within the window follow a Gaussian distribution, with points closer to the center point having a larger weight. The center point receives an additional 3 times the weight coefficient.

[0034] Furthermore, to balance the smoothing effect and the preservation of original features, the smoothed coordinates of the nodes obtained by the smoothing process are mixed and preserved with the original actual coordinates before smoothing according to a preset ratio. For example, the smoothed coordinates account for 75% of the final coordinates, and the original coordinates account for 25%. Through the smoothing process, sharp corners and discontinuities that may exist in the path are eliminated, improving the smoothness of the river path. At the same time, the natural features of the original path are preserved through the mixing strategy, avoiding the loss of details caused by over-smoothing.

[0035] S30, when the main type is a lake, determine the lake area based on the actual physical size, determine the lake center coordinates within the generated area, and generate a polygon with multiple vertices as the lake boundary based on the lake area and the lake center coordinates.

[0036] For user requests to generate lakes, the system first calculates the lake area based on the physical area of ​​the generating region and a second random coefficient. The second random coefficient, randomly selected from 2% to 5%, controls the ratio between the lake area and the region's physical area, ensuring the generated lake can adapt to application needs of different scales. Simultaneously, to guarantee the generated lake has a reasonable size range, the calculation results can be truncated to ensure the lake area does not exceed the range of 0.1 square kilometers to 10 square kilometers.

[0037] The lake is then equated to a circle, and its equivalent radius is calculated based on the lake's area. Where S represents the lake area. Then, based on latitudinal cosine correction, the equivalent radius is converted into longitude and latitudinal radii to ensure that the lake's shape maintains a reasonable proportional relationship in different latitude regions. Specifically, let center_lat be the latitude of the lake's center and the longitude radius... Latitude radius .

[0038] It should be noted that the lake center in this embodiment can be randomly determined within the generation area, ensuring that the lake generated based on this center is completely located within the generation area. After determining the lake center coordinates, a preset number of vertices are randomly generated, so that all vertices are distributed in a circle around the lake center. In this embodiment, the number of vertices M ranges from 8 to 16, distributed as evenly as possible around the lake center. Each vertex corresponds to an azimuth angle relative to the lake center, that is, the angle between the vertex and the center line rotated counterclockwise from due east, expressed by the following formula:

[0039] in, Indicates the first The direction angle of each vertex In this embodiment, the vertex in the due east direction is taken as the 0th vertex, and the number increases in a counterclockwise direction, that is... At that time, the vertex was located due north of the center of the lake. At that time, the vertex was located due west of the center of the lake. At that time, the vertex was located due south of the center of the lake.

[0040] Then, based on the lake center coordinates, longitude radius, latitude radius, azimuth of each vertex, radius fluctuation coefficient of each vertex, and random azimuth offset, the vertex coordinates are determined. Specifically, the radius fluctuation coefficient is used to make the lake shape irregular but relatively regular, with a value ranging from 0.7 to 1.3, so that the actual radius of each vertex fluctuates within 70% to 130% of the equivalent radius. The random azimuth offset is used to increase the angular position variation of the vertices, with a value ranging from -0.2 to +0.2 degrees. The vertex coordinates are calculated using polar coordinate transformation. Longitude coordinates are calculated by adding the longitude radius to the lake center longitude, multiplying by the radius fluctuation coefficient, and then multiplying by the cosine of the azimuth. Latitude coordinates are calculated by adding the latitude radius to the latitude radius, multiplying by the radius fluctuation coefficient, and then multiplying by the sine of the azimuth. The specific formula is as follows:

[0041]

[0042] in, and The coordinates of the vertex are its longitude and latitude. Indicates the radius in the longitude direction. The radius is in the latitudinal direction. This represents the radius fluctuation coefficient, which can be different for each vertex. Indicates the direction angle of the vertex. This indicates a random offset of the azimuth angle.

[0043] In practical implementation, to ensure that the generated lake lies entirely within the region boundary, the vertex coordinates need to be truncated to ensure that the longitude of each vertex is between the minimum and maximum longitude of the region, and the latitude is between the minimum and maximum latitude of the region. Finally, the vertices are connected sequentially to form a closed polygon, which constitutes the boundary of the lake. This polygon boundary can be directly used for subsequent vector data output. By controlling the number of vertices, the radius fluctuation coefficient, and the random offset of the azimuth angle, the lake generated in this embodiment has both an irregular natural shape and maintains a relatively regular overall outline, taking into account both the naturalness and usability of the lake shape, and solving the problem that the lakes generated by existing technologies are either too regular in shape or have rough boundary details.

[0044] It should be noted that steps S20 and S30 in this embodiment are two independent operation steps that can be executed in parallel. If the user's generation request only includes the requirement to generate rivers, then only step S20 is executed. If the user only needs to generate lakes, then step S30 can be executed alone. If simultaneous execution is required, the generation can be performed separately and the results can be integrated.

[0045] S40 outputs river paths and / or lake boundaries as standard geographic information vector data.

[0046] Standard geographic information vector data refers to geographic information data formats that conform to industry standards, such as the standard Shapefile format. Shapefile is a geographic information vector data format developed by ESRI and widely used in the field of geographic information systems. It consists of multiple associated files, including .shp geometric data files, .shx index data files, .dbf attribute data files, and .prj projection information files. This embodiment uses the GeoPandas library to create a GeoDataFrame, which associates and stores geometric objects with attribute data. Attribute data is automatically generated according to feature type: river features include attributes such as name, type, width, depth, flow velocity, and length; lake features include attributes such as name, type, area, maximum depth, altitude, and water quality. The generated GeoDataFrame sets the coordinate reference system to EPSG:4326 (WGS84 geographic coordinate system), ensuring compatibility with mainstream geographic information software. UTF-8 encoding is specified during data output to ensure correct display of Chinese characters. All necessary supporting files are automatically generated upon saving to ensure the integrity and usability of the output data. By outputting the standard Shapefile format, the simulation data generated by this invention can be directly used in professional geographic information software such as Cesium, ArcGIS, and QGIS, as well as various 3D simulation platforms, achieving seamless integration with downstream applications.

[0047] In some embodiments, the system supports parallel generation and batch output of multiple regions. Users can submit generation requests containing multiple region definitions, each region can independently specify geographic boundary parameters and subject type. The system processes the generation tasks of each region in parallel and finally outputs a unified Shapefile containing simulation data from all regions. This batch processing capability greatly improves the efficiency of large-scale scene construction.

[0048] This embodiment utilizes linear interpolation and multi-winding offset algorithms to determine river paths, generating river morphologies with multi-scale composite bends. At the macroscopic level, it exhibits a clear overall flow direction and large bends, while at the microscopic level, it includes numerous small bends and local variations, significantly enhancing the naturalness of the river morphology. For lake generation, a technique is employed to generate polygons with multiple vertices based on the lake area and center coordinates as lake boundaries. This results in lakes with both irregular natural shapes and relatively regular overall outlines, balancing the naturalness and usability of the lake morphology. Furthermore, the parameter calculation mechanism in the river and lake generation process is entirely based on automatic calculation of the region size. It can automatically calculate reasonable river lengths and lake areas according to the region size, achieving regional adaptability of the generation parameters. This allows the same algorithm to be applied to simulation scenarios of different scales, from urban blocks to regional watersheds, without requiring manual parameter adjustments by the user, greatly improving the versatility and ease of use of the technology.

[0049] Based on the same inventive concept, the second embodiment of this disclosure provides a simulation generation device for rivers and lakes, which can be installed on a geographic information system server, a 3D simulation platform, or a digital twin system. Its structural schematic diagram is shown below. Figure 2 As shown, it mainly includes a regional parameter calculation module 10, a river generation module 20, a lake generation module 30, and a packaging output module 40.

[0050] Specifically, the region parameter calculation module 10 receives a generation request submitted by the user and determines the actual physical dimensions of the generated region based on the request. The generation request includes geographic boundary parameters and subject type, with subject type including rivers and lakes; the geographic boundary parameters include minimum longitude, maximum longitude, minimum latitude, and maximum latitude. The region parameter calculation module 10 is specifically used to determine the center latitude coordinates and region width of the generated region based on the maximum and minimum latitudes, and to determine the center longitude coordinates and region length based on the maximum and minimum longitudes; it calculates the actual width of the generated region based on the center latitude coordinates and region width, calculates the actual length of the generated region based on the region length, and calculates the diagonal length and physical area of ​​the generated region based on the actual length and actual width.

[0051] The river generation module 20, when the main type is a river, determines the river length based on the actual physical dimensions, and determines the river's starting and ending points based on the river length. It then determines the river path based on linear interpolation and a multi-winding offset algorithm. Specifically, the river generation module 20 is used to: calculate the river length based on the diagonal length and a first random coefficient (between 0.3 and 0.6); determine the river's starting and ending points at the boundary points of the generation area, with the straight-line distance between the starting and ending points determined based on the river length and a preset winding coefficient; determine the number of nodes in the river path based on the straight-line distance, and determine the base coordinates of each node based on the linear interpolation algorithm, the river's starting and ending points; calculate the winding offset of each node based on the superposition of multiple waveform components with different frequencies and weights; vertically superimpose the winding offsets of the nodes onto the base coordinates to obtain the actual coordinates of each node; and form the river path based on the actual coordinates of all nodes.

[0052] Furthermore, the river generation module 20 is specifically used to calculate the attenuation function and terrain noise based on the normalized parameters of the nodes; and to vertically superimpose the meandering offset, attenuation function, and terrain noise onto the base coordinates to obtain the actual coordinates of each node. In some embodiments, the river generation module 20 is also used to smooth the actual coordinates of the nodes to obtain the smoothed coordinates of the nodes; and to mix the smoothed coordinates and the actual coordinates according to a preset ratio to form a river path.

[0053] The lake generation module 30, when the main type is a lake, determines the lake area based on the actual physical dimensions and determines the lake center coordinates within the generation area. Based on the lake area and lake center coordinates, it generates a polygon with multiple vertices as the lake boundary. Specifically, the lake generation module 30 calculates the lake area based on the physical area and a second random coefficient (between 2% and 5%); calculates the equivalent radius based on the lake area and converts it into a longitude and latitude radius based on latitude cosine correction; determines the lake center coordinates within the generation area and randomly generates a preset number of vertices, distributing them in a circle around the lake center, with each vertex corresponding to an azimuth angle relative to the lake center; determines the vertex coordinates of each vertex based on the lake center coordinates, longitude radius, latitude radius, azimuth angle of each vertex, radius fluctuation coefficient of each vertex, and random azimuth angle offset; and forms the lake boundary based on the vertex coordinates of all vertices.

[0054] The packaging output module 40 is used to output river paths and / or lake boundaries as standard geographic information vector data.

[0055] It should be noted that the specific functional implementation of the above modules has been described in detail in the first embodiment of this disclosure, and will not be repeated here.

[0056] This embodiment utilizes linear interpolation and multi-winding offset algorithms to determine river paths, generating river morphologies with multi-scale composite bends. At the macroscopic level, it exhibits a clear overall flow direction and large bends, while at the microscopic level, it includes numerous small bends and local variations, significantly enhancing the naturalness of the river morphology. For lake generation, a technique is employed to generate polygons with multiple vertices based on the lake area and center coordinates as lake boundaries. This results in lakes with both irregular natural shapes and relatively regular overall outlines, balancing the naturalness and usability of the lake morphology. Furthermore, the parameter calculation mechanism in the river and lake generation process is entirely based on automatic calculation of the region size. It can automatically calculate reasonable river lengths and lake areas according to the region size, achieving regional adaptability of the generation parameters. This allows the same algorithm to be applied to simulation scenarios of different scales, from urban blocks to regional watersheds, without requiring manual parameter adjustments by the user, greatly improving the versatility and ease of use of the technology.

[0057] Based on the same inventive concept, the third embodiment of this disclosure provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the river and lake simulation generation method described in the first embodiment of this disclosure.

[0058] Based on the same inventive concept, the third embodiment of this disclosure provides an electronic device, including at least a memory and a processor. The memory stores a computer program, and the processor, when executing the computer program in the memory, implements the steps of the river and lake simulation generation method described in the first embodiment of this disclosure.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method for generating a simulation of a river lake, characterized in that, include: The system receives a generation request submitted by a user and determines the actual physical size of the generation area based on the generation request. The generation request includes geographic boundary parameters and subject type, where the subject type includes rivers and lakes. In the case where the main body type is a river, the river length is determined based on the actual physical dimensions, and the river start and end points are determined based on the river length. The river path is determined based on linear interpolation and a multi-winding offset algorithm. When the main body type is a lake, the lake area is determined according to the actual physical size, and the center coordinates of the lake are determined within the generated area. Based on the lake area and the center coordinates of the lake, a polygon with multiple vertices is generated as the lake boundary. Output the river path and / or the lake boundary as standard geographic information vector data.

2. The simulation generation method of claim 1, wherein, The geographic boundary parameters include: minimum longitude, maximum longitude, minimum latitude, and maximum latitude.

3. The simulation generation method according to claim 2, characterized in that, Determining the actual physical size of the generated region based on the generation request includes: The center latitude coordinates and width of the generated region are determined based on the maximum latitude and the minimum latitude, and the center longitude coordinates and length of the generated region are determined based on the maximum longitude and the minimum longitude. The actual width of the generated region is calculated based on the center latitude coordinates and the region width. The actual length of the generated region is calculated based on the region length. The diagonal length and physical area of ​​the generated region are calculated based on the actual length and the actual width.

4. The simulation generation method according to claim 3, characterized in that, The process of determining the river length based on the actual physical dimensions, determining the river's starting and ending points based on the river length, and determining the river path based on linear interpolation and a multi-winding offset algorithm includes: The river length is calculated based on the diagonal length and a first random coefficient, where the first random coefficient is between 0.3 and 0.

6. The river's starting point and ending point are determined at the boundary points of the generated area, and the straight-line distance between the river's starting point and the river's ending point is determined based on the river's length and a preset meandering coefficient. The number of nodes along the river path is determined based on the straight-line distance, and the basic coordinates of each node are determined based on a linear interpolation algorithm, the river's starting point, and the river's ending point. The meandering offset of each node is calculated by superimposing multiple waveform components with different frequencies and weights. The meandering offset of the node is vertically superimposed on the base coordinates to obtain the actual coordinates of each node; The river path is formed based on the actual coordinates of all the nodes.

5. The simulation generation method according to claim 4, characterized in that, The step of vertically superimposing the meandering offset of the node onto the base coordinates to obtain the actual coordinates of each node includes: The attenuation function and terrain noise are calculated based on the normalized parameters of the nodes; The meandering offset, the attenuation function, and the terrain noise are vertically superimposed on the base coordinates to obtain the actual coordinates of each node.

6. The simulation generation method according to claim 4, characterized in that, The process of forming the river path based on the actual coordinates of all the nodes includes: The actual coordinates of the node are smoothed to obtain the smoothed coordinates of the node; The smoothed coordinates and the actual coordinates are mixed according to a preset ratio to form the river path.

7. The simulation generation method according to claim 3, characterized in that, The process of determining the lake area based on the actual physical dimensions, determining the lake center coordinates within the generated area, and generating a polygon with multiple vertices as the lake boundary based on the lake area and the lake center coordinates includes: The lake area is calculated based on the physical area and a second random coefficient, where the second random coefficient is between 2% and 5%. The equivalent radius is calculated based on the lake area, and then converted into a longitude radius and a latitudinal radius based on latitudinal cosine correction. Within the generated area, determine the coordinates of the lake center and randomly generate a preset number of vertices, such that all the vertices are distributed in a circle around the lake center, and each vertex corresponds to an azimuth angle relative to the lake center; Based on the lake center coordinates, the longitude radius, the latitude radius, the azimuth of each vertex, the radius fluctuation coefficient of each vertex, and the random azimuth offset, the vertex coordinates of each vertex are determined. The lake boundary is formed based on the vertex coordinates of all the vertices.

8. A device for simulating and generating rivers and lakes, characterized in that, include: The regional parameter calculation module is used to receive the generation request submitted by the user and determine the actual physical size of the generation area according to the generation request. The generation request includes: geographic boundary parameters and subject type, and the subject type includes rivers and lakes. The river generation module is used to determine the river length based on the actual physical dimensions when the main body type is a river, and to determine the river start and river end points based on the river length, and to determine the river path based on linear interpolation and multi-winding offset algorithms; The lake generation module is used to determine the lake area based on the actual physical size when the main body type is a lake, and to determine the center coordinates of the lake within the generation area, and to generate a polygon with multiple vertices as the lake boundary based on the lake area and the center coordinates of the lake. The packaging output module is used to output the river path and / or the lake boundary as standard geographic information vector data.

9. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the simulation generation method for rivers and lakes as described in any one of claims 1 to 7.

10. An electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program on the memory, it implements the steps of the method for simulating and generating rivers and lakes as described in any one of claims 1 to 7.