Ellipsoidal polygon Boolean operation method based on positive spherical mapping
By mapping the polygonal vertices of the ellipsoid to the positive sphere for Boolean operation, the accuracy and consistency problems of traditional methods when dealing with polygons on the earth's surface are solved, which improves calculation efficiency and accuracy, and reduces projection deformation.
Patent Information
- Application Number
- CN202510481030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When traditional methods deal with polygons on the earth's surface, it is difficult to ensure global accuracy and consistency, especially in data processing at a global scale, which faces problems such as projection deformation, complex mesh division and large calculations.
The ellipsoid polygonal boolean operation method based on the regular spherical mapping is used to map the polygonal vertices of the ellipsoid to a regular spherical surface, perform Boolean operation on the regular spherical surface, and reflect the result to the ellipsoid surface.
It improves the calculation efficiency and accuracy of the Boolean operation of ellipsoid polygons, reduces projection deformation, maintains the accuracy of geometric properties, and is suitable for handling polygons scattered on the ellipsoid.
Smart Images

Figure CN119991976A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of spatial information analysis, and in particular to an ellipsoidal polygon Boolean operation method based on regular spherical mapping. Background Art
[0002] In the fields of geographic information systems, remote sensing science, and spatial information analysis, accurate analysis and manipulation of complex polygons on the earth's surface is a vital task. Traditional methods mostly rely on map projection or polygonal area meshing and discretization processing technology, but these methods often face projection deformation when processing global-scale data. The grid division is complex and the amount of calculation is large. Especially when processing polygons on the earth's surface, due to the ellipsoid shape of the earth itself, traditional projection methods are difficult to guarantee global accuracy and consistency, and traditional two-dimensional or three-dimensional Boolean operation methods are difficult to apply directly. Summary of the invention
[0003] In order to solve the existing problems, the present invention provides a Boolean operation method for ellipsoidal polygons based on regular spherical mapping, and the specific scheme is as follows: A Boolean operation method for ellipsoidal polygon based on regular spherical mapping comprises the following steps: S1, maps the polygonal vertices of the ellipsoid to a true sphere; S2, Boolean operation of the spherical polygon after mapping on the spherical surface; S3, mapping the result of the polygon Boolean operation on the regular sphere to the original ellipsoidal surface as the result of the polygon Boolean operation on the ellipsoidal surface.
[0004] Preferably, step S1 specifically includes the following steps: S11, ellipsoidal surface is denoted as F e , the two polygons Poly1 and Poly2 on it are composed of three points (T1, T2, T3) and four points (R1, R2, R3, R4) respectively; the positive sphere is denoted by F s , using the same spatial rectangular coordinate system and the same center as the ellipsoid; S12, the ray used for spherical polygon mapping, is emitted from the coordinate origin O, passes through the vertices of the ellipsoid polygon, and the polygon formed by the intersection of the ray and the spherical surface is the mapped polygon; that is, for polygon Poly1, the rays OT1, OT2, OT3 and the spherical surface F s The intersection point T s1 、T s2 、T s3 The vertices of Poly1 mapped to the sphere are the vertices that form the mapped polygon, denoted as SPoly1. For polygon Poly2, the rays OR1, OR2, OR3, and OR4 are the vertices of the sphere F sThe intersection point R s1 , R s2 , R s3 , R s4 The vertices of Poly2 mapped to the sphere constitute the mapped polygon, which is recorded as SPoly2.
[0005] Preferably, the result of the Boolean operation on SPoly1 and SPoly2 in step S2 is SGeo3, whose boundary points are (S s1 , S s2 ,…,S sn ).
[0006] Preferably, the result SGeo3 (S s1 , S s2 ,…,S sn ), is reversely mapped to the original ellipsoid as the result of the polygon Boolean operation on the ellipsoid; specifically, the geometric shape reversely mapped to the ellipsoid is Geo3, and the points S1, S2, ..., S n Composition, collectively referred to as S i , S i For Ray OS s1 、OS s2 、OS sn With the ellipsoid F e The intersection point of the ray and the ellipsoid is calculated by combining the parametric equation of the line with the equation of the ellipsoid to obtain the root.
[0007] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. After the computer program is run, any of the above methods is executed.
[0008] The present invention also discloses a computer system, including a processor and a storage medium, wherein a computer program is stored on the storage medium, and the processor reads and runs the computer program from the storage medium to execute any of the methods described above.
[0009] The beneficial effects of the present invention are: The Boolean operation method of ellipsoid polygon based on regular sphere mapping proposed in this invention converts the complex Boolean operation of ellipsoid into the common operation of regular sphere by mapping ellipsoid polygon with regular sphere polygon, so as to improve the calculation efficiency and accuracy of such problems. The successful application of this technology will greatly promote the development of geographic information system, remote sensing science and spatial information analysis.
[0010] When calculating polygonal Boolean operations on an ellipsoid, the advantages of mapping to a true sphere are: 1. Simple geometric transformation: The ellipsoid is parameterized into a unit sphere through linear scaling, and the transformation and inverse transformation are efficient and simple to implement mathematically. 2. Symmetry and consistency: The uniform curvature of the true sphere avoids anisotropic interference, making it easier to uniformly handle geometric calculations such as intersections and normal vectors. 3. Reduce projection deformation: Only uniform scaling is required to avoid area, angle or length deformation caused by plane projection, making it easier to maintain the accuracy of geometric properties. In application areas that are sensitive to geometric properties, such as scientific computing, when mapped to a true sphere, accuracy and conformality can be guaranteed. 4. Good global consistency: Suitable for processing polygons scattered on the ellipsoid, without having to deal with multi-region splicing problems. 5. More applicable to scenes with smaller flattening: When processing Boolean operations on the surfaces of celestial bodies such as the earth and the moon, the flattening is small and close to the true sphere, and mapping to the true sphere has obvious advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the 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 creative work.
[0012] Figure 1 is a schematic diagram of an embodiment of the present invention; Figure 2 Schematic diagram of a polygon SPoly1 mapped to a perfect sphere by Poly1 in an embodiment of the present invention; Figure 3 Schematic diagram of the intersection calculation for a ray and an ellipsoid. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] like Figure 1 In view of the difficulties of the Boolean operation method of ellipsoid polygons, the present invention proposes a Boolean operation method of ellipsoid polygons based on positive spherical mapping. The core of this method is that it does not require meshing and can also optimize the deformation problem of projection to the plane. Specifically, a Boolean operation method of ellipsoid polygons based on positive spherical mapping includes the following steps: S1, maps the polygonal vertices of the ellipsoid to a true sphere.
[0015] Implementation example Figure 1 and Figure 2 As shown: Step S1 specifically includes the following steps: S11, the ellipsoid is denoted as Fe, and the two polygons Poly1 and Poly2 on it are taken as examples of polygons with three vertices and four vertices, respectively, which are composed of three points (T1, T2, T3) and four points (R1, R2, R3, R4); the spherical surface is denoted as F s , using the same spatial rectangular coordinate system and the same center as the ellipsoid; S12, the ray used for spherical polygon mapping, is emitted from the coordinate origin O, passes through the vertices of the ellipsoid polygon, and the polygon formed by the intersection of the ray and the spherical surface is the mapped polygon; that is, for polygon Poly1, the rays OT1, OT2, OT3 and the spherical surface F s The intersection point T s1 , T s2 , T s3 Poly1 is mapped to the vertices of the sphere, and the vertices form the mapped polygon, denoted as SPoly1, such as Figure 2 As shown; for polygon Poly2, rays OR1, OR2, OR3, OR4 and the spherical surface F s The intersection point R s1 , R s2 , R s3 , R s4 The vertices of Poly2 mapped to the sphere constitute the mapped polygon, which is recorded as SPoly2.
[0016] S2, Boolean operation of the spherical polygon after mapping on the spherical surface. Specifically, the result of the Boolean operation on SPoly1 and SPoly2 is SGeo3, whose boundary points are (S s1 , S s2 ,…,S sn ).
[0017] S3, mapping the result of the polygon Boolean operation on the regular sphere to the original ellipsoidal surface as the result of the polygon Boolean operation on the ellipsoidal surface.
[0018] Specifically, the result of the Boolean operation SGeo3 (S s1 , S s2 ,…,S sn), is reversely mapped to the original ellipsoid as the result of the polygon Boolean operation on the ellipsoid; specifically, the geometric shape reversely mapped to the ellipsoid is Geo3, and the points S1, S2, ..., S n Composition, collectively referred to as S i , S i For Ray OS s1 、OS s2 、OS sn With the ellipsoid F e The intersection of .
[0019] The intersection point between the ray and the ellipsoid is calculated by combining the linear parametric equation with the ellipsoid equation to obtain the root. Figure 3 As shown, the calculation method of the intersection point between the ray and the ellipsoid is as follows: According to the earth's ellipse equation: (1) The coordinates of the origin O are , is the radius of the Earth's ellipsoid axis; Use the geocentric origin O as the origin of the coordinate system. The earth ellipse equation is expressed as: (2) The coordinates of observation point A are , the coordinates of the observed point B are , and the coordinates of the origin O are ; but ,in (3) (4) Expression for parametric equation of a straight line in space: (5) Where t is the coefficient of variation of the linear parameter equation; Substituting the parametric equation of the straight line in space into the earth's ellipse equation, we can get: (6) After simplification: (7) The discriminant of the roots of a linear equation of two variables is obtained: (8) when When , the line of sight segment AB has no intersection with the maximum elevation sphere; when When , the line of sight segment AB is tangent to the maximum elevation sphere and has one intersection point; when When , the line of sight segment AB or its extension line has two intersection points with the maximum elevation sphere.
[0020] The present invention provides a new solution for the accurate analysis and operation of polygons on the earth's surface. The successful application of this technology will greatly promote the development of geographic information systems, remote sensing science, and spatial information analysis.
[0021] When calculating polygonal Boolean operations on an ellipsoid, the advantages of mapping to a true sphere are: 1. Simple geometric transformation: The ellipsoid is parameterized into a unit sphere through linear scaling, and the transformation and inverse transformation are efficient and simple to implement mathematically. 2. Symmetry and consistency: The uniform curvature of the true sphere avoids anisotropic interference, making it easier to uniformly handle geometric calculations such as intersections and normal vectors. 3. Reduce projection deformation: Only uniform scaling is required to avoid area, angle or length deformation caused by plane projection, making it easier to maintain the accuracy of geometric properties. In application areas that are sensitive to geometric properties, such as scientific computing, when mapped to a true sphere, accuracy and conformality can be guaranteed. 4. Good global consistency: Suitable for processing polygons scattered on the ellipsoid, without having to deal with multi-region splicing problems. 5. More applicable to scenes with smaller flattening: When processing Boolean operations on the surfaces of celestial bodies such as the earth and the moon, the flattening is small and close to the true sphere, and mapping to the true sphere has obvious advantages.
[0022] The present invention also discloses a computer-readable storage medium and a computer system. The computer-readable storage medium stores a computer program, and after the computer program is run, the method described in any one of the above is executed. A computer system includes a processor and a storage medium, wherein the storage medium stores a computer program, and the processor reads and runs the computer program from the storage medium to execute any one of the above methods.
[0023] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.
[0024] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.
[0025] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.
[0026] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0027] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.
[0028] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Boolean operation method for ellipsoidal polygons based on spherical mapping, characterized in that: The following steps are involved: S1, maps the polygonal vertices of the ellipsoid to a true sphere; S2, Boolean operation of the spherical polygon after mapping on the spherical surface; S3, mapping the result of the polygon Boolean operation on the regular sphere to the original ellipsoidal surface as the result of the polygon Boolean operation on the ellipsoidal surface.
2. The method according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11, ellipsoidal surface is denoted as F e , and select two polygons Poly1 and Poly2 on it, and the positive sphere is recorded as F s , using the same spatial rectangular coordinate system and the same center as the ellipsoid; S12, the ray used for spherical polygon mapping, is emitted from the coordinate origin O, passes through the vertices of the ellipsoid polygon, and the ray is aligned with the spherical surface F s The polygon formed by the intersection of is the mapped polygon; that is, for polygon Poly1, the mapped polygon is recorded as SPoly1; for polygon Poly2, the mapped polygon is recorded as SPoly2.
3. The method according to claim 2, characterized in that: Step S2 performs Boolean operation on SPoly1 and SPoly2 to obtain SGeo3, whose boundary points are (S s1 , S s2 ,…,S sn ).
4. The method according to claim 3, characterized in that: The result of the Boolean operation SGeo3 (S s1 , S s2 ,…,S sn ), is reversely mapped to the original ellipsoid as the result of the polygon Boolean operation on the ellipsoid; specifically, the geometric shape reversely mapped to the ellipsoid is Geo3, and the points S1, S2, ..., S n Composition, collectively referred to as S i , S i For Ray OS s1 、OS s2 、OS sn With the ellipsoid F e The intersection of The intersection point between the ray and the ellipsoid is calculated by taking the root of the linear parametric equation and the ellipsoid equation.
5. A computer-readable storage medium, characterized in that: A computer program is stored on the medium, and after the computer program is run, the method according to any one of claims 1 to 4 is executed.
6. A computer system, characterized in that: The method comprises a processor and a storage medium, wherein a computer program is stored in the storage medium, and the processor reads and runs the computer program from the storage medium to execute the method as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for switching coordinates of WGS84 ellipsoid and Clarke 80 ellipsoid
CN101532834A
Earth surface polygon Boolean operation algorithm and computer system
CN115018697A
Method for determining planar projection of property and data projected on virtual spherical surface, involves providing value distribution on spherical surface or hemisphere surface, where value distribution is relevant to property
DE102012109105A1
Tiled projections for planar processing of round earth data
US20090123088A1