A spatial data simplification method, system and medium
Through vector pyramid hierarchical processing, rasterization and watershed algorithm surface boundary data processing, combined with topological facets, the problem of shape and position changes during vector data simplification is solved, achieving efficient data simplification and ensuring display effects.
Patent Information
- Application Number
- CN202411596434.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-11
AI Technical Summary
When the prior art simplifies vector data, it is easy to cause changes in the shape and position of the data, affect the display effect, and has a low simplification efficiency.
By performing vector pyramid hierarchical processing on the target vector data, a pyramid hierarchical construction framework is obtained. Based on this, rasterization processing and watershed algorithm surface boundary data processing are performed, and finally the simplified vector data is obtained through topological faceting.
While ensuring the effect of vector data, the efficiency of simplification of data is improved, the complexity of calculation is reduced, and data can be displayed according to different levels of resolution.
Smart Images

Figure CN119128039B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a spatial data simplification method, system and medium. Background Art
[0002] In the current simplification methods for vector data, node thinning is usually used for processing. However, since the node thinning method involves thinning of the starting and ending points of different lines, the actual shape and position of the corresponding vector data may change after node thinning, which will have a negative impact on the display effect of the vector data. At the same time, after node thinning, this method also needs to resample the raster data to achieve hierarchical display, and the efficiency of data simplification is low.
[0003] Therefore, how to simplify vector data while ensuring the display effect and high simplification efficiency of vector data has become a technical problem that technical personnel in this field need to solve urgently. Summary of the invention
[0004] Based on the above problems, in order to ensure the display effect of vector data when simplifying vector data, the embodiments of the present application provide a spatial data simplification method, system and medium.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a spatial data simplification method, including:
[0007] Performing vector pyramid hierarchical processing on the target vector data to obtain a pyramid hierarchical construction framework of the target vector data; the pyramid hierarchical construction framework is used to characterize the hierarchical resolution corresponding to each hierarchical level in the target vector pyramid; the target vector pyramid corresponds to the target vector data;
[0008] Based on the hierarchical construction framework, the target vector data is rasterized to obtain target raster data;
[0009] Performing surface boundary data processing on the target raster data based on a watershed algorithm to obtain first surface boundary data; the first surface boundary data includes common edge data between adjacent surface objects in the target vector data;
[0010] Topological faceting is performed according to the first face boundary data to obtain simplified target vector data.
[0011] In a possible implementation, the step of performing surface boundary data processing on the target grid data based on a watershed algorithm to obtain first surface boundary data includes:
[0012] Performing region division processing on the target raster data to obtain a plurality of surface object regions; the pixel units in the surface object regions have corresponding region identifiers;
[0013] Determining the region common edges between the face object regions and the region boundaries of the face object regions according to the region identifiers corresponding to the pixel units in the face object regions;
[0014] The first surface boundary data is determined based on the region common edges and the region boundaries between the surface object regions.
[0015] In a possible implementation, after performing surface boundary data processing on the target grid data based on a watershed algorithm to obtain first surface boundary data, the method further includes:
[0016] Determine a plurality of boundary nodes in the first surface boundary data;
[0017] Perform node screening processing on the plurality of boundary nodes based on the pipe algorithm to obtain a plurality of boundary inflection points;
[0018] Contour line processing is performed according to the plurality of boundary inflection points to obtain second surface boundary data.
[0019] In a possible implementation, the node screening process is performed on the plurality of boundary nodes based on the pipe algorithm to obtain a plurality of boundary inflection points, including:
[0020] Performing node screening processing on the plurality of boundary inflection points through a node screening tube whose inner diameter is a preset threshold;
[0021] When the node offset of the boundary node is greater than the preset threshold, the boundary node is determined as the boundary inflection point.
[0022] In a possible implementation, the second surface boundary data includes: at least one of polygonal data and quadrilateral data; after performing contour processing according to the plurality of boundary inflection points to obtain the second surface boundary data, the method further includes:
[0023] For the polygonal data in the boundary of the second surface, performing corner square processing on the polygonal data by using a classified forced orthogonal method;
[0024] For the quadrilateral data in the boundary of the second surface, the quadrilateral data is subjected to a corner righting process by using a rectangle circumscribed circle method.
[0025] In a possible implementation, the target vector data includes a plurality of geographic objects; and the step of performing rasterization processing on the target vector data based on the hierarchical construction framework to obtain target raster data includes:
[0026] According to the hierarchical construction framework, each multi-level grid index corresponding to each geographic object is created; the multi-level grid index is used to represent the geographic object, and the grid index corresponding to different levels in the target vector pyramid;
[0027] Rasterization processing is performed based on each of the multi-level grid indexes corresponding to each of the geographic objects to obtain the target raster data.
[0028] In a possible implementation, after performing topological faceting according to the first surface boundary data to obtain simplified target vector data, the method further includes:
[0029] The target vector pyramid is constructed according to the simplified target vector data and the pyramid level construction framework; the target vector pyramid and the attribute fields of the target vector data are stored in the same database in an associated storage manner.
[0030] In a possible implementation, after constructing the target vector pyramid of the target vector data according to the simplified target vector data and the pyramid level construction framework, the method further includes:
[0031] In response to a target vector data display instruction, determining a target display resolution according to the target vector data display instruction;
[0032] The hierarchical vector data in the target vector pyramid, whose hierarchical resolution is the same as the target display resolution, is determined as output data for the target vector data display instruction.
[0033] In a second aspect, an embodiment of the present application further provides a spatial data reduction system, including:
[0034] A stratification module, used for performing vector pyramid stratification processing on the target vector data to obtain a pyramid hierarchical construction framework of the target vector data; the pyramid hierarchical construction framework is used for characterizing the hierarchical resolution corresponding to each level in the target vector pyramid; the target vector pyramid corresponds to the target vector data;
[0035] A rasterization module, used for performing rasterization processing on the target vector data based on the hierarchical construction framework to obtain target raster data;
[0036] A boundary processing module, used for performing surface boundary data processing on the target raster data based on a watershed algorithm to obtain first surface boundary data; the first surface boundary data includes common edge data between adjacent surface objects in the target vector data;
[0037] The topological faceting module is used to perform topological faceting according to the first surface boundary data to obtain simplified target vector data.
[0038] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any possible spatial data simplification method in the first aspect.
[0039] Compared with the prior art, the present application has the following beneficial effects: The embodiments of the present application provide a method, system and medium for spatial data simplification. In the method, the target vector data is firstly subjected to vector pyramid hierarchical processing to obtain a pyramid hierarchical construction framework for characterizing the resolution of each level. In this way, the data can be simplified to different degrees according to the hierarchical resolution corresponding to the vector data of different levels, thereby reducing the computational complexity of data simplification. At the same time, the vector data can also be displayed according to different hierarchical resolutions to ensure the display effect of the data.
[0040] Subsequently, based on the determined hierarchical construction framework, the target vector data is rasterized, thereby converting the complex structured vector data into pixel units of a single structure to reduce the complexity of data simplification processing. Furthermore, the target raster data is processed for face boundary data based on the watershed algorithm, thereby accurately marking the common edge data between adjacent face objects to prevent gaps between adjacent face objects when displaying vector data, ensuring the display effect of vector data, and obtaining the first face boundary data. Finally, the topological faceting is performed according to the first face boundary data to complete the data simplification process for the target vector data, and obtain the simplified target vector data, thereby improving the simplification efficiency of vector data while ensuring the display effect of vector data. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 A schematic diagram of a flow chart of a spatial data simplification method provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of the structure of a target vector pyramid provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of target grid data provided by an embodiment of the present application;
[0045] Figure 4 A schematic diagram of a multi-level grid index provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of a flow chart of a method for processing surface boundary data provided in an embodiment of the present application;
[0047] Figure 6 A schematic diagram of first surface boundary data provided in an embodiment of the present application;
[0048] Figure 7 A comparison diagram of the display effects of a target vector data provided in an embodiment of the present application and the target vector data after simplification processing;
[0049] Figure 8 A schematic diagram of a second surface boundary data after corner square processing provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of the structure of a spatial data simplification system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application more clear, the following is a further detailed description of this application in combination with specific embodiments and with reference to the accompanying drawings. It should be noted that the embodiments described in the embodiments of this application are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0052] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The words "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the objects being described are
[0053] When the absolute position changes, the relative position relationship may also change accordingly.
[0054] As described above, in the current simplification methods for vector data, node thinning is usually used for processing. However, since the node thinning method involves thinning of the starting and ending points of different lines, the actual shape and position of the corresponding vector data may change after node thinning, which will have a negative impact on the display effect of the vector data. At the same time, after node thinning, this method also needs to resample the raster data to achieve hierarchical display, and the efficiency of data simplification processing is low.
[0055] In order to solve the above problems, the embodiments of the present application provide a method, system and medium for spatial data simplification. In the method, the target vector data is first subjected to vector pyramid hierarchical processing to obtain a pyramid hierarchical construction framework for characterizing the resolution of each level. In this way, the data can be simplified to different degrees according to the hierarchical resolution corresponding to the vector data of different levels, thereby reducing the computational complexity of data simplification. At the same time, the vector data can also be displayed according to different hierarchical resolutions to ensure the display effect of the data.
[0056] Subsequently, based on the determined hierarchical construction framework, the target vector data is rasterized, thereby converting the complex structured vector data into pixel units of a single structure to reduce the complexity of data simplification processing. Furthermore, the target raster data is processed for face boundary data based on the watershed algorithm, thereby accurately marking the common edge data between adjacent face objects to prevent gaps between adjacent face objects when displaying vector data, ensuring the display effect of vector data, and obtaining the first face boundary data. Finally, the topological faceting is performed according to the first face boundary data to complete the data simplification process for the target vector data, and obtain the simplified target vector data, thereby improving the simplification efficiency of vector data while ensuring the display effect of vector data.
[0057] Next, the spatial data simplification method provided by the embodiment of the present application will be introduced in conjunction with the specific embodiment drawings. Figure 1 , which is a schematic diagram of a flow chart of a spatial data simplification method provided in an embodiment of the present application, and specifically includes the following steps:
[0058] S101: performing vector pyramid hierarchical processing on target vector data to obtain a pyramid hierarchical construction framework of the target vector data; the pyramid hierarchical construction framework is used to characterize the hierarchical resolution corresponding to each hierarchical level in the target vector pyramid; the target vector pyramid corresponds to the target vector data.
[0059] In the initial stage of data simplification of target vector data, in order to improve the simplification efficiency and display effect of target vector data, it is necessary to perform vector pyramid layering processing on the target vector data to obtain a pyramid level construction framework of the target vector data.
[0060] The pyramid hierarchical construction framework is used to characterize the hierarchical structure of the target vector pyramid and the specific hierarchical resolution of each level when the target vector data is transformed into its corresponding target vector pyramid. In the target vector pyramid, the target vector data in each layer corresponds to a different hierarchical resolution. Through the hierarchical resolution corresponding to each layer of vector data, simplification algorithms with different simplification degrees can be applied to vector data of different levels, so as to improve the simplification efficiency of vector data.
[0061] In a possible implementation, the global partial scale can be used to divide the pyramid levels corresponding to the target vector data, so as to obtain a pyramid level construction framework. Figure 2 A schematic diagram of the structure of a target vector pyramid is shown in FIG.
[0062] In the process of constructing the target vector pyramid, the global data is divided into multiple levels of grids through the quadtree method, and the scales of different levels are calculated according to the scale of the global part. For example, the first level of the target vector pyramid is set to 0, and the maximum level number is 22. For the calculation of the scale of the 0th level, the WGS1984 geographic coordinate system can be used to display the global data in full within the range of 512x512 pixels. At this time, the scale of the 0th level is 1:295,829,355.455. When calculating the scales of other levels, the grid can be divided into 4 parts step by step on the basis of the 0th level grid to form a higher level grid. Among them, the scale of each level is 1 / 2 of the scale of the previous level. The specific layering and scale values can be found in the following table:
[0063]
[0064] The above table shows the level resolution of each level in the target vector pyramid. The simplified resolution corresponding to the data simplification algorithm applied to each layer of data can be determined through the level resolution of each level and the resolution coefficient set by the user for each level. That is, level resolution * resolution coefficient = resolution used by the data simplification algorithm.
[0065] The data simplification algorithm will simplify the data at different levels in the target vector pyramid according to its specific resolution. The larger the resolution coefficient, the higher the corresponding simplified resolution and the greater the degree of data simplification. In this way, by determining the pyramid level construction framework of the target vector data, in the subsequent data simplification processing, different degrees of data simplification can be performed according to the level resolution specified by each level, thereby improving the efficiency of data simplification processing while ensuring the display effect of vector data.
[0066] S102: Based on the hierarchical construction framework, rasterize the target vector data to obtain target raster data.
[0067] After determining the hierarchical construction framework of the target vector data, the target vector data can be rasterized according to the hierarchical resolution corresponding to each level in the hierarchical construction framework, thereby converting the target vector data with complex geometric structure into target raster data with a single structure. For details, see Figure 3 A schematic diagram of a target raster data is shown.
[0068] As can be seen from the figure, compared with vector data with complex geometric structures, raster data has a regular pixel grid structure. In the process of converting target vector data into target raster data, each geometric object will be converted and mapped to a matrix composed of pixels. In this matrix, each pixel corresponds to a specific area in the actual geographic space. In this way, the processing of complex geographic objects can be transformed into processing for pixel units, thereby reducing the processing complexity of data simplification.
[0069] At the same time, the rasterization of the target vector data can also retain the information of smaller surface objects in the target vector data. When there are multiple smaller surface objects in a grid, the rasterization will calculate the total area ratio of these surface objects in the unit grid. When the area ratio exceeds 1 / 2 of the cell, it will be represented in the cell to avoid the problem of image display loss at a small scale.
[0070] In a possible implementation, in the process of rasterizing the target vector data based on the hierarchical construction framework, in order to improve the efficiency of the rasterization process, for the target vector data in each level, a multi-level grid index of each geographic object in the target vector data in the level can be created based on the level resolution corresponding to each level. The multi-level grid index is used to represent the grid index corresponding to the geographic object in different levels.
[0071] For details, please refer to Figure 4 The schematic diagram of a multi-level grid index shown in the figure shows that the target vector data often includes multiple geographic objects, and the degree of simplification of geographic objects in different levels of the pyramid varies to a certain extent. Therefore, when rasterizing the target vector data, a grid index of multiple geographic objects in different levels can be created first, and the grid index records the grid position actually occupied by each geographic object. In this way, when it is necessary to locate a specific geographic range, the selected geometric object can be quickly determined through the specific grid index, thereby improving the query and positioning efficiency of the displayed data within the view range and improving the rasterization processing efficiency of the target vector data.
[0072] S103: performing surface boundary data processing on the target raster data based on a watershed algorithm to obtain first surface boundary data; the first surface boundary data includes common edge data between adjacent surface objects in the target vector data.
[0073] In vector data with complex geometric structures, since the vector data includes multiple surface objects, there are often complex topological relationships such as intersection, adjacency, and inclusion between multiple surface objects. In the method of data simplification by node thinning mentioned above, since node thinning often involves thinning of different line starting points and end points, it ignores the spatial relationship between adjacent patches, which will cause the common edges between adjacent surface objects to be stored repeatedly. When these repeatedly stored common edges use different line starting points and end points for node thinning, the shape and position of the common edges between adjacent surface objects will be changed, resulting in gaps between surface objects, thus affecting the display effect of the data.
[0074] Therefore, in order to avoid gaps between surface objects when displaying data and thus affecting the display effect, after obtaining the target raster data, the present application aims to perform surface boundary data processing on the target raster data through a watershed algorithm to obtain specific first surface boundary data.
[0075] The first face boundary data includes not only the region boundary of the face object region itself, but also the common edges between adjacent face objects. The data simplification process is mainly aimed at simplifying the face boundary data and the common edge data between adjacent face objects in the target vector data, so as to prevent gaps from being generated in the common edges between adjacent face objects and ensure the display effect of vector data.
[0076] Next, the process of processing surface boundary data based on the watershed algorithm will be introduced in conjunction with the accompanying drawings of specific embodiments.
[0077] See also Figure 5 , which is a flow chart of a method for processing surface boundary data provided by an embodiment of the present application, and specifically includes the following steps:
[0078] S201: performing region division processing on the target raster data to obtain a plurality of surface object regions; the pixel units in the surface object regions have corresponding region identifiers.
[0079] In the process of processing surface boundary data based on the watershed algorithm, it is first necessary to perform regional division processing on the target raster data through the watershed algorithm, so as to divide the overall target raster data into multiple surface object areas with regional boundaries.
[0080] The watershed algorithm is an image segmentation algorithm based on the concept of "watershed" in topology. It regards the image as a terrain and the grayscale value as the height. Accordingly, high grayscale values are regarded as peaks and low grayscale values are regarded as valleys. Initially, for the target raster image, gradually "water is injected" from the valley with the lowest grayscale value, and different areas are filled as the water level gradually rises. In this way, as the water level gradually rises, different basins will eventually meet, forming the so-called "dams", or "watersheds". These dams are regarded as the boundaries of the surface object area, so that the target raster data can be divided into multiple surface object areas with their own specific area identifiers.
[0081] S202: Determine the common edges between the surface object regions and the region boundaries of the surface object regions according to the region identifiers corresponding to the pixel units in the surface object regions.
[0082] In the divided multiple face object regions, the pixel units in each face object region have a region identifier specific to the region. Since the pixel units in each face object region have corresponding region identifiers, when there are more than one region identifiers in a pixel unit, it indicates that the pixel unit belongs to a pixel unit that forms a common edge between adjacent face objects. By traversing the pixel units in each face object region in this way and screening the pixel units that include at least two region identifiers, the region common edges between each face object region and the adjacent face objects, as well as the region boundaries of each face object can be determined.
[0083] S203: Determine the first surface boundary data based on the region common edges and the region boundaries between the surface object regions.
[0084] See also Figure 6 , this figure is a schematic diagram of a first surface boundary data provided in an embodiment of the present application. It can be seen from the figure that, on the basis of determining the regional commonality and regional boundaries between each surface object, all pixel units therein are traversed, and contour vertices are determined according to the characteristics of the boundaries, so that the common edges between each surface object area and the adjacent surface objects, as well as its own regional boundaries, can be constructed to obtain the first surface boundary data.
[0085] S104: Perform topological faceting according to the first surface boundary data to obtain simplified target vector data.
[0086] Finally, the simplified target vector data can be obtained by performing topological faceting based on the boundary data of the first face. Figure 7 , Figure 7A comparison diagram of the display effects of a target vector data and a simplified target vector data provided in an embodiment of the present application. As can be seen from the figure, after the target vector data is simplified, the number of nodes of the surface object represented by it is greatly reduced, thereby improving the display processing efficiency of the target vector data while ensuring the display effect of the target vector data.
[0087] The above is a general process of the spatial data simplification method provided in the embodiment of the present application. In actual application scenarios, after the first surface boundary data is determined in step S103, the first surface boundary initially extracted is often relatively rough, and there are many jagged contours at the surface boundary. In view of this, in a possible implementation method, the boundary contour of the first surface boundary data can be further simplified by nodes to make the boundary of the first surface boundary data smoother and ensure the display effect of the surface boundary. At the same time, with the simplification of boundary nodes, the data simplification efficiency for the target vector data will also be improved.
[0088] Next, a boundary optimization method for the first surface boundary data after the first surface boundary data is determined in step S103 will be introduced with reference to the drawings of specific embodiments.
[0089] See also Figure 7 , which is a flow chart of another spatial data simplification method provided in an embodiment of the present application, specifically comprising the following steps:
[0090] S301: Determine a plurality of boundary nodes in the first surface boundary data.
[0091] First, based on the boundary contour specifically described by the first surface boundary data, points with obvious angle changes in the boundary contour need to be determined as boundary nodes, so as to obtain inflection points with obvious jagged shapes or changes in the first surface boundary data.
[0092] S302: performing node screening processing on the plurality of boundary nodes based on the pipe algorithm to obtain a plurality of boundary inflection points.
[0093] Furthermore, each boundary node is screened by the pipe algorithm, aiming at screening the boundary inflection points in the boundary nodes and discarding the intermediate process points in the boundary nodes.
[0094] Specifically, in the process of node screening based on the tube algorithm, it is necessary to set a node screening tube with an inner diameter of the tube as a preset threshold, and the inner diameter of the tube is set as d. The node screening tube with an inner diameter of d is used to traverse each boundary node. When the node offset of a boundary node is not greater than d, it is considered that the boundary line has not undergone any essential changes on this boundary node. At this time, the boundary node with a node offset not greater than d is discarded as an intermediate process point. Correspondingly, when the node offset of a boundary node is greater than d, it proves that the boundary node has undergone a large change, and the boundary node can be determined as a boundary inflection point.
[0095] S303: Perform contour processing according to the plurality of boundary inflection points to obtain second surface boundary data.
[0096] Finally, by drawing contour lines through multiple determined boundary inflection points, the approximate outline of the target vector data after data simplification, that is, the second surface boundary data, can be obtained.
[0097] In a possible implementation, in order to further optimize the display effect of the surface boundary, after determining the second surface boundary data, the second surface boundary data may be further subjected to a corner square process, thereby improving the display effect of the target vector data.
[0098] For the display effect of the second surface boundary data after the corners are squared, please refer to Figure 8 The diagram shown is a schematic diagram of the second surface boundary data after the corners are squared.
[0099] Specifically, the corner righting process needs to be processed separately for the second surface boundary data polygon data and quadrilateral data. When the second surface boundary data that needs to be right-angled is quadrilateral data, it is necessary to right-angle the quadrilateral boundary data by means of a rectangular circumscribed circle. The core of the rectangular circumscribed circle method is to form a right angle through the points on the rectangular circumscribed circle and the diagonal line through the center of the circle, and to use the complementary relationship of the angles to realize the right angle of the four corners of the quadrilateral.
[0100] When the second face boundary data to be processed is polygonal data, the classification forced orthogonality method is needed to realize the right-angle corner of the polygonal boundary data. The classification forced orthogonality method aims to calculate the azimuth of the contour line inside the concave polygon boundary data, divide all the line segments in the polygon into two categories according to the obtained azimuth, calculate the new average azimuth of the classified line segments by weighted average calculation, and force the two types of line segments to be orthogonal to form a right angle.
[0101] In this way, by adopting different corner right-angle conversion methods for the quadrilateral data and polygonal data in the second surface boundary data, the display effect of the target vector data is optimized to the greatest extent.
[0102] On the other hand, after completing the data simplification for the target vector data, a corresponding target vector pyramid can be constructed based on the previously constructed pyramid level construction framework and the simplified target vector data. In the target vector pyramid, each level stores vector data of different simplification degrees according to its specific level resolution. When the outside world needs to view the target vector data and issues a target vector data display instruction, the level resolution in the target vector pyramid that matches the target display resolution is determined according to the target display resolution specified in the display instruction, and the vector data of the corresponding level is used as the output data for the target vector data display instruction, so as to realize the automatic reading of the vector data of the corresponding level in the target vector pyramid according to the current view display resolution, thereby improving the display efficiency of the target vector data.
[0103] Accordingly, in order to achieve the reusability of the target vector pyramid, the target vector pyramid and the attribute fields of the target vector data can be further stored in the same database by means of associated storage. In this way, when the target vector data needs to be read again for image display, the corresponding saved target vector pyramid can be directly read without rebuilding the target vector pyramid, thereby improving the data loading and display efficiency of the target vector data.
[0104] Among them, the attribute field of the target vector data can be the serial number SmID field of the target vector data that uniquely identifies the object after simplification processing, and the spatial data SmGeometry field information storing the current record, so as to reduce the space occupied by the target vector pyramid and the attribute field during storage. The embodiment of the present application does not limit the specific type of the attribute field.
[0105] In this way, by storing the attribute fields of the target vector data and the target vector pyramid in the same database, when it is necessary to perform thematic mapping or layer filtering display on the data with the target vector pyramid, the attribute fields of the target vector data can be used to associate and query the original target vector data to obtain complete attribute field information, thereby realizing thematic map display and mutual query between maps and attributes.
[0106] The embodiment of the present application provides a spatial data simplification method, system and medium. In the method, the target vector data is first subjected to vector pyramid layering processing to obtain a pyramid layer construction framework for characterizing the resolution of each layer. In this way, the data can be simplified to different degrees according to the layer resolution corresponding to the vector data of different layers, thereby reducing the computational complexity of data simplification. At the same time, the vector data can also be displayed according to different layer resolutions to ensure the display effect of the data.
[0107] Subsequently, based on the determined hierarchical construction framework, the target vector data is rasterized, thereby converting the complex structured vector data into pixel units of a single structure to reduce the complexity of data simplification processing. Furthermore, the target raster data is processed for face boundary data based on the watershed algorithm, thereby accurately marking the common edge data between adjacent face objects to prevent gaps between adjacent face objects when displaying vector data, ensuring the display effect of vector data, and obtaining the first face boundary data. Finally, the topological faceting is performed according to the first face boundary data to complete the data simplification process for the target vector data, and obtain the simplified target vector data, thereby improving the simplification efficiency of vector data while ensuring the display effect of vector data.
[0108] A spatial data simplification system provided in an embodiment of the present application is introduced below. The spatial data simplification system described below and the spatial data simplification method described above can be referred to each other.
[0109] See also Fig. 9 , which is a schematic diagram of the structure of a spatial data simplification system provided in an embodiment of the present application, specifically including the following modules:
[0110] The stratification module 100 is used to perform vector pyramid stratification processing on the target vector data to obtain a pyramid hierarchical construction framework of the target vector data; the pyramid hierarchical construction framework is used to characterize the hierarchical resolution corresponding to each level in the target vector pyramid; the target vector pyramid corresponds to the target vector data;
[0111] A rasterization module 200 is used to perform rasterization processing on the target vector data based on the hierarchical construction framework to obtain target raster data;
[0112] The boundary processing module 300 is used to perform surface boundary data processing on the target raster data based on a watershed algorithm to obtain first surface boundary data; the first surface boundary data includes common edge data between adjacent surface objects in the target vector data;
[0113] The topological faceting module 400 is used to perform topological faceting according to the first surface boundary data to obtain simplified target vector data.
[0114] In a possible implementation, the system further includes: a boundary data simplification module; the boundary data simplification module is specifically configured to:
[0115] Determine a plurality of boundary nodes in the first surface boundary data;
[0116] Perform node screening processing on the plurality of boundary nodes based on the pipe algorithm to obtain a plurality of boundary inflection points;
[0117] Contour line processing is performed according to the plurality of boundary inflection points to obtain second surface boundary data.
[0118] In a possible implementation, the boundary data simplification module includes: a node screening unit; the node screening unit is specifically configured to:
[0119] Performing node screening processing on the plurality of boundary inflection points through a node screening tube whose inner diameter is a preset threshold;
[0120] When the node offset of the boundary node is greater than the preset threshold, the boundary node is determined as the boundary inflection point. Based on the same inventive concept, corresponding to any of the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the spatial data simplification method described in any of the above embodiments.
[0121] The computer-readable media of the embodiments of the present application include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0122] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the spatial data simplification method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0123] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for methods, systems and media, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The methods, systems and media described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A spatial data simplification method, characterized in that: include: Performing vector pyramid hierarchical processing on the target vector data to obtain a pyramid hierarchical construction framework of the target vector data; The pyramid level construction framework is used to characterize the level resolution corresponding to each level in the target vector pyramid; the target vector pyramid corresponds to the target vector data; Based on the hierarchical construction framework, the target vector data is rasterized to obtain target raster data; Performing surface boundary data processing on the target raster data based on a watershed algorithm to obtain first surface boundary data; the first surface boundary data includes common edge data between adjacent surface objects in the target vector data; Perform topological faceting according to the first face boundary data to obtain simplified target vector data; The step of performing surface boundary data processing on the target grid data based on a watershed algorithm to obtain first surface boundary data includes: Performing region division processing on the target raster data to obtain a plurality of surface object regions; the pixel units in the surface object regions have corresponding region identifiers; Determining the region common edges between the face object regions and the region boundaries of the face object regions according to the region identifiers corresponding to the pixel units in the face object regions; Determining the first surface boundary data based on the area common edges and the area boundaries between the surface object areas; The target vector data includes a plurality of geographic objects; the target vector data is subjected to rasterization processing based on the hierarchical construction framework to obtain target raster data, including: According to the hierarchical construction framework, each multi-level grid index corresponding to each geographic object is created; the multi-level grid index is used to represent the geographic object, and the grid index corresponding to different levels in the target vector pyramid; Rasterization processing is performed based on each of the multi-level grid indexes corresponding to each of the geographic objects to obtain the target raster data.
2. The method according to claim 1, characterized in that After performing surface boundary data processing on the target grid data based on the watershed algorithm to obtain first surface boundary data, the method further includes: Determine a plurality of boundary nodes in the first surface boundary data; Perform node screening processing on the plurality of boundary nodes based on the pipe algorithm to obtain a plurality of boundary inflection points; Contour line processing is performed according to the plurality of boundary inflection points to obtain second surface boundary data.
3. The method according to claim 2, characterized in that The node screening process is performed on the plurality of boundary nodes based on the pipe algorithm to obtain a plurality of boundary inflection points, including: Performing node screening processing on the plurality of boundary inflection points through a node screening tube whose inner diameter is a preset threshold; When the node offset of the boundary node is greater than the preset threshold, the boundary node is determined as the boundary inflection point.
4. The method according to claim 2, characterized in that: The second surface boundary data includes: at least one of polygonal data and quadrilateral data; after the contour line processing is performed according to the plurality of boundary inflection points to obtain the second surface boundary data, the method further includes: For the polygonal data in the boundary of the second surface, performing corner square processing on the polygonal data by using a classified forced orthogonal method; For the quadrilateral data in the boundary of the second surface, the quadrilateral data is subjected to a corner righting process by using a rectangle circumscribed circle method.
5. The method according to claim 1, characterized in that After performing topological faceting according to the first face boundary data to obtain simplified target vector data, the method further includes: The target vector pyramid is constructed according to the simplified target vector data and the pyramid level construction framework; the target vector pyramid and the attribute fields of the target vector data are stored in the same database in an associated storage manner.
6. The method according to claim 1, characterized in that After constructing the target vector pyramid of the target vector data according to the simplified target vector data and the pyramid level construction framework, the method further includes: In response to a target vector data display instruction, determining a target display resolution according to the target vector data display instruction; The hierarchical vector data in the target vector pyramid, whose hierarchical resolution is the same as the target display resolution, is determined as output data for the target vector data display instruction.
7. A spatial data reduction system, characterized in that: include: A stratification module, used for performing vector pyramid stratification processing on the target vector data to obtain a pyramid level construction framework of the target vector data; The pyramid level construction framework is used to characterize the level resolution corresponding to each level in the target vector pyramid; the target vector pyramid corresponds to the target vector data; A rasterization module, used for performing rasterization processing on the target vector data based on the hierarchical construction framework to obtain target raster data; A boundary processing module, used for performing surface boundary data processing on the target raster data based on a watershed algorithm to obtain first surface boundary data; the first surface boundary data includes common edge data between adjacent surface objects in the target vector data; A topological faceting module, used for performing topological faceting according to the first face boundary data to obtain simplified target vector data; The boundary processing module is specifically used for: Performing region division processing on the target raster data to obtain a plurality of surface object regions; the pixel units in the surface object regions have corresponding region identifiers; Determining the region common edges between the face object regions and the region boundaries of the face object regions according to the region identifiers corresponding to the pixel units in the face object regions; Determining the first surface boundary data based on the area common edges and the area boundaries between the surface object areas; The target vector data includes a plurality of geographic objects; the rasterization module is specifically used for: According to the hierarchical construction framework, each multi-level grid index corresponding to each geographic object is created; the multi-level grid index is used to represent the geographic object, and the grid index corresponding to different levels in the target vector pyramid; Rasterization processing is performed based on each of the multi-level grid indexes corresponding to each of the geographic objects to obtain the target raster data.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the spatial data simplification method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Vector polygon rasterization algorithm and system
CN105184837A
Ice lake extraction method integrating threshold segmentation and watershed transformation algorithms
CN112036233A