Shoreline fitting method based on optimized Douglas-Peucker algorithm

The threshold selection of the Douglas-Peucker algorithm is optimized by the particle swarm optimization algorithm. Combined with key feature density blocking and fitness function evaluation, the problem of the existing shoreline fitting algorithm losing key features when processing complex shorelines is solved, and higher precision and automated shoreline fitting is achieved.

CN120673204AActive Publication Date: 2025-09-19HOHAI UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510708173.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-19
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

Existing coastline fitting algorithms are prone to losing key terrain features when dealing with complex coastlines and are greatly affected by human intervention, making it difficult to ensure the accuracy and efficiency of the fitting results.

Method used

The particle swarm optimization algorithm is used to optimize the threshold selection mechanism of the Douglas-Peucker algorithm, the coastline is processed in blocks according to the density of key features, and the fitness function is used to evaluate the fitting results to ensure the retention of key terrain features and the automation of fitting results.

Benefits of technology

It effectively preserves the key terrain features of the coastline, improves the automation level of coastline fitting, reduces the impact of manual intervention, and improves the accuracy and efficiency of fitting results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673204A_ABST
    Figure CN120673204A_ABST
Patent Text Reader

Abstract

The invention discloses a shoreline fitting method based on an optimized Douglas-Peucker algorithm, and the method comprises the steps: recognizing whether the type corresponding to a pixel point in a satellite remote sensing image is a water area or a land through a convolutional neural network, and forming an original shoreline through the pixel points of which the types are superposed; secondly, identifying important topographic features on the shoreline, partitioning the shoreline by taking the important topographic features as a core, screening candidate solutions of a Douglas-Peucker algorithm threshold value by using a particle swarm optimization algorithm and a fitness function for each block of shoreline, and taking each candidate solution as a threshold value to obtain a fitting result; and finding out the optimal value of each block by taking the feature similarity of the fitting result and the original shoreline as a measurement standard, and then splicing the optimal values of all blocks corresponding to the fitting result to form a final output result. The method provided by the invention has high automation, and effectively avoids the interference of subjectivity of manual intervention and contingency of random selection on a final result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of shoreline fitting algorithms, and in particular relates to a shoreline fitting method based on an optimized Douglas-Peucker algorithm. Background Art

[0002] Coastlines are the boundaries between water bodies (such as rivers, lakes, and oceans) and land, representing the transition zone between water and land. As a crucial geographic feature, coastline determination plays a crucial role in marine resource management, environmental monitoring, and disaster warning. With the development of high-precision remote sensing and geographic information systems (GIS), the amount of raw shoreline data obtained during shoreline measurements has grown exponentially. However, much of this raw data is meaningless for practical applications or analytical research. These insignificant elements become redundant, resulting in a waste of storage space and computational resources. Furthermore, in numerical studies of water flow dynamics, unstructured grids are often used for meshing water bodies with irregular boundaries, such as coastlines. However, overly complex coastline shapes can significantly increase the number of grid cells within the water body, leading to excessive computational time or a sharp decrease in the orthogonality of the grid near the coastline, causing grid distortion and computational failure.

[0003] To eliminate redundancy in raw shoreline data, various shoreline processing methods have been developed. The Douglas-Peucker algorithm is one of the most widely used. The algorithm's core principle is to recursively split a polyline into two segments and then, based on a set threshold, remove points whose deviation from the straight line is less than the threshold. This simplifies the polyline, achieving a balance between data compression and morphological preservation. As a classic line feature simplification algorithm, the Douglas-Peucker algorithm, due to its mathematical simplicity and efficient data processing, is widely used in curve fitting, particularly for curve interpolation. However, the classic Douglas-Peucker algorithm also has limitations in shoreline processing. For example, a fixed threshold may be used during shoreline fitting, making the final result sensitive to complex shoreline shape variations and missing key topographic features such as estuaries and headlands. Other traditional shoreline processing methods also rely on manual intervention or simple geometric rules during the processing process. These methods also suffer from significant subjective influences on the fitting results, low computational efficiency, and difficulty in ensuring the accuracy of the fitting results.

[0004] Researchers in the field of shoreline fitting have made numerous improvements to the Douglas-Peucker algorithm to avoid missing key terrain features in the fitting results. For example, Chinese patent application number 202411002029.3, titled "A Data Fusion Method and System for Nautical and Land Charts," proposes a method that combines the density of data points within a local area, the smoothness of the shoreline, and the fitting distance to produce a final fitting result. This method increases the correlation between data points within a certain range to highlight key terrain features such as estuaries and headlands, thereby avoiding the loss of these features. However, the selection of data points and the determination of the correlation range in this method still rely on manual intervention, and the final results are still subject to user-interpretation. Improving the Douglas-Peucker algorithm so that it does not miss key features during the fitting calculation while also eliminating the need for manual intervention is currently under investigation. Summary of the Invention

[0005] The present invention aims to propose an improved Douglas-Peucker algorithm, which optimizes the threshold selection mechanism of the traditional Douglas-Peucker algorithm through the particle swarm optimization algorithm, so that the important features of the coastline can be retained during the fitting calculation process, while improving the automation of the coastline fitting calculation and avoiding interference with the fitting results caused by manual intervention.

[0006] The technical solution adopted in the present invention is as follows:

[0007] A shoreline fitting method based on an optimized Douglas-Peucker algorithm specifically includes the following steps:

[0008] Step 1. Obtain public satellite image data of the area where the coastline to be fitted is located as the raw data for coastline fitting, and preprocess the raw data;

[0009] Step 2. Identify the pixels in the original data image and determine whether each pixel corresponds to water or land. Pixels that are identified as a superposition of water and land are selected and recorded as shoreline pixels. All shoreline pixels together constitute the original shoreline.

[0010] Step 3. Divide the original coastline into multiple segments by dividing it into blocks. The specific steps are as follows:

[0011] Step 3.1. Identify all key topographic features in the original coastline by morphological characteristics, then segment the original coastline. Each segmented portion is considered a primitive block, each containing one of the key topographic features, and each primitive block is assigned a unique number.

[0012] Step 3.2. Calculate the key feature density of each original block and set a density threshold. The key feature density is the ratio of the number of key terrain features in a block to the length of the shoreline in the block.

[0013] Compare the key feature density of each original block with the density threshold in the order of numbering. If the key feature density of two blocks is less than the density threshold and the numbers are continuous, merge the two blocks. After all blocks are compared and merged, a new block sequence is formed. This new block sequence is recorded as the first block sequence and the blocks in it are renumbered. Then repeat the comparison and merging process to form the second block sequence. This process is repeated until there are no more blocks in the sequence to be merged. The sequence obtained after the last comparison and merging is recorded as the final block sequence.

[0014] Step 4. Use the Douglas-Peucker algorithm to fit the shoreline of each block in the final block sequence. The threshold in the algorithm is different when fitting different blocks. Use the particle swarm optimization algorithm to generate multiple values ​​as candidate solutions for the threshold corresponding to each block.

[0015] Step 5. Use each candidate solution as a threshold in the Douglas-Peucker algorithm, and use the pixels in the original coastline as data points in the Douglas-Peucker algorithm. Then, use the Douglas-Peucker algorithm to obtain the corresponding fitting result. The degree of consistency between the obtained fitting result and the original coastline is compared, and each candidate solution and its corresponding degree of consistency are recorded.

[0016] Step 6. Find the candidate solution with the highest degree of consistency in each block as the final threshold of the Douglas-Peucker algorithm, and use the fitting result corresponding to the final threshold as the final fitting result. Then, the final fitting results of all blocks are pieced together in the order of the corresponding block numbers to obtain the final coastline.

[0017] In the prior art, the synthesis of coastlines using the Douglas-Peucker algorithm is mostly done manually by selecting points from the original coastline as data points for fitting, and also by manually segmenting the original coastline and selecting the threshold of the Douglas-Peucker algorithm. In this way, it is difficult to ensure that the fitting results can fully reflect the important characteristics of the coastline, and the fitting results are also greatly affected by human subjective factors. In the method of the present invention, the data points used for fitting are the pixel points that constitute the original coastline; the size of the key feature density is used to measure the complexity of the terrain of each block, and then the block situation is adjusted based on this; the threshold of the Douglas-Peucker algorithm is obtained through an optimization algorithm. In this way, there are fixed rules for selecting data points for fitting, segmenting the original coastline, and determining the threshold of the Douglas-Peucker algorithm, which avoids the randomness of selection during manual operation and the interference caused by human subjectivity.

[0018] In Step 3, the coastline is first divided into blocks based on the terrain feature recognition results. Each block contains only one key terrain feature. The boundary between two adjacent blocks is a randomly selected point on the coastline between the two key terrain features. The key point density of each block is then used to determine whether it can be merged with adjacent blocks. This ensures a balanced combination of key terrain features and relatively straight coastline within each block. If a block contains only a single large key terrain feature, it cannot be fitted using the Douglas-Peucker algorithm. However, such blocks are necessarily low in key point density. Considering that a large key terrain feature is often adjacent to other large key terrain features in reality, for example, a large river estuary is unlikely to have a large headland, merging adjacent blocks with low key point density can achieve a combination of large key terrain features and relatively straight coastline. The importance of adjacent blocks is important to prevent protruding features, such as reefs, from being merged into the coastline, potentially interfering with the coastline fitting. Depending on the accuracy requirements, for application scenarios requiring lower accuracy, the key point density of two adjacent blocks can be set to be merged when it is less than 0.5 / km. For application scenarios requiring higher accuracy, the key point density of two adjacent blocks can be set to be merged when it is less than 0.2 / km.

[0019] For further optimization, the specific steps of raw data search and preprocessing in Step 1 are as follows:

[0020] Step 1.1. Access the relevant server through a web crawler and grab the public satellite remote sensing images of the area where the coastline to be fitted is located as the raw data for coastline fitting;

[0021] Step 1.2. Use ENVI remote sensing image processing software to perform atmospheric correction on the raw data. The atmospheric correction is based on the FLAASH model.

[0022] Step 1.3. Use an adaptive median filter to denoise the raw data.

[0023] A web crawler is a program that automatically accesses websites and retrieves targeted files. Using a web crawler to collect raw data for coastline fitting eliminates the manual effort of browsing web pages and making judgments, improving efficiency and reducing complexity. The raw data requires atmospheric correction because the subsequent identification of water and land surfaces is based on the spectral characteristics of surface objects. Remote sensing images captured directly by satellites are affected by atmospheric factors such as clouds and aerosols, as well as light reflected from the top of the atmosphere. To increase the accuracy of subsequent water and land identification, it is necessary to first calibrate the raw data using the FLAASH atmospheric correction model. The FLAASH model includes both atmospheric and aerosol models. The atmospheric model is determined based on the time and latitude and longitude of the satellite acquisition. The aerosol model uses the shortwave infrared band as the KT upper channel and the red band as the KT lower channel. Parameters such as the aerosol thickness coefficient and CO2 mixing ratio are determined based on the specific scenario. An adaptive median filter is an algorithm that automatically adjusts the filter window size based on pixel noise and decides whether to filter based on the distribution of pixels within the window. Compared to traditional median filters, it is more adaptable and can better preserve detail in processed images, especially at edges. Because subsequent steps require pixel recognition, the raw data must be denoised to prevent noise from interfering with shoreline identification.

[0024] Further optimization, the specific steps of identifying the corresponding areas of the pixel points and constructing the original shoreline in Step 2 are as follows:

[0025] Step 2.1. Use a convolutional neural network (CNN) as a tool for pixel-to-pixel region recognition. By training a large number of water and land images, the CNN acquires the ability to identify water and land features.

[0026] Step 2.2. Number all pixels in the raw data. Select any pixel in the raw data as a designated pixel. A 1×3 pixel region is selected with the designated pixel as the center. The pixels in the region are arranged horizontally or vertically. All regions selected from the same remote sensing image have the same pixel arrangement. If the designated pixel is located at the edge of the image, a 1×2 pixel region is selected.

[0027] Step 2.3. Use CNN to identify two non-adjacent pixels in the 1×3 pixel area and non-edge pixels in the 1×2 pixel area. Pixels identified as water are assigned a value of 1, while pixels identified as land are assigned a value of 0. The designated pixels are marked as identified.

[0028] Step 2.4. After completing the identification and recording, select any pixel in the raw data that is not marked as identified as the designated pixel, and then repeat Step 2.3 until all pixels in the raw data are marked as identified;

[0029] Step 2.5. Compare the two identification values ​​corresponding to each pixel in the original data to see if they are the same. Find the pixels with different identification values ​​and record their corresponding numbers.

[0030] Step 2.6. After the identification values ​​of all pixels in the original data are compared, the pixel points with recorded numbers are used as shoreline pixels to construct the original shoreline.

[0031] CNN is a neural network widely used for image feature recognition. The convolution layer in CNN can learn image features by multiplying the convolution kernel with the image chromaticity and then summing them. Based on the learned features, CNN can judge the features of the subsequent input image at the pixel level, thereby realizing image classification. In the method of the present invention, after learning the corresponding features of water and land images through CNN, two non-adjacent pixels in the 1×3 pixel area are identified. This is because the chromatic features of two non-adjacent pixels are discontinuous. Compared with identifying two adjacent pixels, identifying two independent pixels is more accurate. According to the method described in Step 2, all pixels in the original data are marked and each pixel will have two identification values ​​after identification. If the two identification values ​​are inconsistent, it means that the pixel is at the edge of water and land, and the feature is difficult to distinguish. The arrangement of such pixels in the image can constitute the original coastline.

[0032] Further optimization, the specific steps for obtaining the candidate solution in Step 4 are:

[0033] Step 4.1. Determine the range of initial candidate solutions corresponding to each block based on the complexity of the original shoreline morphology.

[0034] Step 4.2. Randomly select a value from the range of values ​​described in Step 4.1 as the initial candidate solution, that is, the initial value of the iterative position. During the iterative process, each candidate solution corresponds to a particle; the formula for iterative calculation is:

[0035]

[0036] Where t is the number of iterations, t = 0 in the initial candidate solution, i is the block number, j is the particle number, is the position of the jth particle in the i-th block after the t-th iteration, which is the value of the newly generated candidate solution. is the particle velocity, w iis the inertia weight, pbest is the individual historical optimal solution, gbest is the group historical optimal solution, and the corresponding values ​​of pbest and gbest are in the generated The value in c i1 with c i2 is the learning factor, r1 and r2 are random numbers in the range of (0, 1), and the values ​​of r1 and r2 are different in each iterative calculation;

[0037] Step 4.3. Determine the iteration threshold T corresponding to each block according to the complexity of the original shoreline shape in the block, and stop the iteration after t = T.

[0038] For the Douglas-Peucker algorithm, the selection of the threshold is crucial to the fitting result of the coastline. The core idea of ​​the Douglas-Peucker algorithm is to recursively segment the curve. Before fitting, a certain number of points on the original curve must be taken as data points. The order of the points on the original curve is recorded as {P1, P2, ..., P m}, m is the number of data points, P1 and P m are the starting point and end point of the original curve, determine the coordinates of these data points, and then set the threshold ε. Connect P1 and P m Form a baseline and calculate the distance d from all other data points to the baseline j , j is the data point number, 2≤j≤m-1. Find the maximum deviation value d max , d max =max{d2, d3, ..., d m-1}, and record d max The corresponding data point P j , and then d max Compared with the threshold ε, if d max >ε then retain P j The original curve is divided into two segments, the starting point and end point of the first segment are P1 and P j , the starting point and end point of the latter section are P j and P m If d max If ε<ε, all data points except the starting point and the end point are discarded, and the original curve is directly fitted to connect P1 and P m If d max >ε, and then perform the above operation again on the two segments of the curve until all the retained data points become the endpoints of the line segments. The above is the complete process of fitting the original curve.

[0039] To avoid the randomness caused by the arbitrary selection of the threshold ε, ε must be taken over a large number of values, and the fitting results corresponding to each ε must be obtained. These fitting results are then compared with the original curve. The quality of the fitting results is measured by two aspects: the degree of retention of the original curve features and the simplification of the curve shape. The fitting result that retains more original curve features and has a simpler curve shape is considered to be the more superior fitting result. The degree of retention of the original curve features is quantified in the subsequent steps by the fitness value obtained by the fitness function. The smaller the threshold ε, the simpler the shape of the fitting result. Therefore, ε must be taken over a sufficient number of times for screening. The more times ε is taken over, the closer the final result obtained by the method of the present invention is to the optimal fitting result, but this greatly increases the computational complexity. Therefore, the number of particles in the particle swarm optimization algorithm, that is, the number of initial candidate solutions, must be determined based on the specific shoreline shape in the block. If the coastline is relatively straight, the number of particles can be 20 to 50. If the coastline is complex with key terrain features such as capes, the number of particles can be 80 to 100. Similarly, the position and velocity values ​​of the initial candidate solution also need to be determined according to the complexity of the coastline. For a relatively straight coastline, the value range of the particle position is [x min , x max ] can be [0.1m, 100m], for complex coastline areas [x min , x max ] can be [0.1m, 10m]; the speed range is usually determined by the position range, and the speed range is [-(x max -x min )·k,(x max -x min )-k], where k is a scaling factor, typically 0.2. To avoid missing the optimal solution, the velocity value must remain within a certain range during the iteration process. This range can be expressed as above, with k ranging from 0.1 to 0.2. Furthermore, the iteration threshold T also depends on the complexity of the coastline. For relatively straight coastlines, T ranges from 50 to 100 times, while for complex coastlines, it ranges from 100 to 200 times.

[0040] Further optimization, the specific steps for obtaining the degree of conformity in Step 5 are as follows:

[0041] Step 5.1. Establish a corresponding plane rectangular coordinate system in each block and determine the coordinates corresponding to each pixel point constituting the original coastline based on the coordinate system;

[0042] Step 5.2. As the threshold in the Douglas-Peucker algorithm, all the pixel points constituting the original shoreline are used as data points in the Douglas-Peucker algorithm, and the fitting results are obtained by the Douglas-Peucker algorithm;

[0043] Step 5.3. Use the fitness value as a measure of the degree of compliance and calculate it according to the fitness function The fitness between the corresponding fitting result and the original coastline of the block is:

[0044]

[0045] in for The corresponding fitness, α, β, γ are all weight coefficients, H i is the Hausdorff distance, assuming The distance between any data point in the corresponding fitting result and any pixel point in the original coastline is l, and the maximum value that l can take is the Hausdorff distance, R i and N i are the number of data points in the fitting results and the number of pixels in the original coastline, respectively. i is the number of lost key points, which are the pixel points that constitute the key terrain features in the original coastline. Key points that do not have the same coordinates as the data points in the fitting results are lost key points. The corresponding fitness and fitting results;

[0046] In all currently generated The one with the smallest fitness value That is gbest. If a smaller fitness value appears in the subsequent iterative calculation Then take this Replace the current gbest; in all the currently generated j The one with the smallest fitness value is the pbest corresponding to the iterative sequence, and the iterative sequence is all the same j Each iterative sequence has a corresponding pbest. In subsequent iterative calculations, if a smaller fitness value appears in the iterative sequence Then take this Replace the current pbest.

[0047] The fitness function is a function used to measure the similarity between the fitting result and the original coastline. The function mainly considers the overlap between the fitting result and the original coastline. The more similar the fitting result is to the original coastline, the better the fitness. The smaller the value, the individual historical optimal solution pbest and the group historical optimal solution gbest in the current result can be determined by calculating the fitness function, so that the candidate solutions iteratively generated by the particle swarm optimization algorithm in Step 4 gradually approach the optimal result.

[0048] For further optimization, each block takes a corresponding convergence threshold G, and the difference between gbest in the current iterative step and gbest in the previous iterative step is recorded as δ. δ is calculated after each iterative calculation. If the δ obtained by multiple consecutive calculations is less than G, it is considered that the iterative calculation has met the convergence condition, and the iterative calculation is stopped after the convergence condition is met. There are usually two termination conditions for iterative calculations, one is to reach the threshold of the number of iterations, and the other is to meet the convergence condition. In the method of the present invention, if the historical optimal solution gbest of the group remains unchanged or the change is extremely small after multiple iterations, it can be considered that the particle swarm optimization algorithm has found the optimal solution, and the iterative calculation can be stopped at this time. Under general fitting requirements, the convergence threshold G can be 0.01, and under high-precision fitting requirements, G can be 0.001. If δ is less than G for 10 consecutive times, it is considered that the convergence condition is met.

[0049] The beneficial effects of the method of the present invention are:

[0050] 1. The method of the present invention has fixed rules for selecting fitting data points, dividing the original coastline into blocks, and determining the threshold of the Douglas-Peucker algorithm, thus avoiding the interference caused by the randomness of selection and human subjectivity during manual operation;

[0051] 2. Each step of the method of the present invention has fixed rules to follow, which is simpler and more efficient than traditional fitting methods;

[0052] 3. The application of particle optimization algorithm and fitness function is more conducive to obtaining the optimal fitting results. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 Schematic diagram of the overall process of the shoreline fitting method of the present invention. DETAILED DESCRIPTION

[0054] To make the purpose, technical solution, and advantages of the method of the present invention more clear, the technical solution of the present invention will be clearly and completely described below through specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0055] Example 1:

[0056] A shoreline fitting method based on the optimized Douglas-Peucker algorithm, the overall process is as follows Figure 1 As shown, the specific steps include:

[0057] Step 1. Search the internet for public satellite image data of the area where the coastline to be fitted is located as the raw data for coastline fitting, and preprocess the raw data. The specific steps include:

[0058] Step 1.1. Access the high-resolution shoreline data (GSHHG) publicly available from the National Oceanic and Atmospheric Administration (NOAA) using a web crawler. Extract public satellite remote sensing images of the area where the shoreline to be fitted is located as the raw data for shoreline fitting.

[0059] Step 1.2. Use ENVI remote sensing image processing software to perform atmospheric correction on the raw data. The atmospheric correction is based on the FLAASH model. The FLAASH model includes an atmospheric model and an aerosol model. The atmospheric model is determined based on the time and longitude and latitude of the satellite remote sensing image. The aerosol model is set using the shortwave infrared band as the KT upper channel and the red band as the KT lower channel. Parameters such as the aerosol thickness coefficient and CO2 mixing ratio are determined based on the specific scenario.

[0060] Step 1.3. Use an adaptive median filter to denoise the raw data.

[0061] Step 2. Identify whether the pixel points in the original data correspond to water or land, and find the pixels where the identification results indicate a superposition of water and land to form the original coastline. The specific steps include:

[0062] Step 2.1. Use CNN as a tool for pixel-to-pixel region recognition. By training a large number of water and land images, the CNN acquires the ability to identify water and land features.

[0063] Step 2.2. Number all pixels in the raw data. Select any pixel in the raw data as a designated pixel. A 1×3 pixel region is selected with the designated pixel as the center. The pixels in the region are arranged vertically. All regions selected from the same remote sensing image have the same pixel arrangement. If the designated pixel is located at the upper or lower edge of the image, a 1×2 pixel region is selected.

[0064] Step 2.3. Use CNN to identify two non-adjacent pixels in the 1×3 pixel area and non-edge pixels in the 1×2 pixel area. Pixels identified as water are assigned a value of 1, while pixels identified as land are assigned a value of 0. The designated pixels are marked as identified.

[0065] Step 2.4. After completing the identification and recording, select any pixel in the raw data that is not marked as identified as the designated pixel, and then repeat Step 2.3 until all pixels in the raw data are marked as identified;

[0066] Step 2.5. Compare the two identification values ​​corresponding to each pixel in the original data to see if they are the same. Find the pixels with different identification values ​​and record their corresponding numbers.

[0067] Step 2.6. After the identification values ​​of all pixels in the original data are compared, the pixel points with recorded numbers are used as shoreline pixels, and the original shoreline is constructed through the shoreline pixels.

[0068] Step 3. Divide the original coastline into multiple segments by dividing it into blocks. The specific steps of dividing the blocks are as follows:

[0069] Step 3.1. Identify all key topographic features in the original coastline by identifying their morphological characteristics. Then, segment the original coastline. Each segmented portion is called a primitive block. Each primitive block contains one of the key topographic features, and each block is uniquely numbered.

[0070] Step 3.2. Calculate the key feature density of each original block. The key feature density is the ratio of the number of key features in each block to the length of the shoreline in that block. Then, determine a density threshold of 0.5 / km. Compare the key feature density of each block with the density threshold in order of numbering. If the key feature density of two blocks is less than the threshold and the numbers are consecutive, merge the two blocks. After all blocks have been compared, a new block sequence is generated. This new block sequence is recorded as the first block sequence, and the blocks within it are renumbered. The comparison and merging process is then repeated to form the second block sequence. This process continues until no more blocks are merged in the sequence. The sequence obtained after the last comparison and merging is recorded as the final block sequence.

[0071] Step 4. Obtain candidate solutions for the Douglas-Peucker algorithm threshold through the optimization algorithm. The specific steps are as follows:

[0072] Step 4.1. Determine the range of initial candidate solutions corresponding to each block based on the complexity of the original shoreline morphology.

[0073] Step 4.2. Randomly select a value from the range of values ​​described in Step 4.1 as the initial candidate solution, that is, the initial value of the iterative position. During the iterative process, each candidate solution corresponds to a particle; the formula for iterative calculation is:

[0074]

[0075] Where t is the number of iterations, t = 0 in the initial candidate solution, i is the block number, j is the particle number, is the position of the jth particle in the i-th block after the t-th iteration, which is the value of the newly generated candidate solution. is the particle velocity, wi is the inertia weight, pbest is the individual historical optimal solution, gbest is the group historical optimal solution, and the corresponding values ​​of pbest and gbest are in the generated The value in c i1 with c i2 is the learning factor, r1 and r2 are random numbers in the range of (0, 1), and the values ​​of r1 and r2 are different in each iterative calculation;

[0076] Step 4.3. Determine the iteration threshold T = 100 times corresponding to each block according to the complexity of the original shoreline shape in the block, and stop the iteration after t = T.

[0077] In addition, a corresponding convergence threshold G is taken for each block. In this embodiment, it is set to 0.01. The difference between gbest in the current iteration step and gbest in the previous iteration step is recorded as δ. δ is calculated after each iterative calculation. If the δ obtained from 10 consecutive calculations is less than G, it is considered that the iterative calculation has met the convergence condition, and the iterative calculation is stopped after the convergence condition is met.

[0078] Step 5. Obtain the fitting result corresponding to the candidate solution of the Douglas-Peucker algorithm threshold, compare the degree of consistency between the fitting result and the original coastline, and record it. The specific steps include:

[0079] Step 5.1. Establish a corresponding plane rectangular coordinate system in each block and determine the coordinates corresponding to each pixel point constituting the original coastline based on the coordinate system;

[0080] Step 5.2. As the threshold in the Douglas-Peucker algorithm, all the pixel points constituting the original shoreline are used as data points in the Douglas-Peucker algorithm, and the fitting results are obtained by the Douglas-Peucker algorithm;

[0081] Step 5.3. Calculate based on fitness function The fitness between the corresponding fitting result and the original coastline of the block is used as the standard to measure the degree of consistency. The formula of the fitness function is:

[0082]

[0083] in for The corresponding fitness, α, β, γ are all weight coefficients, α = 0.6, β = 0.3, γ = 0.1, H i is the Hausdorff distance, assuming The distance between any data point in the corresponding fitting result and any pixel point in the original coastline is l, and the maximum value that l can take is the Hausdorff distance, R i and N i are the number of data points in the fitting results and the number of pixels in the original coastline, respectively. i is the number of lost key points, which are the pixel points that constitute the key terrain features in the original coastline. Key points that do not have the same coordinates as the data points in the fitting results are lost key points. The corresponding fitness and fitting results;

[0084] In all currently generated The one with the smallest fitness value That is gbest. If a smaller fitness value appears in the subsequent iterative calculation Then take this Replace the current gbest; in all the currently generated j The one with the smallest fitness value is the pbest corresponding to the iterative sequence, and the iterative sequence is all the same j Each iterative sequence has a corresponding pbest. In subsequent iterative calculations, if a smaller fitness value appears in the iterative sequence Then take this Replace the current pbest.

[0085] Step 6. Find the candidate solution with the highest degree of consistency in each block as the final threshold of the Douglas-Peucker algorithm, and use the fitting result corresponding to the final threshold as the final fitting result. Then, the final fitting results of all blocks are spliced ​​together according to the corresponding block numbers to obtain the final output result.

Claims

1. A shoreline fitting method based on an optimized Douglas-Peucker algorithm, characterized in that: The specific steps include: Step 1. Obtain public satellite image data of the area where the coastline to be fitted is located as the raw data for coastline fitting, and preprocess the raw data; Step 2. Identify the pixels in the original data image and determine whether each pixel corresponds to water or land. Pixels that are identified as a superposition of water and land are selected and recorded as shoreline pixels. All shoreline pixels together constitute the original shoreline. Step 3. Divide the original coastline into multiple segments by dividing it into blocks. The specific steps are as follows: Step 3.

1. Identify all key topographic features in the original coastline by morphological characteristics, then segment the original coastline. Each segmented portion is considered a primitive block, each containing one of the key topographic features, and each primitive block is assigned a unique number. Step 3.

2. Calculate the key feature density of each original block and set a density threshold. The key feature density is the ratio of the number of key terrain features in a block to the length of the shoreline in the block. Compare the key feature density of each original block with the density threshold in the order of numbering. If the key feature density of two blocks is less than the density threshold and the numbers are continuous, merge the two blocks. After all blocks are compared and merged, a new block sequence is formed. This new block sequence is recorded as the first block sequence and the blocks in it are renumbered. Then repeat the comparison and merging process to form the second block sequence. This process is repeated until there are no more blocks in the sequence to be merged. The sequence obtained after the last comparison and merging is recorded as the final block sequence. Step 4. Use the Douglas-Peucker algorithm to fit the shoreline of each block in the final block sequence. The threshold in the algorithm is different when fitting different blocks. Use the particle swarm optimization algorithm to generate multiple values ​​as candidate solutions for the threshold corresponding to each block. Step 5. Use each candidate solution as a threshold in the Douglas-Peucker algorithm, and use the pixels in the original coastline as data points in the Douglas-Peucker algorithm. Then, use the Douglas-Peucker algorithm to obtain the corresponding fitting result. The degree of consistency between the obtained fitting result and the original coastline is compared, and each candidate solution and its corresponding degree of consistency are recorded. Step 6. Find the candidate solution with the highest degree of consistency in each block as the final threshold of the Douglas-Peucker algorithm, and use the fitting result corresponding to the final threshold as the final fitting result. Then, the final fitting results of all blocks are pieced together in the order of the corresponding block numbers to obtain the final coastline.

2. A shoreline fitting method based on an optimized Douglas-Peucker algorithm as described in claim 1, characterized in that: The specific steps of searching and preprocessing the raw data in Step 1 are as follows: Step 1.

1. Access the relevant server through a web crawler and grab the public satellite remote sensing images of the area where the coastline to be fitted is located as the raw data for coastline fitting; Step 1.

2. Use ENVI remote sensing image processing software to perform atmospheric correction on the raw data. The atmospheric correction is based on the FLAASH model. Step 1.

3. Use an adaptive median filter to denoise the raw data.

3. A shoreline fitting method based on an optimized Douglas-Peucker algorithm as described in claim 2, characterized in that: The specific steps for identifying the pixel corresponding area and constructing the original shoreline in Step 2 are as follows: Step 2.

1. Use Convolutional Neural Networks (CNN) as a tool for pixel-to-pixel type recognition. By training a large number of water and land images, the CNN acquires the ability to identify water and land features. Step 2.

2. Number all pixels in the raw data. Select any pixel in the raw data as a designated pixel. A 1×3 pixel region is selected with the designated pixel as the center. The pixels in the region are arranged horizontally or vertically. All regions selected from the same raw data have the same pixel arrangement. If the designated pixel is at the edge of the image, a 1×2 pixel region is selected. Step 2.

3. Use CNN to identify two non-adjacent pixels in the 1×3 pixel area and pixels in the 1×2 pixel area that are not located at the edge of the image. Pixels identified as water are assigned a value of 1, while pixels identified as land are assigned a value of 0. After identification, the designated pixel is marked as recognized. Step 2.

4. After completing the identification and recording, select any pixel in the raw data that is not marked as identified as the designated pixel, and then repeat Step 2.3 until all pixels in the raw data are marked as identified; Step 2.

5. Compare the two identification values ​​corresponding to each pixel in the original data to see if they are the same. Record the numbers corresponding to the pixels with different identification values. Step 2.

6. After the identification values ​​of all pixels in the original data are compared, the pixel points with recorded numbers are used as shoreline pixels to construct the original shoreline.

4. A shoreline fitting method based on an optimized Douglas-Peucker algorithm as described in claim 3, characterized in that: The specific steps for generating candidate solutions in Step 4 are: Step 4.

1. Determine the range of initial candidate solutions corresponding to each block based on the complexity of the original shoreline morphology. Step 4.

2. Randomly select a value from the range of values ​​described in Step 4.1 as the initial candidate solution, that is, the initial value of the iterative position. During the iterative process, each candidate solution corresponds to a particle; the formula for iterative calculation is: Where t is the number of iterations, t = 0 in the initial candidate solution, i is the block number, j is the particle number, is the position of the jth particle in the i-th block after the t-th iteration, which is the value of the newly generated candidate solution. is the particle velocity, w i is the inertia weight, pbest is the individual historical optimal solution, gbest is the group historical optimal solution, and the corresponding values ​​of pbest and gbest are in the generated The value in c i1 with c i2 is the learning factor, r1 and r2 are random numbers in the range of (0, 1), and the values ​​of r1 and r2 are different in each iterative calculation; Step 4.

3. Determine the iteration threshold T corresponding to each block according to the complexity of the original shoreline shape in the block, and stop the iteration after t = T.

5. A shoreline fitting method based on an optimized Douglas-Peucker algorithm as described in claim 4, characterized in that: The specific steps for determining the degree of conformity in Step 5 are as follows: Step 5.

1. Establish a corresponding plane rectangular coordinate system in each block and determine the coordinates corresponding to each pixel point constituting the original coastline based on the coordinate system; Step 5.

2. As the threshold in the Douglas-Peucker algorithm, all the pixel points constituting the original shoreline are used as data points in the Douglas-Peucker algorithm, and the fitting results are obtained by the Douglas-Peucker algorithm; Step 5.

3. Calculate based on fitness function The fitness between the corresponding fitting result and the original coastline of the block is used as the standard to measure the degree of consistency; the formula of the fitness function is: in for The corresponding fitness, α, β, γ are all weight coefficients, H i is the Hausdorff distance, assuming The distance between any data point in the corresponding fitting result and any pixel point in the original coastline is l, and the maximum value that l can take is the Hausdorff distance, R i and N i are the number of data points in the fitting results and the number of pixels in the original coastline, respectively. i is the number of lost key points, which are the pixel points that constitute the key terrain features in the original coastline. Key points that do not have the same coordinates as the data points in the fitting results are lost key points. The corresponding fitness and fitting results; In all currently generated The one with the smallest fitness value That is gbest. If a smaller fitness value appears in the subsequent iterative calculation Then take this Replace the current gbest; in all the currently generated j The one with the smallest fitness value is the pbest corresponding to the iterative sequence, and the iterative sequence is all the same j Each iterative sequence has a corresponding pbest. In subsequent iterative calculations, if a smaller fitness value appears in the iterative sequence Then take this Replace the current pbest.

6. A shoreline fitting method based on an optimized Douglas-Peucker algorithm as claimed in claim 5, characterized in that: Each block takes a corresponding convergence threshold G, and the difference between gbest in the current iteration step and gbest in the previous iteration step is recorded as δ. δ is calculated after each iteration. If the δ obtained from multiple consecutive calculations is less than G, it is considered that the iterative calculation has met the convergence condition, and the iterative calculation is stopped after the convergence condition is met.

Citation Information

Patent Citations

  • A data fusion method and system for nautical charts and land charts

    CN118568668B

  • Grid processing method for improving efficiency and stability of ocean numerical forecasting model

    CN118886368A

  • Unmanned ship positioning method and berth selection method based on high-precision semantic map

    CN119205912A

  • Automatic detection of sea floating objects from satellite imagery

    US20240013531A1

  • Sea-land segmentation method and system for large-size remote-sensing image

    WO2017071160A1