Vector network discretization method based on scanning line algorithm

Through the improved scanning line algorithm and vector encryption method, the efficient and precise discretization of vector data in remote sensing satellite imaging is solved, effective processing of complex polygons and nested structures is achieved, and the coverage efficiency and accuracy of remote sensing satellite imaging is improved.

CN120495572APending Publication Date: 2025-08-15CHANGGUANG SATELLITE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510542909.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the existing remote sensing satellite imaging technology, traditional methods have low computational efficiency and insufficient accuracy, making it difficult to process complex polygons and vector data containing holes and nested structures, resulting in difficulty in discretization of grids.

Method used

The improved scanning line algorithm is used to scan the polygon vectors step by step, generate an internal point matrix, and ensure that the vector area is completely covered through mesh extension and vector encryption, which increases the details of complex polygons and small-scale vectors.

Benefits of technology

It realizes efficient and precise discretization of vector data, can quickly cover large-area targets, is highly adaptable, and can process vector data containing holes and nested structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495572A_ABST
    Figure CN120495572A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of remote sensing satellite imaging, in particular to a vector network discretization method based on a scanning line algorithm, which comprises the following steps: acquiring a vector file, and converting vector data in the vector file into a polygon vector; carrying out line-by-line scanning processing on the polygon vector by adopting an improved scanning line algorithm until the edge table ET and the activated edge table AEL are empty, and obtaining an internal point matrix; performing grid expansion based on the internal point matrix so that the whole vector area is covered by grids; and the grid matrix is updated based on vector encryption through the vector encryption external expansion grid. A scanning line algorithm is introduced, a traditional pixel-by-pixel traversal method is improved into a line-by-line or column-by-column scanning method, and the time complexity is reduced. In addition, an improved scanning line algorithm is adopted, so that the improved scanning line algorithm can process vector data containing holes and nested structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of remote sensing satellite imaging, and in particular to a vector network discretization method based on a scan line algorithm. Background Art

[0002] The coverage process of a remote sensing constellation aims to select the optimal imaging opportunities from satellite resources, enabling them to efficiently acquire images of the area to be covered while meeting various constraints. During the remote sensing satellite imaging process, vector data must be converted into regular grid data to adapt to different satellite sensors. Traditional methods have the following shortcomings: (1) Low computational efficiency: Pixel-by-pixel traversal methods such as the ray method and seed filling method generally have high time complexity and are difficult to complete the grid discretization of complex vectors within a reasonable time.

[0003] (2) Insufficient precision: Details are easily lost in complex polygons or small-scale vectors.

[0004] (3) Poor adaptability: It is difficult to process vector data containing holes and nested structures.

[0005] Based on this, those skilled in the art urgently need to provide a new method for discretizing vector grids that can achieve high efficiency and high precision. Summary of the Invention

[0006] Therefore, the technical problem to be solved by the present invention is to overcome the defects existing in the above-mentioned prior art, thereby providing a vector network discretization method based on a scan line algorithm.

[0007] A vector network discretization method based on a scan line algorithm, comprising: Obtain a vector file and convert the vector data in the vector file into polygon vectors; The improved scan line algorithm is used to scan the polygon vector line by line until the edge table ET and the activated edge table AEL are empty, and the internal point matrix is obtained. Expand the grid based on the internal point matrix so that the entire vector area is covered by the grid; Expand the grid through vector encryption and update the grid matrix based on the vector encryption.

[0008] Preferably, an improved scan line algorithm is used to scan the polygon vector line by line until the edge table ET and the activated edge table AEL are empty, thereby obtaining the internal point matrix of the polygon vector. The specific improved scan line algorithm processing flow includes the following steps: Initialize the edge table ET and the activated edge table AEL, and determine whether both the edge table ET and the activated edge table AEL are empty; if so, obtain the internal point matrix of the polygon vector; If not, there are two results: only the edge table ET is not empty and only the activated edge table AEL is not empty. Based on this loop, the following steps are executed until the edge table ET and the activated edge table AEL are empty: a) If the edge table ET is not empty, all edges in the edge table ET are taken out and inserted into the activation edge table AEL; b) If the activation edge list AEL is not empty, pair the edges in the activation edge list AEL in order; c) Delete the active edge table AEL that satisfies y 扫 =y 扫max The side of y 扫max Indicates the Y-axis coordinate value of the highest Y-axis scan line intersecting the edge; y 扫 is the Y-axis coordinate value of the scan line; d) Update the edges in the activation edge table AEL; e) Let y 扫 =y 扫 +1, the scan line moves up one line.

[0009] Preferably, the grid expansion is performed based on the internal point matrix, specifically comprising the following steps: Initialize the grid matrix: First initialize an empty cell matrix. Each element of the empty cell matrix represents whether the corresponding cell contains a vector area. Initially, the values of all cells are 0. Marking internal points: Obtain the internal point matrix through line scanning algorithm; Expansion operation: Assign the values of the four cells with the positions of 1 in the internal point matrix as vertices to 1.

[0010] Preferably, the grid is expanded by vector encryption, and the grid matrix is updated based on the vector encryption, specifically comprising the following steps: For each edge of the vector data, linear interpolation is performed based on the coordinates of the starting point and end point of the edge; Update the internal point matrix according to the position of the interpolation point of linear interpolation in the overall grid: for each interpolation point, assign the corresponding cell position to 1.

[0011] Preferably, the expression of linear interpolation is: ; ; Among them, t is a parameter ranging from 0 to 1, indicating the ratio from the starting point to the end point. The smaller the step size, the denser the generated points. (x1, y1) and (x2, y2) represent a pair of known starting and end points of the edge. (x, y) represents the interpolation point.

[0012] Preferably, the process of performing line-by-line scanning on polygon vectors using the improved scan line algorithm further includes: When the vertex of a singular point is a local extreme point: adjust the Y-axis coordinates of the endpoints of the two adjacent edges of the local extreme point so that the Y-axis coordinate of one of the edges is shortened to the Y-axis coordinate minus 1, and the starting point of the other edge remains at the original Y-axis coordinate; When the vertex in the singular point is on the horizontal edge: merge the horizontal edges into a single edge and skip the middle vertex; Insert the adjusted edge information into the edge table ET. Based on the updated edge table ET, generate the activation edge table AEL in the order of scan lines from bottom to top, calculate the intersection of scan lines and polygon vectors, and complete the filling of polygon vectors according to the odd-even rule.

[0013] The technical solution of the present invention has the following advantages: The present invention is used to efficiently and accurately discretize vector data to be captured into grid data, thereby supporting remote sensing satellites in rapidly covering large-area targets. The present invention introduces a scanline algorithm, improving the traditional pixel-by-pixel traversal method to a row-by-row or column-by-column scanning method, thereby reducing time complexity. Furthermore, the present invention utilizes an improved scanline algorithm, enabling it to process vector data containing holes and nested structures. Furthermore, the present invention adds a vector encryption process to the vector discretization process, thereby avoiding the loss of details in complex polygons and small-scale vectors. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0015] Figure 1 This is an overall flow chart of the vector grid discretization method based on the scan line algorithm of the present invention; Figure 2 Schematic diagram of the edge table ET of the present invention; Figure 3 This is a schematic diagram of the activation edge table AEL of the present invention; Figure 4 Schematic diagram of the singular point of the present invention. DETAILED DESCRIPTION

[0016] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0017] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0018] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0019] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0020] Example 1 like Figure 1 A vector network discretization method based on a scan line algorithm, comprising: Obtain a vector file and convert the vector data in the vector file into polygon vectors; The improved scan line algorithm is used to scan the polygon vector line by line until the edge table ET and the activated edge table AEL are empty, and the internal point matrix is obtained. Expand the grid based on the internal point matrix so that the entire vector area is covered by the grid; Expand the grid through vector encryption and update the grid matrix based on the vector encryption.

[0021] Among them, the improved scan line algorithm is used to scan the polygon vector line by line until the edge table ET and the activated edge table AEL are empty, and the internal point matrix of the polygon vector is obtained. The specific improved scan line algorithm processing flow includes the following steps: Determine whether both the edge table ET and the activated edge table AEL are empty; if so, obtain the internal point matrix of the polygon vector; If not, there are two results: only the edge table ET is not empty and only the activated edge table AEL is not empty. Based on this loop, the following steps are executed until the edge table ET and the activated edge table AEL are empty: a) If the edge table ET is not empty, all edges in the edge table ET are taken out and inserted into the activation edge table AEL; b) If the activation edge list AEL is not empty, pair the edges in the activation edge list AEL in order; c) Delete the active edge table AEL that satisfies the formula y 扫 =y 扫max The side of y 扫max Indicates the Y-axis coordinate value of the highest Y-axis scan line intersecting the edge; y 扫 is the Y-axis coordinate value of the scan line; d) Update the edges in the activation edge table AEL; e) Let y 扫 =y 扫 +1, the scan line moves up one line.

[0022] Specifically: (1) Vector network discretization process based on the scan line algorithm: In this implementation, a scanline algorithm is used in conjunction with the edge table (ET) and the activated edge table (AEL) to grid vector data. This overall approach is widely applicable to the discretization of two-dimensional polygons and is suitable for rasterization of graphics and digitization of geographic information. By scanning the boundary information of vector data line by line and combining the data structures of the edge table (ET) and the activated edge table (AEL), efficient gridding can be achieved.

[0023] First, prepare the vector data, such as Figure 2 This vector data is typically represented by multiple closed polygons, each consisting of an ordered series of vertices and edges connecting them. Each edge has a start and end point. The high precision of vector data allows it to accurately represent base maps or area boundaries, but in order to process it in a computer, it must be converted into a gridded data format.

[0024] The core idea of the scanline algorithm is to simulate a horizontal scanline, starting from the bottom edge of the polygon and scanning each horizontal position line by line. By using the edge table ET and the activated edge table AEL to manage all edges intersecting the scanline, the scanline algorithm can efficiently calculate the internal point matrix of the vector data.

[0025] The scan line algorithm processing flow specifically includes the following steps: 1) Initialize and build the edge table ET: like Figure 3 As shown, the edge table ET is a data structure used to store information about all graph edges. The information stored in the edge table ET for each edge generally includes: The X-coordinate of the edge's starting point.

[0026] The slope of the edge, dy / dx, is used to calculate the intersection point.

[0027] The Y-coordinate of the edge's endpoint.

[0028] Each edge table entry represents an edge that intersects the scan line, and the edge table ET is sorted by the Y-axis coordinate of the starting point of the edge.

[0029] 2) Initialize the activation edge table AEL: like Figure 4 As shown, the active edge list (AEL) is used to store the edges that currently intersect the scan line. Initially, the active edge list (AEL) is empty. At the beginning of the scan line algorithm, the scan line is located at the bottom of the polygon, and the active edge list (AEL) contains edges whose starting Y-axis coordinates are less than or equal to the scan line position.

[0030] 3) Scan line processing: The scan line starts at the bottom of the polygon and moves up row by row, processing one scan line at a time. During the processing of each row, the following steps are performed: 101. Update the activation edge list AEL: At each scan line position, first select all edges from the edge table ET whose starting Y-axis coordinate is less than or equal to the scan line position and add these edges to the active edge table AEL. For each edge, calculate the intersection point with the current scan line. The intersection point position is the Y-axis coordinate calculated by linear interpolation.

[0031] 102. Delete the edges beyond the scan line: If the Y-axis coordinates of the endpoints of some edges in the active edge list AEL are smaller than the Y-axis coordinates of the current scan line, these edges will no longer participate in the scan and will be deleted from the active edge list AEL.

[0032] 103. Update intersection sorting: For all edges in the activation edge table AEL that still intersect with the scan line, sort them according to the Y-axis coordinate size of the intersection point.

[0033] 104 Determine the interior points: The sorted intersection points are paired up, and the matrix values corresponding to the points in each pair of intersection intervals are assigned a value of 1, and the rest are 0.

[0034] 4) Edge table update and next row processing: After the scan line moves up one row, the activated edge table AEL is updated, the intersection point is recalculated, and scanning continues until the scan line traverses the entire area.

[0035] (2) Grid expansion process: The mesh expansion process is the result of meshing based on the scanline algorithm and is an important step in further expanding the mesh coverage. The goal is to ensure that all vector areas are covered by the mesh, especially those near vector boundaries. Expansion ensures that vector areas near the vector boundaries are also correctly included in the mesh coverage.

[0036] In the actual gridding process using the scanline algorithm, a set of grid points is obtained. These grid points are completely located in the interior or boundary area of the vector, representing the outline and interior area of the vector. However, the rasterization of the vector requires finding the cell matrix G that contains all the cell areas of the vector.

[0037] To this end, the grid is expanded based on the internal point matrix, which specifically includes the following steps: Initialize the grid matrix: First initialize an empty cell matrix. Each element of the empty cell matrix represents whether the corresponding cell contains a vector area. Initially, the values of all cells are 0. Marking internal points: Obtain the internal point matrix through line scanning algorithm; Expansion operation: Assign the matrix values of the four cells with the positions of 1 in the internal point matrix as vertices to 1.

[0038] (3) Vector encryption process: The purpose of the vector densification process is to convert slender or small vectors into a denser point cloud through linear interpolation, thereby reducing the errors caused by vectors being too small or slender to be accurately captured by the scanning line algorithm.

[0039] For each edge of the vector data, linear interpolation is first performed based on the coordinates of the starting and ending points of the edge. The purpose of linear interpolation is to generate more discrete points between two points. For each pair of endpoints (x1, y1) and (x2, y2) of each edge, the interpolation formula is used to interpolate each edge of the vector data according to the pre-set step size; the linear interpolation expression is: ; ; Where t is a parameter ranging from 0 to 1, representing the ratio from the starting point to the end point. A smaller step size results in a denser distribution of points. (x1, y1) and (x2, y2) represent a pair of known starting and ending points for each edge; (x, y) represents the interpolation point.

[0040] Update the internal point matrix according to the position of the interpolation point of linear interpolation in the overall grid: for each interpolation point, assign the corresponding cell position to 1, and when the cell position is assigned to 1, the point is considered to be filled.

[0041] (IV) Singularity processing: In the scan-line algorithm, the key to handling singular points lies in avoiding incorrect intersection counting of the scan line due to vertices being local extreme points: maxima or minima. The following is the specific processing procedure for the y-value relationship among three consecutive points, taking a polygon with 8 points as an example as shown in Figure 4 below: Let three consecutive vertices be (X1, Y1), (X2, Y2) and (X3, Y3). It is necessary to determine whether (X2, Y2) is an extreme point: Local maximum: If Y2 > Y1 and Y2 > Y3, as shown in Figure 4 midpoint 3; Local minimum: If Y2 < Y1 and Y2 < Y3, as shown in Figure 4 midpoint 4; When the above conditions are met, (X2, Y2) is a singular point and requires special processing.

[0042] For singular points where the vertex is a local extreme point: Adjust the Y-axis coordinates of the endpoints of the two adjacent sides of the local extreme point so that the Y-axis coordinate of the end point of one side is shortened to the Y-axis coordinate minus 1, and the starting point of the other side remains the original Y-axis coordinate; As shown in Figure 4 midpoint 6, for singular points where the vertex is on a horizontal side: If there is a horizontal side among three consecutive points, satisfying Y1 = Y2 = Y3, merge the horizontal sides into a single side and skip the middle vertex.

[0043] Insert the information of the adjusted sides into the edge table ET. Based on the updated edge table ET, generate the active edge table AEL in the order of the scan line from bottom to top, calculate the intersections of the scan line and the polygon vector, and complete the filling of the polygon vector according to the parity rule.

[0044] (V) Comparative verification To further disclose the practicality of the method of this embodiment, the method of this embodiment is selected to be compared with the point-by-point judgment method: the ray method. The vector data is selected as the vector of the same area, and the discrete sizes are 0.1° and 0.05° respectively. The comparison results are shown in the following table:

[0045] Obviously, the above embodiments are merely examples given for clear illustration and are not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. And the obvious changes or modifications derived therefrom are still within the protection scope of this invention.

Claims

1. A vector network discretization method based on a scan line algorithm, characterized in that: include: Obtain a vector file and convert the vector data in the vector file into polygon vectors; The improved scan line algorithm is used to scan the polygon vector line by line until the edge table ET and the activated edge table AEL are empty, and the internal point matrix is obtained. Expand the grid based on the internal point matrix so that the entire vector area is covered by the grid; Expand the grid through vector encryption and update the grid matrix based on the vector encryption.

2. A vector network discretization method based on a scan line algorithm according to claim 1, characterized in that: The improved scan line algorithm is used to scan the polygon vector line by line until the edge table ET and the activated edge table AEL are empty, and the internal point matrix of the polygon vector is obtained. The specific improved scan line algorithm processing flow includes the following steps: Initialize the edge table ET and the activated edge table AEL, and determine whether both the edge table ET and the activated edge table AEL are empty; if so, obtain the internal point matrix of the polygon vector; If not, there are two results: only the edge table ET is not empty and only the activated edge table AEL is not empty. Based on this loop, the following steps are executed until the edge table ET and the activated edge table AEL are empty: a) If the edge table ET is not empty, all edges in the edge table ET are taken out and inserted into the activation edge table AEL; b) If the activation edge list AEL is not empty, pair the edges in the activation edge list AEL in order; c) Delete the active edge table AEL that satisfies y 扫 =y 扫max The side of y 扫max Indicates the Y-axis coordinate value of the highest Y-axis scan line intersecting the edge; y 扫 is the Y-axis coordinate value of the scan line; d) Update the edges in the activation edge table AEL; e) Let y 扫 =y 扫 +1, the scan line moves up one line.

3. The vector network discretization method based on the scan line algorithm according to claim 1, characterized in that: Expanding the grid based on the internal point matrix includes the following steps: Initialize the grid matrix: First initialize an empty cell matrix. Each element of the empty cell matrix represents whether the corresponding cell contains a vector area. Initially, the values of all cells are 0. Marking internal points: Obtain the internal point matrix through line scanning algorithm; Expansion operation: Assign the values of the four cells with the positions of 1 in the internal point matrix as vertices to 1.

4. The vector network discretization method based on the scan line algorithm according to claim 1, characterized in that: Expand the grid by vector encryption and update the grid matrix based on vector encryption. Specifically, the following steps are included: For each edge of the vector data, linear interpolation is performed based on the coordinates of the starting point and end point of the edge; Update the internal point matrix according to the position of the interpolation point of linear interpolation in the overall grid: for each interpolation point, assign the corresponding cell position to 1.

5. The vector network discretization method based on the scan line algorithm according to claim 4 is characterized in that: The expression of linear interpolation is: ; ; Among them, t is a parameter ranging from 0 to 1, indicating the ratio from the starting point to the end point. The smaller the step size, the denser the generated points. (x1, y1) and (x2, y2) represent a pair of known starting and end points of the edge. (x, y) represents the interpolation point.

6. The vector network discretization method based on the scan line algorithm according to claim 1, characterized in that: The improved scan line algorithm is used to scan polygon vectors line by line, which also includes: When the vertex of a singular point is a local extreme point: adjust the Y-axis coordinates of the endpoints of the two adjacent edges of the local extreme point so that the Y-axis coordinate of one of the edges is shortened to the Y-axis coordinate minus 1, and the starting point of the other edge remains at the original Y-axis coordinate; When the vertex in the singular point is on the horizontal edge: merge the horizontal edges into a single edge and skip the middle vertex; Insert the adjusted edge information into the edge table ET. Based on the updated edge table ET, generate the activation edge table AEL in the order of scan lines from bottom to top, calculate the intersection of scan lines and polygon vectors, and complete the filling of polygon vectors according to the odd-even rule.