A method and device for extracting the geometric center point of a geographical entity
Through the slit and complement method and ray method combined with Delaunay triangular network correction, the problem of inaccurate calculation of geometric centers of complex geographical entities is solved, and the geometric center extraction of symmetry and stability is achieved.
Patent Information
- Application Number
- CN202510458274.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-04-14
AI Technical Summary
It is difficult for the prior art to accurately calculate the geometric center of complex geographical entities, especially concave polygonal geographical entities. The calculation results are often located outside the geometric figure or are difficult to symmetry, and cannot meet the inclusion, symmetry and stability characteristics.
The center of gravity of the geographical entity is calculated by using the radial method, and the center of gravity is determined by using the ray method. If not, a Delaunay triangular network with boundary constraints is constructed for position correction to ensure the accuracy and stability of the geometric center.
By integrating the center of gravity and the characteristics of the Delaunay triangular network, the geometric center of any shape can be accurately extracted, satisfying the inclusion, symmetry and stability characteristics, and improving the robustness of the calculation.
Smart Images

Figure CN120014021B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of extracting the geometric center points of geographical entities, and particularly to a method and device for extracting the geometric center points of geographical entities. Background Art
[0002] The geometric center of a geographical entity refers to the center point of the geometric figure that describes the shape characteristics of the entity. Mathematically speaking, the geometric center represents the mean value of the coordinates of all points that make up the geometric figure. Different from the geometric center in the pure mathematical sense, for geographical entities of any shape, its ideal geometric center should satisfy the following characteristics: (1) inclusiveness, the geometric center should be located inside the range (or spatial domain) of the geometric figure of the geographical entity; (2) symmetry, the range of the geometric figure of the geographical entity is basically symmetrically distributed around the geometric center; (3) stability, the calculation of the geometric center is determined by certain mathematical rules.
[0003] Accurately obtaining the geometric center of a geographical entity plays an important role in fields such as mapping of ground objects, location retrieval, and map annotation. Since the calculation of the geometric center is also a basic problem in analytic geometry, the research on the calculation of the geometric center has a long history. Especially for point-like and linear geometric figures, the calculation of their geometric centers is simple, fast, and accurate. However, the calculation of the geometric center of planar figures shows a certain degree of complexity. If it is defaulted that the geographical entity is homogeneous, for a triangular geographical entity, its centroid is its geometric center; for a circular geographical entity, its center is its geometric center; for an irregular convex polygon geographical entity, its center of gravity is its geometric center; for an irregular concave polygon geographical entity, its calculation is more difficult. The prior art proposes to use the "cutting and patching method" to calculate its center of gravity as its geometric center through integration; the prior art proposes to use the "substitution method" to calculate the centroid of its minimum circumscribed rectangle as its geometric center. However, for geographical entities with complex shapes and diverse structures in the real world, both existing methods are difficult to ensure that the calculated geometric center satisfies the above three characteristics, and the calculation results may have problems such as being located outside the geometric figure or the figure being difficult to be symmetric in some cases, as Figure 1 shown. Summary of the Invention
[0004] The purpose of this application is to provide a method and device for extracting the geometric center points of geographical entities, which can accurately calculate the geometric center of the two-dimensional geometric figure of geographical entities of any shape.
[0005] To achieve the above purpose, this application provides the following solutions.
[0006] In the first aspect, this application provides a method for extracting the geometric center points of geographical entities, including the following steps.
[0007] Calculate the center of gravity of the two-dimensional geometric figure of the geographical entity by using the cutting and patching method.
[0008] Use the ray method to determine whether the centroid is inside the two-dimensional geometric figure of the geographical entity.
[0009] If so, regard the centroid as the geometric center of the geographical entity.
[0010] If not, construct a Delaunay triangulation within the boundary region of the geometric figure of the geographical entity, and extract the geometric center of the geographical entity according to the Delaunay triangulation.
[0011] In a second aspect, the present application provides a device for extracting the geometric center point of a geographical entity, including the following modules.
[0012] A centroid extraction module for calculating the centroid of the two-dimensional geometric figure of the geographical entity by using the method of cutting and patching.
[0013] A geometric center extraction module for using the ray method to determine whether the centroid is inside the two-dimensional geometric figure of the geographical entity; if so, regard the centroid as the geometric center of the geographical entity; if not, construct a Delaunay triangulation within the boundary region of the geometric figure of the geographical entity, and extract the geometric center of the geographical entity according to the Delaunay triangulation.
[0014] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the above-mentioned method for extracting the geometric center point of a geographical entity.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-mentioned method for extracting the geometric center point of a geographical entity.
[0016] In a fifth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the above-mentioned method for extracting the geometric center point of a geographical entity.
[0017] According to the specific embodiments provided by the present application, the following technical effects are disclosed in the present application.
[0018] The present application provides a method and apparatus for extracting the geometric center point of a geographical entity. First, the centroid of the geographical entity is calculated using the "cut-and-patch method"; second, based on the "ray method", it is determined whether the centroid is inside the geometric figure of the geographical entity; finally, a boundary-constrained Delaunay triangulation is constructed to correct the position of the geometric center that is not inside the geometric figure of the geographical entity. By integrating the respective characteristics of the centroid and the Delaunay triangulation (i.e., centrality and structural property), for geographical entities of any shape, a geometric center point that satisfies the three characteristics of inclusiveness, symmetry, and stability can be extracted, and the method of the present application has stronger robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 Schematic diagram showing that the geometric center extracted by the existing method provided in an embodiment of the present application is located outside the geometric figure.
[0021] Figure 2 Application environment diagram of a method for extracting the geometric center point of a geographical entity provided in an embodiment of the present application.
[0022] Figure 3 Flow schematic diagram of a method for extracting the geometric center point of a geographical entity provided in an embodiment of the present application.
[0023] Figure 4 Schematic diagram showing that the geometric center of the geographical entity is located outside the geometric figure provided in an embodiment of the present application.
[0024] Figure 5 Schematic diagram of the encryption of the boundary nodes of the geometric figure of the geographical entity provided in an embodiment of the present application.
[0025] Figure 6 Schematic diagram of the boundary-constrained Delaunay triangulation provided in an embodiment of the present application.
[0026] Figure 7 Schematic diagram of the correction of the geometric center position provided in an embodiment of the present application.
[0027] Figure 8 Schematic diagram of the comparative analysis of the geometric center points extracted by different methods provided in an embodiment of the present application.
[0028] Figure 9Schematic diagram of functional modules of a geographic entity geometric center point extraction device provided by an embodiment of the present application.
[0029] Figure 10 Schematic diagram of the structure of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0030] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0031] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the drawings and specific implementation manners.
[0032] The geographic entity geometric center point extraction method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 2 . Among them, the terminal communicates with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be set separately, integrated on the server, placed in the cloud or on other servers. The terminal can send the two-dimensional geometric graph of the geographic entity to be processed to the server. After receiving the two-dimensional geometric graph of the geographic entity, the server uses the cutting and patching method to calculate the centroid of the two-dimensional geometric graph of the geographic entity; uses the ray method to determine whether the centroid is inside the two-dimensional geometric graph of the geographic entity; if so, regards the centroid as the geometric center of the geographic entity; if not, constructs a Delaunay triangulation network within the boundary area of the geometric graph of the geographic entity, and extracts the geometric center of the geographic entity according to the Delaunay triangulation network. The server can feedback the obtained geometric center of the geographic entity to the terminal. In addition, in some embodiments, the geographic entity geometric center point extraction method can also be implemented by the server or the terminal alone. For example, the terminal can directly perform the extraction of the geometric center point of the geographic entity for the two-dimensional geometric graph of the geographic entity to be processed, or the server can obtain the video to be processed from the data storage system and perform the extraction of the geometric center point of the geographic entity for the two-dimensional geometric graph of the geographic entity to be processed.
[0033] Among them, the terminal can be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0034] In an exemplary embodiment, as Figure 3 shown, a method for extracting the geometric center point of a geographical entity is provided. This method is executed by a computer device, specifically, it can be executed independently by a computer device such as a terminal or a server, or jointly executed by a terminal and a server. In the embodiments of the present application, taking this method applied to Figure 2 the server in as an example for illustration, it includes the following steps 101 to 104.
[0035] Step 101: Calculate the centroid of the two-dimensional geometric figure of the geographical entity by using the method of cutting and patching.
[0036] As an example, the two-dimensional geometric figure of the geographical entity can be the shape of the projection surface of the geographical entity.
[0037] Step 102: Use the ray method to determine whether the centroid is inside the two-dimensional geometric figure of the geographical entity.
[0038] If so, execute Step 103: Regard the centroid as the geometric center of the geographical entity.
[0039] If not, execute Step 104: Construct a Delaunay triangulation network within the boundary region of the geometric figure of the geographical entity, and extract the geometric center of the geographical entity according to the Delaunay triangulation network.
[0040] In another exemplary embodiment of the present application, in Step 101, the centroid calculation process of applying the method of cutting and patching: Considering the complexity of the geometric shape of the geographical entity, the centroid becomes the preferred choice for calculating its geometric center. According to the computational geometry theorem, for any polygon with an area of S, divide it into N non-overlapping, non-overlapping, and seamless sub-regions. Let the area of the jth (1 ≤ j ≤ N) sub-region be , and the centroid be , using the centroid formula of a thin plate in the plane, the centroid of the polygon can be obtained , expressed as the following formula.
[0041] (1).
[0042] (2).
[0043] Specifically, considering the triangle area calculation formula and related mathematical theorems, the general centroid calculation formula of the polygon surrounded by discrete data points can be obtained. For any polygon with as vertices, the vertices of the polygon are , divide the polygon into n - 2 triangles, then the centroid coordinates of the polygon can be obtained according to the area and centroid of each triangle , expressed as the following formula.
[0044] (3).
[0045] (4).
[0046] Among them, represent the abscissa and ordinate of the centroid of the two-dimensional geometric figure of the geographical entity; represent the abscissa of the first vertex of the two-dimensional geometric figure of the geographical entity; , represent the abscissas of the i-th and (i + 1)-th vertices of the two-dimensional geometric figure of the geographical entity; represent the ordinate of the first vertex of the two-dimensional geometric figure of the geographical entity; , represent the ordinates of the i-th and (i + 1)-th vertices of the two-dimensional geometric figure of the geographical entity; n represents the number of vertices. Formulas (3) and (4) are the calculation formulas after discretization, and the sub-regions adopt triangles.
[0047] The above-mentioned "cutting and patching method" effectively improves the accuracy and stability of the geometric center. However, for some geographical entities with more complex shapes, the "cutting and patching method" still has difficulty ensuring that the calculated centroid must be inside the geometric center, as shown in Figure 4 shown.
[0048] Based on the above content, in step 101, calculating the centroid of the two-dimensional geometric figure of the geographical entity by using the cutting and patching method includes the following steps.
[0049] (1) Divide the two-dimensional geometric figure of the geographical entity into several triangles.
[0050] (2) Calculate the centroid of the two-dimensional geometric figure of the geographical entity by using the area and centroid of each triangle.
[0051] In another exemplary embodiment of the present application, in step 102, using the ray method to determine whether the centroid is inside the two-dimensional geometric figure of the geographical entity includes the following steps.
[0052] (a1) Draw a horizontal scanning line from the centroid of the two-dimensional geometric figure of the geographical entity.
[0053] (a2) Determine the number of intersections of the horizontal scanning line with the boundary of the two-dimensional geometric figure of the geographical entity.
[0054] (a3) If the number of intersections is odd, it is considered that the centroid is inside the two-dimensional geometric figure of the geographical entity.
[0055] (a4) If the number of intersections is even, it is considered that the centroid is outside the two-dimensional geometric figure of the geographical entity, and then further construct a Delaunay triangulation network to correct the position of the geometric center.
[0056] In another exemplary embodiment of the present application, in step 104, within the geometric boundary region of the geographical entity, a Delaunay triangulation is constructed, and the geometric center of the geographical entity is extracted according to the Delaunay triangulation, including the following steps.
[0057] (b1) Encrypt the boundary nodes of the two-dimensional geometric figure of the geographical entity.
[0058] Since the boundary nodes of the geometric figure of the geographical entity are usually used to describe important morphological features of planar features, such as inflection points, intersection points, etc., the number is generally small. To improve the accuracy of the subsequent geometric midpoint position, it is necessary to encrypt the nodes on the boundary. The specific method is: set the encryption step length d, and the value of d usually adopts the length of the shortest arc segment of the feature boundary; use d as the primitive to sample between two nodes to obtain encrypted points, as Figure 5 shown.
[0059] (b2) Within the geometric boundary region of the geographical entity, use the encrypted boundary nodes to construct a Delaunay triangulation.
[0060] Establish a Delaunay triangulation. Use the encrypted boundary point set and take the geometric boundary of the geographical entity as the restricted edge condition to establish a boundary-constrained Delaunay triangulation, as Figure 6 shown.
[0061] (b3) Determine the boundary node closest to the centroid, denoted as the reference boundary node, and regard the triangle where the reference boundary node is located as the reference triangle.
[0062] Calculate the point on the geometric boundary of the geographical entity closest to the centroid, and take the triangle where this point is located as the triangle closest to the centroid point.
[0063] (b4) Select a plurality of triangles within a preset range around the reference triangle, denoted as the selected triangles.
[0064] Set a certain number N of triangle samplings, and select N triangles around the triangle closest to the centroid point as the triangles suitable for geometric center calculation.
[0065] (b5) Determine the geometric center of the geographical entity according to the plurality of selected triangles.
[0066] In another exemplary embodiment of the present application, in step (b5), calculate the areas of the selected N triangles, and set the area error range . Select the one that is spatially connected to the triangle with the largest area and the area error value is within Two triangles within the range, with the center of their shared boundary as the geometric center of the geographical entity; if there are no two triangles that are spatially adjacent and have an area error value within the range, then the centroid of the triangle with the largest area is selected as the geometric center of the geographical entity. As shown in Figure 7 the figure.
[0067] Therefore, it can be concluded that in step (b5), determining the geometric center of a geographical entity based on multiple selected triangles includes:
[0068] (c1) Calculate the area of each selected triangle and select the triangle with the largest area.
[0069] (c2) Determine whether there is a target triangle; the target triangle is a triangle that is spatially adjacent to the triangle with the largest area and has an area error value within a preset error range.
[0070] (c3) If there is a target triangle, then use the center of the shared side between the target triangle and the triangle with the largest area as the geometric center of the geographical entity.
[0071] (c4) If there is no target triangle, then use the centroid of the triangle with the largest area as the geometric center of the geographical entity.
[0072] In this application, for geographical entities with diverse shapes and complex structures, how to accurately obtain the geometric center point of their two-dimensional geometric figures has always been a fundamental issue of concern in the academic and industrial circles. Aiming at the deficiencies of the existing geometric center point calculation methods based on the centroid, this application proposes a robust method for extracting the geometric center point of geographical entities. First, use the "cutting and patching method" to calculate the centroid of the geographical entity; second, based on the "ray method", determine whether the centroid is inside the geometric figure of the geographical entity; finally, construct a Delaunay triangulation with boundary constraints to correct the position of the geometric center that is not inside the geometric figure of the geographical entity. By integrating the respective characteristics of the centroid and the Delaunay triangulation (i.e., centrality and structurality), for geographical entities of any shape, a geometric center point that satisfies the three characteristics of inclusiveness, symmetry, and stability can be extracted.
[0073] The following gives the verification experiments on the stability and accuracy of the method of this application.
[0074] 1. Experimental data and environment
[0075] Relying on the WJ-III map workstation developed by a certain scientific research institute, the method for extracting the geometric center point of geographical entities proposed in this application is embedded in the C++ environment, and test data is used for stability and accuracy verification. The test data is taken from the basic mapping building geographical entity data produced in a certain area of a certain city. The buildings in this area have diverse shapes and complex structures, and the geometric graphic features presented by the buildings in the whole area are very representative. There are 14,559 building entity surface elements in the test data.
[0076] 2. Experimental Results and Analysis
[0077] (1)Stability Analysis
[0078] After data spatial association and attribute consistency calibration, all 14,559 building surface elements in the test area have generated corresponding geometric center points in a 1:1 form. Through spatial overlay analysis, all geometric center points are located within the building surface graphics.
[0079] (2)Accuracy Analysis
[0080] The method of this application is compared and analyzed with the existing method for calculating the geometric center of geographical entities based on the centroid. After statistics, among the geometric center points obtained by the two methods, the proportion of geometric center points with completely overlapping spatial positions is 86.23%, and the proportion of geometric center points with different spatial positions is 13.77%. 12 typical cases of calculating the geometric center points of geographical entities are selected for visual comparison analysis, as Figure 8 shown. Figure 8 In, in the case of overlapping geometric center points, the geometric center points extracted by both methods are represented by small dots; in the case of non-overlapping geometric center points, the geometric center of the geographical entity obtained by the existing method is represented by a small dot in a circular frame, and the geometric center of the geographical entity obtained by the method of this application is represented by a small dot in a rectangular frame.
[0081] Based on the above experimental analysis, for convex polygons, regardless of whether their shapes are simple or complex, the geometric center points obtained by the method of this application and the existing method for calculating geometric center points based on the centroid overlap, and the positions of the geometric center points are reasonable; for concave polygons with simple or complex shapes, the geometric center points obtained by the existing method for calculating geometric center points based on the centroid often fall outside the polygon. Compared with the existing method for calculating geometric center points based on the centroid, the geometric center points extracted by the method of this application fully conform to the characteristics of inclusiveness, symmetry, and stability of the theoretical geometric center points, showing stronger robustness.
[0082] The present application also provides an application scenario which applies the above-mentioned method for extracting the geometric center point of a geographical entity. Specifically: The method for extracting the geometric center point of a geographical entity provided in this embodiment can be applied in a map annotation scenario. This scenario includes a geographical entity collection link, a geometric center point extraction link, and a map annotation link; the geographical entity collection link is used to collect geographical entities required for map annotation; the geometric center point extraction link is used to extract the geometric center of the geographical entity; the map annotation link is used to perform map annotation based on the extracted geometric center. The method for extracting the geometric center point of a geographical entity provided in this embodiment belongs to the geometric center point extraction link in the content processing link.
[0083] Based on the same inventive concept, an embodiment of the present application also provides a device for extracting the geometric center point of a geographical entity for implementing the above-mentioned method for extracting the geometric center point of a geographical entity. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the device for extracting the geometric center point of a geographical entity provided below can refer to the limitations on the method for extracting the geometric center point of a geographical entity in the above text, and will not be repeated here.
[0084] In an exemplary embodiment, as Figure 9 shown, a device for extracting the geometric center point of a geographical entity is provided, including the following modules.
[0085] The centroid extraction module M1 is used to calculate the centroid of the two-dimensional geometric figure of the geographical entity by the method of cutting and patching.
[0086] The geometric center extraction module M2 is used to judge whether the centroid is inside the two-dimensional geometric figure of the geographical entity by the ray method; if so, the centroid is regarded as the geometric center of the geographical entity; if not, a Delaunay triangulation is constructed within the boundary region of the geometric figure of the geographical entity, and the geometric center of the geographical entity is extracted according to the Delaunay triangulation.
[0087] In an exemplary embodiment, a computer device is provided. This computer device can be a server or a terminal, and its internal structure diagram can be as Figure 10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the geometric center point data of geographical entities. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a method for extracting the geometric center point of a geographical entity.
[0088] Those skilled in the art can understand that Figure 10 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0089] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0090] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0091] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0092] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0093] The databases involved in the various embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0094] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0095] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for extracting the geometric center point of a geographical entity, characterized in that, The method for extracting the geometric center point of a geographic entity includes: Calculating the centroid of the two-dimensional geometric figure of the geographic entity by the method of cutting and patching; Judging whether the centroid is inside the two-dimensional geometric figure of the geographic entity by the ray method; If so, regarding the centroid as the geometric center of the geographic entity; If not, constructing a Delaunay triangulation within the boundary region of the geometric figure of the geographic entity, and extracting the geometric center of the geographic entity according to the Delaunay triangulation; Among them, constructing a Delaunay triangulation within the boundary region of the geometric figure of the geographic entity and extracting the geometric center of the geographic entity according to the Delaunay triangulation includes: Encrypting the boundary nodes of the two-dimensional geometric figure of the geographic entity; Within the boundary region of the geometric figure of the geographic entity, constructing a Delaunay triangulation using the encrypted boundary nodes; Determining the boundary node closest to the centroid, denoted as the reference boundary node, and regarding the triangle where the reference boundary node is located as the reference triangle; Selecting a plurality of triangles within a preset range around the reference triangle, denoted as the selected triangles; Determining the geometric center of the geographic entity according to the plurality of selected triangles; Among them, determining the geometric center of the geographic entity according to the plurality of selected triangles includes: Calculating the areas of the respective selected triangles and selecting the triangle with the largest area; Judging whether there is a target triangle; the target triangle is a triangle that is spatially connected to the triangle with the largest area and the area error value is within a preset error range; If there is a target triangle, regarding the center of the shared side between the target triangle and the triangle with the largest area as the geometric center of the geographic entity; If there is no target triangle, regarding the centroid of the triangle with the largest area as the geometric center of the geographic entity.
2. The method for extracting the geometric center point of a geographic entity according to claim 1, wherein Calculating the centroid of the two-dimensional geometric figure of the geographic entity by the method of cutting and patching includes: Dividing the two-dimensional geometric figure of the geographic entity into several triangles; Calculating the centroid of the two-dimensional geometric figure of the geographic entity using the area and centroid of each triangle.
3. The method for extracting the geometric center point of a geographic entity according to claim 2, wherein The calculation formula for the centroid of the two-dimensional geometric figure of the geographic entity is: ; ; Among them, represent the abscissa and ordinate of the centroid of the two-dimensional geometric figure of the geographical entity; represent the abscissa of the first vertex of the two-dimensional geometric figure of the geographical entity; , represent the abscissas of the i-th and (i + 1)-th vertices of the two-dimensional geometric figure of the geographical entity; represent the ordinate of the first vertex of the two-dimensional geometric figure of the geographical entity; , represent the ordinates of the i-th and (i + 1)-th vertices of the two-dimensional geometric figure of the geographical entity; n represents the number of vertices.
4. The method for extracting the geometric center point of a geographic entity according to claim 1, characterized in that Judging whether the centroid is inside the two-dimensional geometric figure of the geographic entity by the ray method includes: Drawing a horizontal scan line from the centroid; Determining the number of intersections of the horizontal scan line and the boundary of the two-dimensional geometric figure of the geographic entity; If the number of intersections is odd, regarding the centroid as being inside the two-dimensional geometric figure of the geographic entity; If the number of intersections is even, regarding the centroid as being outside the two-dimensional geometric figure of the geographic entity.
5. A device for extracting the geometric center point of a geographical entity, characterized in that, The device for extracting the geometric center point of a geographic entity includes: A centroid extraction module for calculating the centroid of the two-dimensional geometric figure of the geographic entity by the method of cutting and patching; A geometric center extraction module for judging whether the centroid is inside the two-dimensional geometric figure of the geographic entity by the ray method; if so, regarding the centroid as the geometric center of the geographic entity; if not, constructing a Delaunay triangulation within the boundary region of the geometric figure of the geographic entity and extracting the geometric center of the geographic entity according to the Delaunay triangulation; Among them, constructing a Delaunay triangulation within the geometric boundary region of a geographical entity and extracting the geometric center of the geographical entity based on the Delaunay triangulation includes: Encrypting the boundary nodes of the two-dimensional geometric figure of the geographical entity; Within the geometric boundary region of the geographical entity, using the encrypted boundary nodes to construct a Delaunay triangulation; Determining the boundary node closest to the centroid, denoted as the reference boundary node, and regarding the triangle where the reference boundary node is located as the reference triangle; Selecting multiple triangles within a preset range around the reference triangle, denoted as the selected triangles; Determining the geometric center of the geographical entity based on the multiple selected triangles; Among them, determining the geometric center of the geographical entity based on the multiple selected triangles includes: Calculating the areas of the selected triangles and selecting the triangle with the largest area; Judging whether there is a target triangle; the target triangle is a triangle that is spatially adjacent to the triangle with the largest area and whose area error value is within a preset error range; If there is a target triangle, taking the center of the shared edge between the target triangle and the triangle with the largest area as the geometric center of the geographical entity; If there is no target triangle, taking the centroid of the triangle with the largest area as the geometric center of the geographical entity.
6. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method for extracting the geometric center point of a geographical entity according to any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for extracting the geometric center point of a geographical entity according to any one of claims 1-4.
8. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for extracting the geometric center point of a geographical entity according to any one of claims 1-4.
Citation Information
Patent Citations
Automatic positioning method of statistical graph in zonal statistic map
CN103473420A
Method for determining central point of room area by robot and robot
CN117697750A