Boundary simplification method and device, electronic equipment and storage medium
By determining the undelete and deletionable spatial points in high-precision geographic boundary data and simplifying the processing based on deflected data, the problem of large space occupancy of boundary data is solved, and efficient storage and rendering of boundary data is achieved.
Patent Information
- Application Number
- CN202411216377.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
AI Technical Summary
High-precision geographic boundary data occupies a large storage space, requires high requirements for front-end map rendering resources, and the prior art is difficult to simplify processing while maintaining the boundary seamless state.
By determining non-deletion and deletionable spatial points, boundary data is simplified based on deflected data of deletionable spatial points, ensuring seamless boundary state and reducing data volume.
It effectively reduces the storage amount and rendering pressure of boundary data, improves the rendering efficiency of boundary data, and maintains the original outline of boundary data.
Smart Images

Figure CN119201915A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart city technology, and in particular to a boundary simplification method, device, electronic device and storage medium. Background Art
[0002] With the continuous development of geographic information systems, a large amount of high-precision geographic boundary data has been generated, such as administrative district boundary data. High-precision geographic boundary data is very important spatial data and has a wide range of application scenarios.
[0003] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art: high-precision geographic boundary data also occupies a large storage space and has high requirements for front-end map rendering resources. Summary of the invention
[0004] The present invention provides a boundary simplification method, device, electronic device and storage medium to simplify boundary data, reduce the data volume of boundary data, reduce the storage volume of boundary data, and improve the rendering efficiency of boundary data.
[0005] According to one aspect of the present invention, there is provided a boundary simplification method, comprising:
[0006] Get the set of spatial points of the boundary to be simplified;
[0007] Determine the non-deletable spatial points and the deletable spatial points in the set of spatial points of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the set of spatial points of the boundary to be simplified except the non-deletable spatial points;
[0008] The deflection data corresponding to each of the deletable spatial points is determined, and the spatial point set of the boundary to be simplified is simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified spatial point set.
[0009] Optionally, the set of spatial points of the boundary to be simplified is a set of spatial points of at least one boundary;
[0010] The non-deletable spatial point includes a first spatial point and a second spatial point, wherein the first spatial point is an intersection point of three or more boundaries; and the second spatial point is a bifurcation point of two boundaries.
[0011] Optionally, determining the deflection data corresponding to each of the deletable spatial points includes: for any deletable spatial point, determining a deflection area corresponding to the deletable spatial point based on adjacent spatial points of the deletable spatial point; and determining the deflection data corresponding to the deletable spatial point based on the deflection area corresponding to the deletable spatial point.
[0012] Optionally, the deflection data corresponding to the deletable spatial point is determined based on the deflection area corresponding to the deletable spatial point, including: determining the deflection angle corresponding to the deletable spatial point based on adjacent spatial points of the deletable spatial point; determining weight data based on the deflection angle corresponding to the deletable spatial point, the weight data being negatively correlated with the deflection angle; and determining the deflection data corresponding to the deletable spatial point based on the product of the weight data and the deflection area.
[0013] Optionally, the set of spatial points of the boundary to be simplified is simplified based on the deflection data corresponding to each of the deletable spatial points, including: determining the spatial points to be deleted based on the deflection data corresponding to the deletable spatial points, and deleting the spatial points to be deleted; when the deleted spatial points do not meet the simplification conditions, updating the deletable spatial points and the deflection data of the deletable spatial points, and determining new spatial points to be deleted based on the updated deflection data of the deletable spatial points.
[0014] Optionally, after determining the spatial point to be deleted based on the deflection data corresponding to the deletable spatial point, it also includes: determining the boundary to which the spatial point to be deleted belongs, and if the number of undeleted spatial points in any boundary to which the spatial point to be deleted belongs is less than or equal to a first threshold, determining that the spatial point to be deleted is an undeletable spatial point, and removing the spatial point to be deleted from the deletable spatial points.
[0015] Optionally, the method further includes: obtaining a target simplification rate;
[0016] The simplification condition includes that the simplification rate corresponding to the deleted spatial points satisfies the target simplification rate.
[0017] Optionally, after obtaining the target simplification rate, it also includes: determining the minimum number of retained points of the boundary to be simplified, and determining the minimum simplification rate based on the minimum number of retained points; if the target simplification rate is less than the minimum simplification rate, generating abnormal prompt information of the target simplification rate.
[0018] Optionally, the boundary to be simplified corresponds to at least one spatial surface;
[0019] The minimum number of retained points of the boundary to be simplified is the sum of the minimum number of retained points corresponding to each spatial surface; the minimum number of retained points corresponding to any spatial surface is a preset number, or is determined based on the number of non-deletable spatial points corresponding to the spatial surface.
[0020] According to another aspect of the present invention, there is provided a boundary simplification device, comprising:
[0021] A spatial point acquisition module is used to acquire a set of spatial points of the boundary to be simplified;
[0022] A deletable spatial point determination module, used to determine the non-deletable spatial points and the deletable spatial points in the spatial point set of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the spatial point set of the boundary to be simplified except the non-deletable spatial points;
[0023] The simplification module is used to determine the deflection data corresponding to each of the deletable spatial points, and simplify the spatial point set of the boundary to be simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified spatial point set.
[0024] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0025] at least one processor; and
[0026] a memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the boundary simplification method described in any embodiment of the present invention.
[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the boundary simplification method described in any embodiment of the present invention when executed.
[0029] The technical solution of the embodiment of the present invention determines the non-deletable spatial points used to maintain the seamless state of the boundary and the deletable spatial points other than the non-deletable spatial points in the set of spatial points of the boundary to be simplified, and simplifies the deletable spatial points to achieve boundary simplification while ensuring the seamless state of the boundary. For the deletable spatial points, the offset data corresponding to each deletable spatial point is determined, which can be used to characterize the degree of influence on the boundary when each deletable spatial point is simplified. The boundary is simplified by using the offset data corresponding to each deletable spatial point, so as to reduce the influence on the original contour of the boundary during the process of boundary simplification.
[0030] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0032] Figure 1 The left and right images in the middle are schematic diagrams of the boundaries of different areas;
[0033] Figure 2 is a flow chart of a boundary simplification method provided by an embodiment of the present invention;
[0034] Figure 3 is a schematic diagram of a first spatial point provided by an embodiment of the present invention;
[0035] Figure 4 is a schematic diagram of a second spatial point provided by an embodiment of the present invention;
[0036] Figure 5 is a schematic diagram of the boundary before and after simplification provided by an embodiment of the present invention;
[0037] Figure 6 is a flow chart of a boundary simplification method provided by an embodiment of the present invention;
[0038] Figure 7 is a structural schematic diagram of a boundary simplification device provided by an embodiment of the present invention;
[0039] Figure 8 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only 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 should fall within the scope of protection of the present invention.
[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0042] In map data, in order to distinguish different areas, geographic boundaries are set between the spatial surfaces of different areas. For example, a city may include multiple administrative areas, and the same administrative area may include multiple street areas. The above different areas are divided by geographic boundaries to display multiple areas to users. Among them, the same area may include one or more spatial surfaces, and the spatial surface may include or exclude empty areas. Among them, the empty area may border the spatial surface at the geographical level, but does not belong to the spatial surface. For example, the spatial surface can be marked as pg= <shell,<hole1,hole2,…,hole h >>, where shell represents the shell of the spatial surface, hole represents the hole area of the spatial surface, and h is the number of hole areas, which can be an integer greater than or equal to 0.
[0043] Each spatial surface is respectively provided with a boundary, such as an outer boundary of the spatial surface, or an outer boundary of the spatial surface and a boundary of the hollow region. Figure 1 , Figure 1 The left and right images in the middle are schematic diagrams of the boundaries of different areas. Figure 1 The middle left picture is a schematic diagram of area A, which includes a spatial surface 1, and the spatial surface 1 includes a hole area. For example, the hole area can be an enclave corresponding to other spatial surfaces; accordingly, the boundary of area A includes the outer boundary of the spatial surface 1 and the boundary of the hole area. Figure 1 The middle right figure is a schematic diagram of region B, including space surface 2 and space surface 3. Here, the area corresponding to space surface 3 can be an enclave of region B. Correspondingly, the boundary of region B includes the outer boundary of space surface 2 and the outer boundary of space surface 3.
[0044] The spatial surface includes spatial points, which can be represented by the longitude and latitude data of the spatial points. Accordingly, each boundary includes K-space points, and any boundary can be represented as <pt1,pt2,…,pt k>, where pt1 = pt k , indicating that the first spatial point and the last spatial point are connected end to end to form a closed space, that is, the number of spatial points contained in any boundary (the boundary outside the spatial surface or the boundary of the hole area) is K-1.
[0045] Divide a complete area S by boundaries to reach any spatial point p in space t , the spatial point has only one divided boundary b corresponding to it, indicating that the boundary of the complete region S has reached a seamless state. Exemplarily, the boundary divides the complete region S into n sub-regions, and any spatial point in the complete region S belongs to a sub-region, and does not belong to two or more sub-regions at the same time, or does not belong to any sub-region.
[0046] Each boundary includes multiple spatial points, especially high-precision boundaries include a large number of spatial points, which takes up a large amount of storage space, occupies rendering resources and has the problem of rendering waiting during the rendering process of the boundary. In view of the above problems, the spatial points in the boundary are simplified to reduce the number of spatial points in the boundary and reduce the pressure of boundary rendering. Among them, due to the adjacent relationship between different geographical areas, the method of simplifying each boundary separately may destroy the seamless state of the boundary. An embodiment of the present invention provides a boundary simplification method, which can simplify at least one boundary, maintain the seamless state of the boundary during the simplification process, and try to keep the original outline of the boundary.
[0047] See also Figure 2 , Figure 2 is a flow chart of a boundary simplification method provided by an embodiment of the present invention. This embodiment is applicable to the case of simplifying the spatial points included in at least one boundary. The method can be executed by a boundary simplification device. The boundary simplification device can be implemented in the form of hardware and / or software. The boundary simplification device can be configured in electronic devices such as mobile phones, computers and servers. Figure 2 As shown, the method includes:
[0048] S110, obtaining a set of spatial points of the boundary to be simplified.
[0049] S120, determining the non-deletable spatial points and the deletable spatial points in the set of spatial points of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the set of spatial points of the boundary to be simplified except the non-deletable spatial points.
[0050] S130, determining the deflection data corresponding to each of the deletable spatial points, and simplifying the spatial point set of the boundary to be simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified spatial point set.
[0051] In this embodiment, the boundary to be simplified is determined, and the spatial points in the boundary to be simplified are extracted to form a set of spatial points of the boundary to be simplified. Optionally, the boundary to be simplified can be selected by displaying map data in an interactive page, and in response to a boundary selection operation in the map data, the boundary to be simplified is determined, wherein the boundary selection operation can be a click operation, and the boundary of the area where the location point of the click operation is located is used as the boundary to be simplified; the boundary selection operation can be a box selection operation or a line operation, and the boundary of the area within the selection box or the closed trajectory line is used as the boundary to be simplified. Optionally, the boundary to be simplified can be selected by inputting a target area keyword, determining the target area based on the target area keyword, and determining the boundary of the target area and / or the boundary of the sub-area in the target area as the boundary to be simplified. The target area may include multiple levels of sub-areas. Optionally, the boundary of the target area and the boundary of the multiple levels of sub-areas are determined as the boundary to be simplified. Optionally, the boundary of the target area and the boundary of the next-level sub-area can be used as the boundary to be simplified for boundary simplification. For any sub-area, the sub-area can be used as a new target area, and the boundary of the new target area and the boundary of the next-level sub-area of the new target area can be used as the boundary to be simplified for boundary simplification. Boundary simplification is performed sequentially by dividing the regions into hierarchical levels.
[0052] The boundary to be simplified can be at least one boundary, that is, a set of multiple boundaries, which can be marked as B, B = {b1, b2, ..., b m}, m is the number of boundaries, m ≥ 1, correspondingly, each boundary is a set of spatial points, and the set of spatial points of the boundary to be simplified is a set of spatial points of at least one boundary. The total number of spatial points contained in the set can be represented by |B|, that is, |B| = |b1| + |b2| + ... + |b m |.
[0053] In this embodiment, the simplification process of the boundary to be simplified is achieved by deleting local spatial points in the boundary to be simplified. In order to ensure the seamless state of the boundary during the simplification process, the spatial points used to maintain the seamless state of the boundary are determined as non-deletable spatial points to ensure that the spatial points used to maintain the seamless state of the boundary are not deleted, thereby avoiding the simplification process from breaking the seamless state of the boundary. It is understandable that the deletion of spatial points used to maintain the seamless state of the boundary will result in some spatial points not belonging to any area or one spatial point belonging to multiple areas, further causing errors in the map data.
[0054] In the spatial point set of the boundary to be simplified, non-deletable spatial points are determined, and other spatial points in the spatial point set of the boundary to be simplified except the non-deletable spatial points are determined as deletable spatial points, and the deletable spatial points are simplified.
[0055] Optionally, the non-deletable spatial point includes a first spatial point and a second spatial point, wherein the first spatial point is the intersection point of three or more boundaries; and the second spatial point is the bifurcation point of two boundaries. For any spatial point in the set of spatial points of the boundary to be simplified, determine the boundary to which the spatial point belongs. If the number of boundaries to which the spatial point belongs is three or more, determine the spatial point as the first spatial point, and add the spatial point to the set of non-deletable spatial points. If the number of boundaries to which the spatial point belongs is two, determine whether the spatial point is the bifurcation point of the two boundaries to which it belongs. If so, determine that the spatial point is the second spatial point, and add the spatial point to the set of non-deletable spatial points. If not, determine that the spatial point is not the second spatial point. Among them, the method for determining whether the spatial point is the bifurcation point of the two boundaries to which it belongs may be to determine the adjacent spatial points of the spatial point in the two boundaries to which the spatial point belongs, that is, the previous spatial point and the next spatial point to which the spatial point corresponds in the two boundaries to which it belongs. If the previous spatial points corresponding to the spatial point in the two boundaries are different, or the next spatial points corresponding to the spatial point in the two boundaries are different, then the spatial point is determined to be the bifurcation point of the two boundaries. Alternatively, if the previous spatial points corresponding to the spatial point in the two boundaries belong to only one boundary, or the next spatial points corresponding to the spatial point in the two boundaries belong to only one boundary, then the spatial point is determined to be the bifurcation point of the two boundaries.
[0056] For example, see Figure 3 and Figure 4 , Figure 3 is a schematic diagram of a first spatial point provided by an embodiment of the present invention, Figure 4 It is a schematic diagram of a second spatial point provided by an embodiment of the present invention. Figure 3 The first spatial point is located at the boundary intersection of region A, region B and region C, that is, the first spatial point belongs to a point on the boundary of region A, region B and region C respectively. Figure 4 The second spatial point is a point on the boundary between area D and area E, and the previous spatial point and the next spatial point of the second spatial point belong to only one boundary. For example, the previous spatial point 1 of the second spatial point belongs only to the boundary of area D, and the previous spatial point 2 of the second spatial point belongs only to the boundary of area E.
[0057] Determine the first spatial point and the second spatial point in the set of spatial points of the boundary to be simplified, add the first spatial point and the second spatial point to the set of non-deletable spatial points, and determine the other spatial points in the set of spatial points of the boundary to be simplified except the first spatial point and the second spatial point as deletable spatial points, and add them to the set of deletable spatial points.
[0058] For multiple deletable spatial points in the deletable spatial point set, the deflection data of each deletable spatial point is determined, and the deflection data characterizes the degree of displacement of the boundary of the deletable spatial point when it is simplified, that is, the degree of contribution of the deletable spatial point to maintaining the original contour of the boundary. The larger the offset data corresponding to the deletable spatial point, the greater the influence of the deletable spatial point on maintaining the original contour of the boundary when it is simplified. By determining the offset data of each deletable spatial point in the deletable spatial point set, the spatial points that have little influence on maintaining the original contour of the boundary are deleted, so as to reduce the number of spatial points on the boundary while maintaining the original contour of the boundary.
[0059] In some embodiments, a simulated simplified boundary corresponding to a deletable spatial point is determined, that is, a simplified boundary obtained after simulating and deleting the deletable spatial point, and boundary contour change data is determined based on the simulated simplified boundary and the original boundary without deleting the deletable spatial point, and the boundary contour change data is used as the deflection data corresponding to the deletable spatial point. The boundary contour change data may include area change data and / or contour angle change data, and the deflection data corresponding to the deletable spatial point may be obtained based on a weighted calculation of the area change data and the contour angle change data.
[0060] In some embodiments, the deflection data corresponding to each of the deletable spatial points is determined, including: for any deletable spatial point, determining the deflection area corresponding to the deletable spatial point based on the adjacent spatial points of the deletable spatial point; and determining the deflection data corresponding to the deletable spatial point based on the deflection area corresponding to the deletable spatial point.
[0061] Among them, the adjacent spatial points of the deletable spatial point include the previous spatial point and the next spatial point of the deletable spatial point. It can be understood that in the set of spatial points of the boundary to be simplified, the identifier i of the spatial point is set according to the relative position relationship of the spatial point, that is, the spatial point can be represented as pt i , correspondingly, pt i The adjacent spatial point of can be pt i-1 and pt i+1 It is understandable that, since pt1 = pt k , we know that pt k The adjacent spatial point of can be pt k-1 and pt2, optionally, the adjacent spatial points of the deletable spatial point are the adjacent spatial points of the deletable spatial point in the non-deleted spatial points. Taking spatial point pt6 as an example, the adjacent spatial points may be pt5 and pt7. If pt7 and pt5 are not deleted, the adjacent spatial points of spatial point pt6 are pt7 and pt5. If pt5 is deleted and pt4 is not deleted, the adjacent spatial points of spatial point pt6 are pt7 and pt4.
[0062] Based on the line between the deletable spatial point, the previous spatial point of the deletable spatial point, and the next spatial point of the deletable spatial point, a triangular area can be formed, and the triangular area is a simplified area when the deletable spatial point is simplified, and the deflection data corresponding to the deletable spatial point is determined through the triangular area. Optionally, the deflection data corresponding to the deletable spatial point can be determined based on the deflection area of the triangular area, wherein the deflection area of the triangular area can be determined based on the coordinate data (such as longitude and latitude data) of the deletable spatial point, the previous spatial point of the deletable spatial point, and the next spatial point, or it can also be determined based on the number of pixels in the triangular area. Exemplarily, the deflection area of the simplified area corresponding to the deletable spatial point (i.e., the above-mentioned triangular area) is determined as the deflection data corresponding to the deletable spatial point.
[0063] It is understandable that the deletion of different spatial points has different degrees of influence on the boundary. Optionally, the degree of influence of a spatial point on the boundary is negatively correlated with the deflection angle corresponding to the spatial point, that is, the smaller the deflection angle corresponding to the spatial point, the greater the degree of influence of the spatial point on the boundary. The degree of influence of a spatial point on the boundary can be determined based on the comparison of the boundary contour before and after the deletion of the spatial point. The greater the change in the boundary contour after the deletion of the spatial point relative to the boundary contour before the deletion of the spatial point, the greater the degree of influence of the spatial point on the boundary.
[0064] Therefore, based on the above embodiment, the deflection angle corresponding to the deletable spatial point is obtained, and the deflection data corresponding to the deletable spatial point is determined based on the deflection angle and deflection area corresponding to the deletable spatial point. The deflection angle corresponding to the deletable spatial point can be an angle formed by taking the deletable spatial point as a vertex and the lines connecting the deletable spatial point and the adjacent spatial points as edges.
[0065] For example, the deflection angle and deflection area corresponding to the deletable spatial point are weighted to obtain the deflection data corresponding to the deletable spatial point, wherein the deflection data corresponding to the deletable spatial point is negatively correlated with the deflection angle corresponding to the deletable spatial point, and positively correlated with the deflection area corresponding to the deletable spatial point.
[0066] Optionally, determining the deflection data corresponding to the deletable spatial point based on the deflection area corresponding to the deletable spatial point includes: determining the deflection angle corresponding to the deletable spatial point based on adjacent spatial points of the deletable spatial point, determining weight data based on the deflection angle corresponding to the deletable spatial point, wherein the weight data is negatively correlated with the deflection angle; and determining the deflection data corresponding to the deletable spatial point based on the product of the weight data and the deflection area. For example, the weight data is determined based on the ratio of the deflection angle corresponding to the deletable spatial point to preset angle data (e.g., 180°).
[0067] Exemplarily, the deflection data corresponding to the deletable spatial point can be expressed based on the following formula:
[0068] wa(pt i )=(1-degree(pt i ) / 180)×area(pt i )
[0069] Among them, area(pt i ) indicates that the spatial point pt can be deleted i The previous spatial point pt of the boundary to which it belongs i-1 and the next spatial point pt i+1 The area of the triangle enclosed; degree (pt i ) means pt i ,pt i-1 and pt i+1 The space point pt can be deleted in the triangle formed i The corresponding angle ranges from 0° to 180°, and 1-degree (pt i ) / 180 is in the range of 0 to 1. When the deflection angle corresponding to the deletable space point is 180°, the deflection area corresponding to the deletable space point is zero, and the deflection data corresponding to the deletable space point is zero, that is, the deletable space point has no effect on the boundary contour when simplified.
[0070] Multiple deletable space points and the offset data corresponding to the deletable space points are stored in association. For example, the deletable space points and the offset data of the deletable space points can be stored in the deletable space point set in the form of key-value pairs, or in the form of data groups. <pt i ,wa i > is stored in the form of storage, and the storage form is not limited here.
[0071] Optionally, the offset data corresponding to each deletable spatial point is sorted, for example, the offset data may be sorted from small to large, and the spatial points to be deleted are determined based on the sorting of the deletable spatial points, and the spatial points to be deleted are deleted from the set of spatial points of the boundary to be simplified to obtain a set of spatial points of the simplified boundary, and the spatial points in the set of spatial points of the simplified boundary can form a simplified boundary. Exemplarily, based on the sorting of the deletable spatial points, a preset number or a preset proportion of deletable spatial points may be determined as the spatial points to be deleted. The preset number or the preset proportion may be determined according to the simplification condition.
[0072] It is understandable that when a deletable spatial point is deleted, it will affect the offset data corresponding to other deletable spatial points. In order to improve the accuracy of the boundary simplification process, the deletable spatial points in the set of spatial points of the boundary to be simplified are simplified based on an iterative simplification method. In each iterative simplification process, a spatial point to be deleted is determined and deleted, the offset data of other deletable spatial points are updated, and the next iterative simplification process is performed based on the offset data of the updated deletable spatial point to determine the next spatial point to be deleted and delete it until the simplification condition is met. The simplification condition can be a preset simplification rate, wherein the preset simplification rate can be the ratio of the expected number of remaining spatial points to the number of spatial points in the set of spatial points of the boundary to be simplified.
[0073] Optionally, the set of spatial points of the boundary to be simplified is simplified based on the deflection data corresponding to each of the deletable spatial points, including: determining the spatial points to be deleted based on the deflection data corresponding to the deletable spatial points, and deleting the spatial points to be deleted; when the deleted spatial points do not meet the simplification conditions, updating the deletable spatial points and the deflection data of the deletable spatial points, and determining new spatial points to be deleted based on the updated deflection data of the deletable spatial points.
[0074] The spatial point to be deleted is the spatial point with the smallest deflection data in the deletable spatial point set. In each iterative simplification process, the spatial point to be deleted is deleted and removed from the deletable spatial point set to update the deletable spatial point set.
[0075] It can be understood that, in the case of deleting the spatial point to be deleted, the deletable spatial point whose offset data has changed in the deletable spatial point set is the adjacent spatial point of the above-mentioned spatial point to be deleted. Update the offset data of the above-mentioned adjacent spatial point. For example, taking the adjacent spatial point of the above-mentioned spatial point to be deleted as spatial point A, determine the new adjacent spatial point of the spatial point A, obtain the new offset area and offset angle, and recalculate the offset data of spatial point A. Determine the new spatial point to be deleted based on the offset data of each deletable spatial point in the updated deletable spatial point set. Iterate the above-mentioned simplification process until the simplification condition is met, end the simplification process, and the spatial points that have not been deleted form a simplified spatial point set.
[0076] In the above embodiment, in each iterative simplification process, after determining the spatial point to be deleted, it also includes: determining the boundary to which the spatial point to be deleted belongs, if the number of undeleted spatial points in any boundary to which the spatial point to be deleted belongs is less than or equal to a first threshold, then determining that the spatial point to be deleted is an undeletable spatial point, and removing the spatial point to be deleted from the deletable spatial points.
[0077] It can be explained that one spatial surface corresponds to one boundary, and one boundary includes at least three spatial points to form the outline of the spatial surface, so the minimum number of retained points in each boundary is 3. After determining the spatial point to be deleted, the number of undeleted spatial points of the boundary to which the spatial point to be deleted belongs is determined, and the number of undeleted spatial points of the boundary to which the spatial point to be deleted belongs is verified based on the first threshold. The above-mentioned first threshold can be the minimum number of retained points. If the number of undeleted spatial points of the boundary to which the spatial point to be deleted belongs is less than or equal to the first threshold, the spatial point to be deleted is determined as an undeletable spatial point and is not deleted. If the number of undeleted spatial points of the boundary to which the spatial point to be deleted belongs is greater than the first threshold, the spatial point to be deleted is deleted.
[0078] Record the number of deleted spatial points, and in each iterative simplification process, determine whether the number of deleted spatial points meets the simplification condition, and if so, stop the simplification process. Recording the number of deleted spatial points can be determining the number of boundaries to which the to-be-deleted spatial points belong, and correspondingly, the number of deleted spatial points can be the sum of the number of deleted spatial points and the number of boundaries to which the to-be-deleted spatial points belong, wherein the number of deleted spatial points is the number of spatial points deleted in the historical iteration.
[0079] The simplified boundary is formed based on the simplified set of spatial points, for example, see Figure 5 , Figure 5 This is a schematic diagram of the boundary before and after simplification provided by an embodiment of the present invention. The two boundaries before simplification include 790 and 662 spatial points respectively, and after simplification, they include 17 and 17 spatial points respectively. The simplification rate r = (17 + 17) / (790 + 662) = 0.0234, which reduces the number of spatial points on the boundary and reduces the pressure on storage and rendering.
[0080] A display request for a target area is received, a simplified spatial point set corresponding to the target area is called, and based on the positional relationship of the spatial points included in the simplified spatial point set, adjacent spatial points are connected by line segments to form a simplified boundary of the target area, and the simplified boundary of the target area is displayed.
[0081] The technical solution of this embodiment is to simplify the deletable spatial points by determining the non-deletable spatial points used to maintain the seamless state of the boundary and the deletable spatial points other than the non-deletable spatial points in the set of spatial points of the boundary to be simplified, so as to achieve boundary simplification while ensuring the seamless state of the boundary. For the deletable spatial points, the offset data corresponding to each deletable spatial point is determined, which can be used to characterize the degree of influence on the boundary when each deletable spatial point is simplified. The boundary is simplified by using the offset data corresponding to each deletable spatial point, so as to reduce the influence on the original contour of the boundary during the process of boundary simplification.
[0082] Figure 6 FIG. 1 is a flow chart of a boundary simplification method provided by an embodiment of the present invention. Based on the above embodiment, a target simplification rate is set to simplify the boundary based on the target simplification rate. Figure 6 As shown, the method includes:
[0083] S210, obtaining a set of spatial points of a boundary to be simplified, and obtaining a target simplification rate.
[0084] S220, determining the non-deletable spatial points and the deletable spatial points in the set of spatial points of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the set of spatial points of the boundary to be simplified except the non-deletable spatial points.
[0085] S230, determining the deflection data corresponding to each of the deletable spatial points.
[0086] S240, determining the spatial points to be deleted based on the deflection data corresponding to the deletable spatial points, deleting the spatial points to be deleted, and when the simplification rate corresponding to the deleted spatial points does not meet the target simplification rate, executing step S250; when the simplification rate corresponding to the deleted spatial points meets the target simplification rate, forming a simplified spatial point set based on the non-deleted spatial points.
[0087] S250, updating the deletable spatial point and the deflection data of the deletable spatial point, and continuing to execute S240 based on the updated deflection data of the deletable spatial point to determine a new spatial point to be deleted.
[0088] The target simplification rate is the ratio of the target remaining spatial point data to the number of spatial points in the spatial point set of the boundary to be simplified.
[0089] By setting the target simplification rate, the spatial points in the set of spatial points of the boundary to be simplified are simplified based on the target simplification rate to obtain a simplified boundary corresponding to the target simplification rate. Accordingly, by setting different target simplification rates, simplified boundaries corresponding to different target simplification rates can be obtained to meet different simplification requirements.
[0090] Optionally, there is at least one target simplification rate, and based on each target simplification rate, a set of spatial points to be simplified of the boundary is simplified to obtain a simplified set of spatial points corresponding to at least one target simplification rate. The simplified set of spatial points corresponding to each target simplification rate can be used to generate a simplified boundary corresponding to the target simplification rate.
[0091] In the process of iteratively simplifying the spatial points in the spatial point set of the simplified boundary based on any target simplification rate, in each iteration, the spatial points to be deleted are determined in the deletable spatial point set corresponding to the current iteration, the spatial points to be deleted are deleted, and it is judged whether the non-deleted spatial points meet the target simplification rate. If not, the next iterative simplification process is continued until it is determined whether the non-deleted spatial points meet the target simplification rate. The simplification process is stopped and the non-deleted spatial points form a simplified spatial point set corresponding to the target simplification rate.
[0092] On the basis of the above embodiments, in order to ensure the seamless state of the boundary and that the remaining spatial points in the boundary can form a valid spatial surface, the boundary cannot be simplified indefinitely. Accordingly, after obtaining the target simplification rate, the rationality of the target simplification rate is verified. If the verification result of the target simplification rate is unreasonable, it indicates that the simplified boundary obtained based on the target simplification rate cannot ensure the seamless state of the boundary, or cannot form a valid spatial surface.
[0093] Optionally, after obtaining the target simplification rate, it also includes: determining the minimum number of retained points of the boundary to be simplified, and determining the minimum simplification rate based on the minimum number of retained points; if the target simplification rate is less than the minimum simplification rate, generating abnormal prompt information of the target simplification rate.
[0094] The minimum reserved points of the boundary to be simplified include non-deletable spatial points for maintaining the seamless state of the boundary and spatial points forming the effective spatial surface, wherein the non-deletable spatial points for maintaining the seamless state of the boundary and the spatial points forming the effective spatial surface can overlap. It can be explained that the number of spatial points forming the effective spatial surface is 3, and the positions of the spatial points forming the effective spatial surface are not limited.
[0095] The boundary to be simplified corresponds to at least one spatial surface. The number of spatial surfaces corresponding to the boundary to be simplified is determined. Each spatial surface is traversed to determine the minimum number of retained points corresponding to each spatial surface. The minimum number of retained points of the boundary to be simplified is the sum of the minimum number of retained points corresponding to each spatial surface.
[0096] For any spatial surface, when the number of spatial points included in the corresponding boundary of the spatial surface is a preset number, the minimum number of retained points corresponding to the spatial surface is set to the preset number. Here, the preset number can be the number of spatial points used to form a valid spatial surface, that is, the preset number can be 3.
[0097] For any spatial surface, when the number of spatial points included in the boundary corresponding to the spatial surface is greater than a preset number, the number of non-deletable spatial points in the boundary corresponding to the spatial surface is determined, and the minimum number of retained points corresponding to the spatial surface is determined based on the maximum value of the number of non-deletable spatial points and the preset number. Exemplarily, |pg| min =max(3,|pg| s ),|pg|min is the minimum number of reserved points corresponding to the spatial surface, |pg| s is the number of non-deletable spatial points in the boundary corresponding to the spatial surface. It can be understood that since the spatial point pt1 in the boundary is pt k Therefore, when k=4, the number of spatial points included in the corresponding boundary of the spatial surface is 3.
[0098] Based on the above method, the minimum number of retained points corresponding to each boundary is determined, and the sum of the minimum number of retained points corresponding to each boundary is used as the minimum number of retained points of the boundary to be simplified. Correspondingly, the minimum simplification rate is the ratio of the minimum number of retained points of the boundary to be simplified to the number of spatial points in the spatial point set of the boundary to be simplified. If the target simplification rate is less than the minimum simplification rate, it indicates that the simplification process to achieve the target simplification rate is not supported, and an abnormal prompt information of the target simplification rate is generated. If the target simplification rate is greater than or equal to the minimum simplification rate, it indicates that the simplification process to achieve the target simplification rate is supported, and a simplified spatial point set corresponding to the target simplification rate can be generated.
[0099] In some embodiments, simplified spatial point sets corresponding to a plurality of target simplification rates of a target area are stored; in response to a query operation on the target area, simplified spatial point sets corresponding to one or more target simplification rates are called to render the boundary of the target area. Optionally, the query operation includes requesting a simplification rate, and the corresponding simplified spatial point set is called based on the requested simplification rate. Optionally, the query operation includes network information of the requesting end, and the network information is used to ensure the network status of the requesting end, such as network speed information, etc. The recommended simplification rate is determined based on the network information of the requesting end, and the corresponding simplified spatial point set is called based on the recommended simplification rate.
[0100] In order to reduce the waiting time for rendering and improve the accuracy of the boundary, call the simplified spatial point sets corresponding to multiple target simplification rates of the target area, and according to the size of the target simplification rate, perform boundary rendering of the target area based on the simplified spatial point sets corresponding to the multiple target simplification rates in sequence. Based on the order of target simplification rates from small to large, call the simplified spatial point sets corresponding to the target simplification rates in sequence to render the boundary of the target area. By rendering the simplified spatial point set corresponding to the minimum target simplification rate first, the amount of rendering data is small, the rendering speed is fast, and the waiting time for rendering is reduced. In the process of displaying the simplified boundary corresponding to the minimum target simplification rate, the accuracy of the simplified boundary is improved by using the simplified spatial point sets corresponding to the larger target simplification rates, thereby improving the boundary accuracy.
[0101] The technical solution of this embodiment sets a target simplification rate, simplifies the set of spatial points of the boundary to be simplified based on the target simplification rate, and obtains a simplified set of spatial points corresponding to the target simplification rate, so as to obtain a simplified boundary corresponding to the target simplification rate to meet different simplification requirements.
[0102] Figure 7 Schematic diagram of the structure of a boundary simplification device provided by an embodiment of the present invention. Figure 7 As shown, the device comprises:
[0103] A spatial point acquisition module 310 is used to acquire a set of spatial points of a boundary to be simplified;
[0104] A deletable spatial point determination module 320 is used to determine the non-deletable spatial points and the deletable spatial points in the spatial point set of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the spatial point set of the boundary to be simplified except the non-deletable spatial points;
[0105] The simplification module 330 is used to determine the deflection data corresponding to each of the deletable spatial points, and simplify the spatial point set of the boundary to be simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified spatial point set.
[0106] The technical solution of this embodiment is to simplify the deletable spatial points by determining the non-deletable spatial points used to maintain the seamless state of the boundary and the deletable spatial points other than the non-deletable spatial points in the set of spatial points of the boundary to be simplified, so as to achieve boundary simplification while ensuring the seamless state of the boundary. For the deletable spatial points, the offset data corresponding to each deletable spatial point is determined, which can be used to characterize the degree of influence on the boundary when each deletable spatial point is simplified. The boundary is simplified by using the offset data corresponding to each deletable spatial point, so as to reduce the influence on the original contour of the boundary during the process of boundary simplification.
[0107] Based on the above embodiment, optionally, the set of spatial points of the boundary to be simplified is a set of spatial points of at least one boundary;
[0108] The non-deletable spatial point includes a first spatial point and a second spatial point, wherein the first spatial point is an intersection point of three or more boundaries; and the second spatial point is a bifurcation point of two boundaries.
[0109] Based on the above embodiment, optionally, the simplification module 330 is used to:
[0110] For any deletable spatial point, a deflection area corresponding to the deletable spatial point is determined based on adjacent spatial points of the deletable spatial point; and deflection data corresponding to the deletable spatial point is determined based on the deflection area corresponding to the deletable spatial point.
[0111] Optionally, the simplification module 330 is further configured to:
[0112] Determine the deflection angle corresponding to the deletable spatial point based on the adjacent spatial points of the deletable spatial point; determine weight data based on the deflection angle corresponding to the deletable spatial point, and the weight data is negatively correlated with the deflection angle; determine the deflection data corresponding to the deletable spatial point based on the product of the weight data and the deflection area.
[0113] Optionally, the simplification module 330 is also used to: determine the spatial point to be deleted based on the deflection data corresponding to the deletable spatial point, and delete the spatial point to be deleted; when the deleted spatial point does not meet the simplification condition, update the deletable spatial point and the deflection data of the deletable spatial point, and determine a new spatial point to be deleted based on the updated deflection data of the deletable spatial point.
[0114] Optionally, the simplification module 330 is also used to: determine the boundary to which the spatial point to be deleted belongs; if the number of undeleted spatial points in any boundary to which the spatial point to be deleted belongs is less than or equal to a first threshold, then determine that the spatial point to be deleted is an undeletable spatial point, and remove the spatial point to be deleted from the deletable spatial points.
[0115] On the basis of the above embodiment, the device further comprises: a target simplification rate acquisition module, used to acquire the target simplification rate;
[0116] The simplification condition includes that the simplification rate corresponding to the deleted spatial points satisfies the target simplification rate.
[0117] Based on the above embodiment, the device also includes: a target simplification rate verification module, which is used to determine the minimum number of retained points of the boundary to be simplified after obtaining the target simplification rate, and determine the minimum simplification rate based on the minimum number of retained points; if the target simplification rate is less than the minimum simplification rate, an abnormal prompt information of the target simplification rate is generated.
[0118] Optionally, the boundary to be simplified corresponds to at least one spatial surface; the minimum number of retained points of the boundary to be simplified is the sum of the minimum number of retained points corresponding to each spatial surface;
[0119] The minimum number of retained points corresponding to any spatial surface is a preset number, or is determined based on the number of non-deletable spatial points corresponding to the spatial surface.
[0120] The boundary simplification device provided in the embodiment of the present invention can execute the boundary simplification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0121] Figure 81 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0122] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0123] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0124] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the boundary simplification method.
[0125] In some embodiments, the boundary simplification method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the boundary simplification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the boundary simplification method in any other appropriate manner (e.g., by means of firmware).
[0126] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0127] The computer programs for implementing the boundary simplification method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0128] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a boundary simplification method, the method comprising:
[0129] Acquire a set of spatial points of a boundary to be simplified; determine the non-deletable spatial points and deletable spatial points in the set of spatial points of the boundary to be simplified, wherein the deletable spatial points are spatial points in the set of spatial points of the boundary to be simplified other than the non-deletable spatial points; determine the deflection data corresponding to each of the deletable spatial points, and simplify the set of spatial points of the boundary to be simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified set of spatial points.
[0130] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0133] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0135] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A boundary simplification method, characterized in that: include: Get the set of spatial points of the boundary to be simplified; Determine the non-deletable spatial points and the deletable spatial points in the set of spatial points of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the set of spatial points of the boundary to be simplified except the non-deletable spatial points; The deflection data corresponding to each of the deletable spatial points is determined, and the spatial point set of the boundary to be simplified is simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified spatial point set.
2. The method according to claim 1, characterized in that The spatial point set of the boundary to be simplified is a spatial point set of at least one boundary; The non-deletable spatial point includes a first spatial point and a second spatial point, wherein the first spatial point is an intersection point of three or more boundaries; and the second spatial point is a bifurcation point of two boundaries.
3. The method according to claim 1, characterized in that The determining of the deflection data corresponding to each of the deletable spatial points includes: For any deletable spatial point, determining a deflection area corresponding to the deletable spatial point based on adjacent spatial points of the deletable spatial point; Deflection data corresponding to the deletable spatial point is determined based on the deflection area corresponding to the deletable spatial point.
4. The method according to claim 3, characterized in that Determining the deflection data corresponding to the deletable spatial point based on the deflection area corresponding to the deletable spatial point includes: Determine a deflection angle corresponding to the deletable spatial point based on adjacent spatial points of the deletable spatial point, and determine weight data based on the deflection angle corresponding to the deletable spatial point, wherein the weight data is negatively correlated with the deflection angle; The deflection data corresponding to the deletable spatial point is determined based on the product of the weight data and the deflection area.
5. The method according to claim 1, characterized in that The simplifying process of the set of spatial points of the boundary to be simplified based on the deflection data corresponding to each of the deletable spatial points includes: Determine a spatial point to be deleted based on the deflection data corresponding to the deletable spatial point, and delete the spatial point to be deleted; When the deleted spatial point does not meet the simplification condition, the deletable spatial point and the deflection data of the deletable spatial point are updated, and a new spatial point to be deleted is determined based on the updated deflection data of the deletable spatial point.
6. The method according to claim 5, characterized in that After determining the spatial point to be deleted based on the deflection data corresponding to the deletable spatial point, the method further includes: Determine the boundary to which the to-be-deleted spatial point belongs. If the number of undeleted spatial points in any boundary to which the to-be-deleted spatial point belongs is less than or equal to a first threshold, determine that the to-be-deleted spatial point is an indeletable spatial point, and remove the to-be-deleted spatial point from the deletable spatial points.
7. The method according to claim 5, characterized in that The method further comprises: Get the target simplification rate; The simplification condition includes that the simplification rate corresponding to the deleted spatial points satisfies the target simplification rate.
8. The method according to claim 7, characterized in that After obtaining the target simplification rate, it also includes: Determine the minimum number of reserved points of the boundary to be simplified, and determine the minimum simplification rate based on the minimum number of reserved points; If the target simplification rate is less than the minimum simplification rate, abnormal prompt information of the target simplification rate is generated.
9. The method according to claim 8, characterized in that The boundary to be simplified corresponds to at least one spatial surface; The minimum number of points to be retained for the boundary to be simplified is the sum of the minimum number of points to be retained for each spatial surface; The minimum number of retained points corresponding to any spatial surface is a preset number, or is determined based on the number of non-deletable spatial points corresponding to the spatial surface.
10. A boundary simplification device, characterized in that: include: A spatial point acquisition module is used to acquire a set of spatial points of the boundary to be simplified; A deletable spatial point determination module, used to determine the non-deletable spatial points and the deletable spatial points in the spatial point set of the boundary to be simplified, wherein the deletable spatial points are the spatial points in the spatial point set of the boundary to be simplified except the non-deletable spatial points; The simplification module is used to determine the deflection data corresponding to each of the deletable spatial points, and simplify the spatial point set of the boundary to be simplified based on the deflection data corresponding to each of the deletable spatial points to obtain a simplified spatial point set.
11. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the boundary simplification method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the boundary simplification method according to any one of claims 1 to 9 when executed.
Citation Information
Patent Citations
A point cloud reduction method for reserving boundary points
CN109410342A
Polygon simplification method based on point deletion algorithm
CN109785404A
