A method and device for merging geometric objects, electronic equipment, and storage medium
Through the geometric object out-expanding intersecting processing and subsequent supplementary processing, the problems of low processing efficiency, discontinuity of results and accumulation of errors in the geometric object merging method are solved, and efficient and accurate geometric object merging is achieved.
Patent Information
- Application Number
- CN202411817716.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-08
AI Technical Summary
The existing geometric object merging method has low processing efficiency, discontinuous merge results and error accumulation.
The second geometric object set and the third geometric object set that are suspected to have leftover gaps are obtained through the out-expanding intersecting process, and the third geometric object set is subsequently out-expanded intersecting process to update the second geometric object set and finally obtain the merged outer contour.
It significantly improves processing efficiency, reduces the consumption of computing resources, ensures the continuity and integrity of the merged results, and avoids error accumulation.
Smart Images

Figure CN119784895A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of spatial data processing technology, and in particular to a method and device for merging geometric objects, an electronic device, and a storage medium. Background Art
[0002] In Geographic Information Systems (GIS), geometric objects refer to data structures used to represent locations and shapes in the real world. These objects are usually used to store, process, and analyze geographic spatial data. Geometric objects can be two-dimensional or three-dimensional. They can be points, lines, surfaces, a collection of multiple points, a collection of multiple lines, a collection of multiple polygons, or a collection containing any of the above types of geometric objects. Geometric objects contain not only geometric information, but also attribute information related to them.
[0003] With the rapid development of geographic information systems and remote sensing technology, the merging and processing of geometric objects has become an important task in geographic information processing. In applications such as land planning, urban management, and environmental monitoring, it is often necessary to merge multiple geometric objects to generate a larger and more coherent area.
[0004] Traditional geometric object merging methods usually process geometric object sets through simple Boolean operations (such as union, intersection, difference, etc.). This processing method often leads to the following problems: (1) Low processing efficiency. When the number of geometric objects is large or the shapes are complex, traditional Boolean operation methods require a lot of computing resources and time, resulting in low processing efficiency; (2) Discontinuous merging results. During the merging process, gaps or discontinuous areas are easily generated between geometric objects, resulting in incomplete merging results; (3) Error accumulation. Due to the limitation of floating-point calculation accuracy and the superposition of multiple Boolean operations, the merging results may have accumulated errors, affecting the accuracy of the final geometric objects. Summary of the invention
[0005] In view of the above defects in the prior art, the present invention provides a method and device for merging geometric objects, an electronic device, and a storage medium to solve the technical problems of low processing efficiency, discontinuous merging results, and error accumulation in the existing merging methods.
[0006] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for merging geometric objects, including: obtaining input data to be processed to obtain a first geometric object set, wherein the first geometric object set includes a plurality of first geometric objects; traversing the first geometric objects in the first geometric object set, obtaining a second geometric object set and a third geometric object set with suspected residual gaps through outward expansion intersection processing; performing outward expansion intersection processing on the third geometric object set to update the second geometric object set; and obtaining a merged outer contour based on the updated second geometric object set.
[0007] In one embodiment of the present invention, the first geometric objects in the first geometric object set are traversed, and a second geometric object set and a third geometric object set with suspected residual gaps are obtained through an outward expansion intersection process, including: constructing a third geometric object set and setting it to empty; traversing the first geometric objects in the first geometric object set, and obtaining a list of second geometric objects corresponding to each of the first geometric objects through an outward expansion intersection process, and adding geometric objects with suspected residual gaps to the third geometric object set during the outward expansion intersection process; and obtaining the second geometric object set based on the list of second geometric objects corresponding to all the first geometric objects.
[0008] In one embodiment of the present invention, the first geometric objects in the first geometric object set are traversed, and a list of second geometric objects corresponding to each of the first geometric objects is obtained through an outward expansion intersection process, and when the outward expansion intersection process is performed, geometric objects that are suspected of having residual gaps are added to the third geometric object set, including: constructing a fourth geometric object and initializing it to the first geometric object currently traversed; performing an outward expansion process on the first geometric object currently traversed to obtain a fifth geometric object; obtaining a geometric object that intersects with the fifth geometric object to obtain a sixth geometric object set; traversing the sixth geometric objects in the sixth geometric object set to obtain a second geometric object corresponding to each of the sixth geometric objects, and updating the fourth geometric object and the third geometric object set during traversal; obtaining a list of second geometric objects based on the second geometric objects corresponding to all the sixth geometric objects.
[0009] In one embodiment of the present invention, the sixth geometric objects in the sixth geometric object set are traversed in clockwise order.
[0010] In one embodiment of the present invention, the sixth geometric object in the sixth geometric object set is traversed to obtain the second geometric object corresponding to each of the sixth geometric objects, and the fourth geometric object and the third geometric object set are updated during the traversal, including: merging the fourth geometric object with the currently traversed sixth geometric object to obtain a seventh geometric object; creating an external polygon based on the seventh geometric object; obtaining the second geometric object corresponding to each of the sixth geometric objects based on the external polygon and the fourth geometric object, and updating the third geometric object set during the traversal; updating the fourth geometric object to the external polygon.
[0011] In one embodiment of the present invention, based on the external polygon and the fourth geometric object, a second geometric object corresponding to each of the sixth geometric objects is obtained, and the third geometric object set is updated during traversal, including: calculating the difference between the external polygon and the fourth geometric object to obtain an eighth geometric object; based on the eighth geometric object and the sixth geometric object, obtaining the second geometric object corresponding to the currently traversed sixth geometric object, and updating the third geometric object set during traversal.
[0012] In one embodiment of the present invention, based on the eighth geometric object and the sixth geometric object, the second geometric object corresponding to the currently traversed sixth geometric object is obtained, and the third geometric object set is updated during the traversal, including: determining whether the eighth geometric object is empty: if so, taking the currently traversed sixth geometric object as its corresponding second geometric object and adding it to the third geometric object set; if not, obtaining the second geometric object and updating the third geometric object set based on the area ratio of the eighth geometric object to the currently traversed sixth geometric object.
[0013] In one embodiment of the present invention, the second geometric object is obtained and the third geometric object set is updated based on the area ratio of the eighth geometric object to the sixth geometric object currently traversed, including: determining whether the area ratio of the eighth geometric object to the sixth geometric object currently traversed is greater than a preset value: if so, taking the sixth geometric object currently traversed as its corresponding second geometric object and adding it to the third geometric object set; if not, taking the eighth geometric object as the second geometric object corresponding to the sixth geometric object currently traversed.
[0014] In one embodiment of the present invention, the third set of geometric objects is subjected to an outward expansion intersection process to update the second set of geometric objects, including: traversing the eighth geometric object in the third set of geometric objects, and performing an outward expansion intersection process in the same steps as traversing the first geometric object to update the second set of geometric objects; wherein, during the outward expansion intersection process, intersection is performed with the second geometric object in the second set of geometric objects.
[0015] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a device for merging geometric objects, including: a data acquisition unit, used to acquire input data to be processed, and obtain a first geometric object set, wherein the first geometric object set includes a plurality of first geometric objects; a first processing unit, used to traverse the first geometric objects in the first geometric object set, and obtain a second geometric object set and a third geometric object set with suspected residual gaps through outward expansion intersection processing; a second processing unit, used to perform outward expansion intersection processing on the third geometric object set to update the second geometric object set; and a third processing unit, used to obtain a merged outer contour based on the updated second geometric object set.
[0016] To achieve the above-mentioned purpose and other related purposes, the present invention also provides an electronic device, including a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement a method provided in any one of the above embodiments.
[0017] To achieve the above object and other related objects, the present invention further provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is used to enable a computer to execute the method provided in any one of the above embodiments.
[0018] Beneficial effects of the present invention: The present invention proposes a method and device for merging geometric objects, an electronic device, and a storage medium. The method significantly improves processing efficiency and reduces the consumption of computing resources by means of external expansion and intersection processing of geometric objects. It also records and tracks the gap problems generated in the process of merging geometric objects, and performs supplementary processing on them in subsequent steps, ensuring that the final merging result is continuous and complete, thereby achieving efficient and accurate merging of intersecting or adjacent geometric objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of a method for merging geometric objects provided by an embodiment of the present invention;
[0021] Figure 2 A detailed flow chart of step S200 provided in one embodiment of the present invention;
[0022] Figure 3 A detailed flow chart of step S220 provided for one embodiment of the present invention;
[0023] Figure 4 A detailed flow chart of step S224 provided for one embodiment of the present invention;
[0024] Figure 5 A detailed flow chart of step S2243 provided for one embodiment of the present invention;
[0025] Figure 6 A schematic diagram of a device for merging geometric objects provided by an embodiment of the present invention;
[0026] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0027] Explanation of the reference numerals: 101, data acquisition unit; 102, first processing unit; 103, second processing unit; 104, third processing unit; 201, processor; 202, memory. DETAILED DESCRIPTION
[0028] The following describes the embodiments of the present invention through specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. It should be noted that the following embodiments and the features in the embodiments can be combined with each other without conflict. In addition to the specific methods, equipment, and materials used in the embodiments, according to the technical personnel in this technical field's grasp of the prior art and the records of the present invention, any methods, equipment, and materials of the prior art that are similar or equivalent to the methods, equipment, and materials described in the embodiments of the present invention can also be used to implement the present invention.
[0029] It should be understood that the terms used in the embodiments of the present invention are for describing specific embodiments rather than for limiting the scope of protection of the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those generally understood by those skilled in the art.
[0030] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In some of the embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0031] The flowchart and block diagram in the accompanying drawings illustrate the system architecture, functions and operations that may be implemented according to the methods and computer program products of various embodiments disclosed in the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0032] In the background technology, the definition of geometric objects has been explained in detail, and it is particularly pointed out that a set of geometric objects of any type mentioned above can also be called a geometric object. In the present invention, in order to handle the hierarchical relationship of objects, multiple concepts such as geometric objects, geometric object lists and geometric object sets are introduced, but in fact, they can all be regarded as geometric objects. The reason for using different names is to reflect the hierarchical relationship of the results obtained by traversal.
[0033] See also Figure 1 , Figure 1 A method for merging geometric objects provided in one embodiment of the present invention includes steps S100 to S400.
[0034] Step S100: Obtain input data to be processed and obtain a first geometric object set, wherein the first geometric object set includes a plurality of first geometric objects. The input data to be processed refers to the original data set to be subjected to spatial analysis or geometric operation, and these original data sets may come from different data sources, such as land planning maps, environmental monitoring data, urban infrastructure layout, etc. These input data can be processed into a first geometric object set. This step is equivalent to preprocessing the data.
[0035] Step S200, traverse the first geometric object in the first geometric object set, and obtain the second geometric object set and the third geometric object set with suspected residual gaps through the external expansion intersection process. In this step, the second geometric object set is obtained through the external expansion intersection process, so as to obtain the outer contour based on the second geometric object set. At the same time, the geometric objects with suspected residual gaps are recorded and tracked during the processing to obtain the third geometric object set. Therefore, the third geometric object set can be supplemented in the subsequent step S300 to ensure that the final processing result is complete.
[0036] See also Figure 2 In a specific embodiment of the present invention, step S200 includes steps S210 to S230.
[0037] Step S210: construct a third geometric object set and set it to empty. The third geometric object set is mainly used to record geometric objects that are suspected to have residual gaps, so it is first created and set to empty.
[0038] Step S220: traverse the first geometric objects in the first geometric object set, obtain a list of second geometric objects corresponding to each first geometric object through outward expansion intersection processing, and add the geometric objects suspected of having residual gaps to the third geometric object set during the outward expansion intersection processing. Step S230: obtain a second geometric object set based on the second geometric object lists corresponding to all first geometric objects. In this embodiment, the concept of a second geometric object list is introduced. When traversing the first geometric objects, a second geometric object list can be obtained after processing each first geometric object. The second geometric object lists corresponding to all first geometric objects together constitute a second geometric object set.
[0039] See also Figure 3 In a specific embodiment of the present invention, step S220 includes steps S221 to S225.
[0040] Step S221: construct a fourth geometric object and initialize it as the first geometric object currently traversed. The fourth geometric object is an intermediate variable when performing an outward expansion intersection process. In this step, after being created, it is first initialized as the first geometric object currently traversed.
[0041] Step S222: Perform an expansion process on the first geometric object currently traversed to obtain a fifth geometric object. The expansion process of a geometric object, usually called a buffer operation, is a spatial analysis technique performed on a geometric object in a geographic information system. This operation involves creating an area of a specified distance around the boundary of the geometric object. This area is usually a surface that includes all points within a certain range around the original geometric object.
[0042] Step S223: Get the geometric objects that intersect with the fifth geometric object to obtain a sixth geometric object set. In the first geometric object set, in addition to the currently traversed first geometric object, there are many other geometric objects, some of which intersect with the fifth geometric object. In this step, all these intersecting geometric objects are obtained to obtain a sixth geometric object set.
[0043] Step S224, traverse the sixth geometric objects in the sixth geometric object set, obtain the second geometric objects corresponding to each sixth geometric object, and update the fourth geometric object and the third geometric object set during the traversal; Step S225, obtain a second geometric object list based on the second geometric objects corresponding to all sixth geometric objects. In this step, it is equivalent to obtaining a second geometric object for each traversal of a sixth geometric object. After completing the traversal of all sixth geometric objects, a second geometric object list is obtained. After completing the traversal of the first geometric object, a second geometric object set is naturally obtained. The reason why the second geometric object has a three-layer structure is that two traversal operations are involved during the processing. The update of the fourth geometric object and the third set object set is also mainly implemented in this step, that is, it is executed when traversing the sixth geometric object.
[0044] In a specific embodiment of the present invention, the sixth geometric object in the sixth geometric object set is traversed in clockwise order. There are multiple sixth geometric objects intersecting with the fifth geometric object, which are generally around the fifth geometric object. When executing step S224, the sixth geometric objects can be traversed in any order. If the sixth geometric objects are sorted clockwise and then traversed, the number of third geometric objects suspected of having residual gaps can be greatly reduced, which simplifies the processing flow of step S300, can significantly improve processing efficiency, and reduce the consumption of computing resources.
[0045] See also Figure 4 In a specific embodiment of the present invention, step S224 includes steps S2241 to S2244.
[0046] Step S2241: merge the fourth geometric object with the sixth geometric object currently traversed to obtain a seventh geometric object. The main purpose of merging geometric objects is to combine multiple geometric objects (such as polygons, lines or points) into a larger geometric object, usually to simplify data, eliminate overlapping areas or prepare data for further analysis.
[0047] It can be understood that when processing is performed in a certain order (for example, traversing in a clockwise direction), omissions generally do not occur. If processing is not performed in order, the following judgment can be added before executing step S2241: determine whether the sixth geometric object currently traversed has been processed: if yes, skip it; if not, execute step S2241.
[0048] Step S2242: Create an external polygon based on the seventh geometric object. The purpose of creating a polygon based on the merged result (ie, the seventh geometric object) is to convert the merged geometric object into a specific polygon object for further analysis, visualization or output.
[0049] Step S2243: Obtain the second geometric object corresponding to each sixth geometric object according to the external polygon and the fourth geometric object, and update the third geometric object set during traversal.
[0050] See also Figure 5 In a specific embodiment of the present invention, step S2243 includes: S22431, calculating the difference between the external polygon and the fourth geometric object to obtain the eighth geometric object; S22432, according to the eighth geometric object and the sixth geometric object, obtaining the second geometric object corresponding to the sixth geometric object currently traversed, and updating the third geometric object set during traversal. The difference between the external polygon and the fourth geometric object can be calculated by DIFF operation. The DIFF operation of geometric objects refers to the difference calculation between two geometric objects, and the result is a geometric object that contains an area that only exists in the first geometric object but not in the second geometric object. This operation is very important in spatial analysis, especially when it is necessary to identify the difference between two areas. In this embodiment, the DIFF operation can be used to obtain the difference.
[0051] In a specific embodiment of the present invention, step S22432 includes: judging whether the eighth geometric object is empty: if so, taking the currently traversed sixth geometric object as its corresponding second geometric object and adding it to the third geometric object set; if not, obtaining the second geometric object and updating the third geometric object set according to the area ratio of the eighth geometric object to the currently traversed sixth geometric object. In this judgment logic, if the eighth geometric object is empty, it means that when traversing the sixth geometric object, the external polygon created by traversing the last sixth geometric object already includes the sixth geometric object traversed this time, resulting in the inability to further process the sixth geometric object traversed this time, so there may be a residual gap, so it is not only necessary to take the currently traversed sixth geometric object as its corresponding second geometric object, but also to add it to the third geometric object set for the next step of processing. If the eighth geometric object is not empty, further judgment is required.
[0052] In a specific embodiment of the present invention, according to the area ratio of the eighth geometric object to the sixth geometric object currently traversed, the second geometric object is obtained and the third geometric object set is updated, including: judging whether the area ratio of the eighth geometric object to the sixth geometric object currently traversed is greater than a preset value: if yes, the sixth geometric object currently traversed is used as its corresponding second geometric object and added to the third geometric object set; if not, the eighth geometric object is used as the second geometric object corresponding to the sixth geometric object currently traversed. In this embodiment, the preset value is greater than 1, for example, 1.5 can be taken. The reason for judging the ratio between the two is that it is necessary to consider the merged scene of two protruding and offsetting geometric objects. For the sixth geometric object in this scene, it is also necessary to add it to the third geometric object set for the next step of processing. If the area ratio is less than or equal to the preset value, the eighth geometric object is saved as the merged geometric object. After these judgments and processing, generally better results can be obtained, but there will still be gaps, that is, when the eighth geometric object is empty or the area ratio is greater than the preset value, it will be generated, so the third geometric object set is used to record and further process in subsequent steps.
[0053] For geometric objects, some packaged methods can be used to quickly perform corresponding operations. For example, .isEmpty() can be used to determine whether a geometric object is empty, and .getArea() can be used to obtain the area of a geometric object.
[0054] Step S2244: Update the fourth geometric object to an external polygon. That is, each time the sixth geometric object is traversed, the external polygon obtained by executing step S2242 will be reassigned to the fourth geometric object, so that the fourth geometric object will become larger and larger. This step is equivalent to polygon-based expansion processing.
[0055] Step S300: Perform an expansion intersection process on the third set of geometric objects to update the second set of geometric objects.
[0056] In a specific embodiment of the present invention, performing an expansion intersection process on the third geometric object set to update the second geometric object set includes: traversing the eighth geometric object in the third geometric object set, and performing an expansion intersection process in the same steps as traversing the first geometric object to update the second geometric object set. The steps in this embodiment are similar to the previous step S200, except that in this step, the third geometric object set is traversed, and during the expansion intersection process, the intersection is performed with the second geometric object in the second geometric object set.
[0057] Step S400: Obtain the merged outer contour according to the updated second geometric object set. The outer contour itself can also be regarded as a geometric object, but it is only a geometric object containing an outer contour line. Through this step of processing, the final outer contour can be obtained to complete the merging of geometric objects.
[0058] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0059] See also Figure 6 , Figure 6 A geometric object merging device provided in one embodiment of the present invention includes a data acquisition unit 101, a first processing unit 102, a second processing unit 103 and a third processing unit 104. The data acquisition unit 101 is used to acquire input data to be processed to obtain a first geometric object set, which includes a plurality of first geometric objects; the first processing unit 102 is used to traverse the first geometric objects in the first geometric object set, and obtain a second geometric object set and a third geometric object set with suspected residual gaps through an external expansion intersection process; the second processing unit 103 is used to perform an external expansion intersection process on the third geometric object set to update the second geometric object set; the third processing unit 104 is used to obtain a merged outer contour according to the updated second geometric object set.
[0060] It should be noted that the geometric object merging device of the present embodiment is a device corresponding to the geometric object merging method described above, and the functional modules in the geometric object merging device may correspond to the corresponding steps in the geometric object merging method. The geometric object merging device of the present embodiment may be implemented in coordination with the geometric object merging method, that is, in the absence of conflict, the relevant technical details mentioned in the geometric object merging method described above may also be applied to the geometric object merging device of the present embodiment.
[0061] See also Figure 7 , Figure 7 An electronic device provided for one embodiment of the present invention includes a processor 201, a memory 202 and a communication bus; the communication bus is used to connect the processor 201 and the memory 202; the processor 201 is used to execute a computer program stored in the memory 202 to implement the above-mentioned method for merging geometric objects.
[0062] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is used to enable a computer to execute the above-mentioned method for merging geometric objects.
[0063] The method of the present invention can effectively process a large number of complex geometric objects and is suitable for various application scenarios such as geographic information systems, remote sensing, urban planning, and environmental monitoring. Compared with traditional geometric object merging methods, the present invention significantly improves processing efficiency and reduces the consumption of computing resources by means of geometric object expansion intersection processing and optimized sorting. By combining multiple geometric operation methods and avoiding error accumulation through difference operations, the high accuracy and continuity of the merging results are ensured, which has obvious advantages over the prior art. In general, the present invention has significant advantages in improving processing efficiency, ensuring the accuracy and continuity of merging results, simplifying work processes, etc., solves multiple key problems in the prior art, and provides a reliable and efficient solution for geographic information processing and data analysis.
[0064] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for merging geometric objects, characterized in that: include: Acquire input data to be processed to obtain a first geometric object set, wherein the first geometric object set includes a plurality of first geometric objects; Traversing the first geometric objects in the first geometric object set, obtaining a second geometric object set and a third geometric object set suspected to have residual gaps through an outward expansion intersection process; Performing an expansion intersection process on the third set of geometric objects to update the second set of geometric objects; A merged outer contour is obtained according to the updated second geometric object set.
2. The method for merging geometric objects according to claim 1, characterized in that: The first geometric objects in the first geometric object set are traversed, and a second geometric object set and a third geometric object set suspected to have residual gaps are obtained through outward expansion and intersection processing, including: Construct a third geometric object set and set it to empty; Traversing the first geometric objects in the first geometric object set, obtaining a list of second geometric objects corresponding to each of the first geometric objects through an outward expansion intersection process, and adding geometric objects suspected of having residual gaps to the third geometric object set during the outward expansion intersection process; The second geometric object set is obtained according to the second geometric object list corresponding to all the first geometric objects.
3. The method for merging geometric objects according to claim 2, characterized in that: Traversing the first geometric objects in the first geometric object set, obtaining a list of second geometric objects corresponding to each of the first geometric objects through an outward expansion intersection process, and adding geometric objects suspected of having residual gaps to the third geometric object set during the outward expansion intersection process, including: Construct a fourth geometric object and initialize it to the first geometric object currently traversed; Performing an outward expansion process on the first geometric object currently traversed to obtain a fifth geometric object; Acquire geometric objects that intersect with the fifth geometric object to obtain a sixth geometric object set; Traversing the sixth geometric objects in the sixth geometric object set, obtaining the second geometric object corresponding to each of the sixth geometric objects, and updating the fourth geometric object and the third geometric object set during the traversal; A list of the second geometric objects is obtained according to the second geometric objects corresponding to all the sixth geometric objects.
4. The method for merging geometric objects according to claim 3, characterized in that: The sixth geometric object in the sixth geometric object set is traversed in clockwise order.
5. The method for merging geometric objects according to claim 3, characterized in that: Traversing the sixth geometric objects in the sixth geometric object set, obtaining the second geometric object corresponding to each of the sixth geometric objects, and updating the fourth geometric object and the third geometric object set during the traversal, including: Merge the fourth geometric object with the sixth geometric object currently traversed to obtain a seventh geometric object; Creating an external polygon according to the seventh geometric object; According to the external polygon and the fourth geometric object, obtain the second geometric object corresponding to each of the sixth geometric objects, and update the third geometric object set during traversal; The fourth geometric object is updated to the outer polygon.
6. The method for merging geometric objects according to claim 5, characterized in that: Obtaining a second geometric object corresponding to each of the sixth geometric objects according to the external polygon and the fourth geometric object, and updating the third geometric object set during traversal, including: Calculating the difference between the external polygon and the fourth geometric object to obtain an eighth geometric object; According to the eighth geometric object and the sixth geometric object, a second geometric object corresponding to the sixth geometric object currently traversed is obtained, and the third geometric object set is updated during traversal.
7. The method for merging geometric objects according to claim 6, characterized in that: According to the eighth geometric object and the sixth geometric object, obtaining a second geometric object corresponding to the sixth geometric object currently traversed, and updating the third geometric object set during traversal, including: Determine whether the eighth geometric object is empty: If yes, taking the sixth geometric object currently traversed as its corresponding second geometric object, and adding it to the third geometric object set; If not, the second geometric object is obtained and the third geometric object set is updated according to the area ratio of the eighth geometric object to the sixth geometric object currently traversed.
8. The method for merging geometric objects according to claim 7, characterized in that: According to the area ratio of the eighth geometric object to the sixth geometric object currently traversed, obtaining the second geometric object and updating the third geometric object set, comprising: Determine whether the area ratio of the eighth geometric object to the sixth geometric object currently traversed is greater than a preset value: If yes, taking the sixth geometric object currently traversed as its corresponding second geometric object, and adding it to the third geometric object set; If not, the eighth geometric object is used as the second geometric object corresponding to the sixth geometric object currently traversed.
9. The method for merging geometric objects according to claim 1, characterized in that: Performing an expansion intersection process on the third set of geometric objects to update the second set of geometric objects includes: The eighth geometric object in the third geometric object set is traversed, and an outward expansion intersection process is performed in the same steps as the traversal of the first geometric object to update the second geometric object set; wherein, during the outward expansion intersection process, the intersection is performed with the second geometric object in the second geometric object set.
10. A device for merging geometric objects, characterized in that: include: A data acquisition unit, configured to acquire input data to be processed and obtain a first geometric object set, wherein the first geometric object set includes a plurality of first geometric objects; A first processing unit is used to traverse the first geometric objects in the first geometric object set, and obtain a second geometric object set and a third geometric object set suspected to have residual gaps through an outward expansion intersection process; A second processing unit, configured to perform an expansion intersection process on the third set of geometric objects to update the second set of geometric objects; The third processing unit is used to obtain a merged outer contour according to the updated second geometric object set.
11. An electronic device, characterized in that: The system comprises a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to make a computer execute the method according to any one of claims 1 to 9.