A vector data encoding method and system with adaptive length

Through the adaptive length vector data encoding method, combined with hierarchical coding and sequential coding, the resource consumption problem of vector data index structure in the prior art is solved, the query retrieval efficiency is improved and the topological relationship of the data is reflected.

CN116521813BActive Publication Date: 2025-09-02CHINA POWER CONSRTUCTION GRP GUIYANG SURVEY & DESIGN INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310531221.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2025-09-02
Estimated Expiration
2043-05-11

AI Technical Summary

Technical Problem

The existing vector data index structure consumes a lot of storage resources, I/O resources and computing resources in the spatial big data environment, and the existing coding methods fail to effectively express the spatial location and topological relationship of vector data.

Method used

The vector data encoding method of adaptive length is adopted. By obtaining hierarchical encoding and sequential codes, combining the association relationship of the reference positioning grid, vector data encoding is generated, reflecting the topological relationship, and improving query retrieval efficiency through adaptive coding length.

Benefits of technology

It realizes the standardization, uniformity and flexibility of vector data encoding, improves query retrieval efficiency, and intuitively reflects the topological relationship between data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521813B_ABST
    Figure CN116521813B_ABST
Patent Text Reader

Abstract

The present invention discloses a vector data encoding method and system with adaptive length, including: obtaining vector data to be encoded, cyclically extracting layered data to be encoded therefrom, performing layered encoding, and traversing the data to be encoded within the layer; calculating the minimum area value of the data to be encoded within the layer to determine the size of the unit to be rasterized, and counting the frequency of the data to be encoded within the layer to determine the length of the sequential code; rasterizing the data to be encoded within the layer, recording the position sequence, converting the grid center into a point, performing buffer analysis and obtaining its circumscribed rectangle to obtain a reference positioning grid; spatially superimposing the data to be encoded within the layer with the reference positioning grid to obtain a spatial connection relationship table, retaining the minimum position sequence of each element and generating a sequential code for the data to be encoded within the layer; and generating vector data encoding using a combination of layered encoding and sequential coding. According to the above technical solution, the management and analysis application of automatic encoding of point, line, and surface data can be realized, and the standardization and flexibility of encoding technology can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vector data coding management and application analysis, and in particular to a vector data coding method and system with adaptive length. Background Art

[0002] As the most commonly used data model and data structure in GIS platform products, vector data is spatial data that uses x and y coordinates to represent the location and shape of map graphics or geographic entities in a rectangular plane. The management of vector data relies heavily on spatial indexing technology. The performance of retrieval technology directly determines the efficiency of vector data access and influences its spatial analysis and application. However, existing index structures consume significant storage, I / O, and computing resources in spatial big data environments, including storage space usage, query I / O times, and retrieval efficiency.

[0003] To address this issue, a large number of research and application methods have emerged in recent years, such as the use of tree-structured spatial indexes, grid spatial indexes, and hybrid spatial indexes. Using spatial indexes to establish a relationship between index numbers and data storage locations can address data access efficiency issues, but they cannot clearly express the topological relationship between the spatial locations of vector data. There are also some technologies that encode vector elements, such as serial number encoding, hierarchical encoding, and combined encoding. However, these encoding methods only encode data indexes and data payloads, without considering spatial characteristics and topological relationships. Therefore, there is a need for a vector data encoding method that not only considers the spatial characteristics and topological relationships of vector data, but also combines the advantages of hierarchical encoding and serial number encoding methods to make the encoding rules of vector data standardized, unified, and flexible. Summary of the Invention

[0004] To achieve the above object, the present application provides a vector data encoding method with adaptive length, comprising the following steps:

[0005] Obtain vector data to be encoded;

[0006] Circularly extracting layers to be coded from the vector data to be coded, obtaining layer codes, screening the data to be coded in the layers according to the range of the layers to be coded, and calculating the sequence codes of the data to be coded in the layers, wherein the layer codes include a 6-digit county-level administrative division code, a 3-digit township-level administrative division code, and a 3-digit village-level administrative division code;

[0007] Encode according to layered coding and sequential coding to generate vector data coding;

[0008] The sequential codes of the data to be encoded in the computation layer include:

[0009] Calculate the minimum unit size MinL of the data to be encoded in the layer and determine the sequential code length Len;

[0010] According to the minimum unit size MinL, perform data rasterization, record the position order, and generate a reference positioning grid. Executing data rasterization means: obtaining the vector rasterized data in the layer, converting the grid center into a point feature, performing buffer analysis with the point as the center and MinR as the radius, generating a buffer circle, and obtaining the circumscribed rectangle of the buffer circle to generate a reference positioning grid.

[0011] The reference positioning grid is spatially superimposed with the data to be encoded in the layer to obtain the spatial connection relationship and the sequence code of the data to be encoded in the layer.

[0012] Furthermore, before calculating the minimum unit size MinL of the data to be encoded in the layer, the area of ​​the data to be encoded in the layer is calculated to obtain the minimum area MIN_MJ in the layer, where MinL=INT(sqr(MIN_MJ))-1.

[0013] Calculating the area of ​​data to be encoded in a layer includes the following steps:

[0014] Positioning vector data in the rectangular coordinate system (x i ,y i ), the position points form a polygon;

[0015] Project each vertex of the polygon onto the x-axis to obtain the projection points, which form multiple trapezoids with the vertices;

[0016] Calculate the ordered area of ​​each trapezoid. The ordered area means that when the order of the polygon vertices is counterclockwise, the calculated result is a negative value; when the order of the polygon vertices is clockwise, the calculated result is a positive value.

[0017] Sum the ordered areas of the trapezoids to obtain the area of ​​the vector data.

[0018] Furthermore, before spatially superimposing the reference positioning grid with the data to be encoded in the layer, the reference positioning grid is numbered according to the row and column order to generate a position reference code;

[0019] The spatial connection relationship refers to the correspondence between the element code of the data to be encoded in the layer and the position reference code of the reference positioning grid.

[0020] Furthermore, obtaining the spatial connection relationship also includes cleaning the data of the association between the element code of the data to be encoded in the layer and the position reference code of the reference positioning grid, retaining the minimum position reference code corresponding to each element code, and ensuring the uniqueness of the sequential coding.

[0021] Furthermore, obtaining the sequence code of the data to be encoded in the layer includes:

[0022] Generate a unique number for the location of the data to be encoded within the layer;

[0023] Perform string processing on the unique number and add the corresponding length to Len. The unique number after string processing is defined as a sequential code.

[0024] In another aspect, the present invention provides a vector data encoding system with adaptive length, comprising:

[0025] Encoding data preparation module: used to obtain vector data to be encoded;

[0026] Layered data processing module: used to cyclically extract layers to be coded, generate layered codes, filter the data to be coded in the layers according to the unit range corresponding to the layers to be coded, and calculate the sequence code of the data to be coded in the layers;

[0027] A vector data encoding module, used for encoding according to layered coding and sequential coding to generate vector data coding;

[0028] The layered data processing module further includes: a coding parameter determination submodule, which is used to calculate the minimum unit size MinL in the layer to be coded and determine the number of bits Len of the coding length in the layer to be coded.

[0029] Furthermore, the vector data encoding system includes an input interface and an output interface for data to be encoded;

[0030] Among them, the input interface of data to be encoded is used for users to input vector data files; the output interface supports the output of image files and spatial data open format files.

[0031] Furthermore, the output interface also supports outputting string processing results after executing string processing; wherein the string processing includes: combining layered coding and sequential coding to generate vector data coding.

[0032] According to the present invention, automatic coding management and analysis application of vector point, line and surface data can be quickly realized. The data coding intuitively reflects the topological relationship between the data. The adaptive length coding technology is used to effectively improve the query retrieval efficiency, thereby improving the standardization and flexibility of the coding technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a step diagram of a method for encoding vector data with adaptive length according to an embodiment of the present invention;

[0034] Figure 2 is a detailed flow chart of a method for encoding vector data with adaptive length according to an embodiment of the present invention;

[0035] Figure 32 is a schematic diagram of a vector data encoding process with adaptive length according to an embodiment of the present invention;

[0036] Figure 4 Schematic diagram of the adaptive length vector data encoding part according to an embodiment of the present invention Figure 1 ;

[0037] Figure 5 is a schematic diagram of vector data according to an embodiment of the present invention;

[0038] Figure 6 1 is a schematic diagram of spatial position calculation in a vector data encoding method with adaptive length according to an embodiment of the present invention;

[0039] Figure 7 2 is a schematic structural diagram of a vector data encoding system with adaptive length according to an embodiment of the present invention;

[0040] Figure 8 is a schematic diagram of an interface of an adaptive length vector data encoding system according to an embodiment of the present invention;

[0041] Figure 9 Schematic diagram of the adaptive length vector data encoding part according to an embodiment of the present invention Figure 2 . DETAILED DESCRIPTION

[0042] This invention aims to utilize spatial data processing and analysis techniques, combined with the characteristics of vector data reflecting the actual geographic environment, to pre-generate hierarchical codes according to the coding rules of administrative jurisdictions. The vector data to be coded within these layers is then screened for sequence coding, ultimately achieving automated coding of all the data to be coded. Because the sequential code calculation utilizes the associations of reference positioning grids, the data coding intuitively reflects the topological relationships of the vector data. The adaptive length-of-code scheme employed in defining the sequential code effectively improves query and retrieval efficiency.

[0043] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings.

[0044] Figure 1 A vector data encoding method step diagram is provided, as shown in the figure, including the following steps:

[0045] Step S100: obtaining vector data to be encoded;

[0046] In this application, SHP format vector data is provided as experimental data for vector data to be encoded. The experimental data includes 3127 records, which are distributed in 2 towns and 7 villages under a county, as shown below: Figure 3 P301 section.

[0047] After obtaining the data to be encoded, the layer to be encoded is extracted and a determination is made as to whether the layer has been encoded. In this field, vector data is layered according to administrative regions. In this embodiment, the layers of the data to be encoded include three layers: administrative districts and counties, administrative towns and villages. The layer codes are, respectively, a 6-digit district-level administrative division code, a 3-digit township-level administrative division code, and a 3-digit village-level administrative division code.

[0048] In the subsequent processing steps (steps S110 and S120), Figure 2 As shown in step S201, each layer to be encoded is extracted in sequence, and the data to be encoded in the layer is screened until the data of all layers are fully encoded.

[0049] Step S110: cyclically extracting layers to be coded, obtaining layer codes, filtering data to be coded in the layers according to the range of the layers to be coded, and calculating sequence codes of the data to be coded in the layers;

[0050] The hierarchical code extracted each time in this step includes a 6-digit district-level administrative division code, a 3-digit township-level administrative division code, and a 3-digit village-level administrative division code;

[0051] Before calculating the sequential code of the data to be encoded in the layer, step S111 needs to be performed, that is, determining the length Len of the adaptive code and calculating the minimum unit size MinL of the data to be encoded in the layer:

[0052] Wherein, Len is defined as the length of the frequency of the vector data in the layer. For example, in this embodiment, the layer includes 98 items of vector data, and the frequency length of the vector data is defined as Len.

[0053] Len=len(98)=2;

[0054] The minimum unit size MinL is determined by calculating the minimum area of ​​the data to be encoded in the layer: before calculating the minimum unit size MinL of the data to be encoded in the layer, the area S of the data to be encoded in the layer is calculated to obtain the minimum area MIN_MJ in the layer, where MinL = INT(sqr(MIN_MJ))-1, where MinL is the minimum unit size.

[0055] In this application, the position points of the vector data in the plane rectangular coordinate system are used as the contour points of the surface element, and the area of ​​the polygon formed by the contour points is used as the vector data area S. The vector data area S is calculated by the trapezoidal method after discrete point projection. The calculation method is as follows: Figure 5 The specific process is as follows:

[0056] Locate the position points (x i ,y i), the position points are formed into a polygon, and the multiple vertices of the polygon are a, b, c, d, e, and f;

[0057] Project each vertex of the polygon onto the x-axis to obtain projection points a', b', c', d', e', f'. The vertices and projection points form multiple trapezoids: ab b'a', bcc'b', ..., eff'e', faa'f';

[0058] Calculate the ordered area of ​​each trapezoid. The ordered area of ​​each trapezoid can be expressed as:

[0059] (x2-x1)*(y2+y1) / 2;

[0060] For example, for the trapezoid ab b'a', the formula for calculating its ordered area is:

[0061] (x b -x a )*(y b +y a ) / 2;

[0062] For the trapezoid eff'e', the formula for calculating its ordered area is:

[0063] (x f -x e )*(y f +y e ) / 2;

[0064] Since x f <x e , so its ordered area is negative. The area of ​​the trapezoid with ab, bc, cd, and de as waists is positive, and the area with ef and fa as waists is negative.

[0065] It can be seen that the ordered area in this step means that when the order of the polygon vertices is counterclockwise, the calculated result is a negative value; when the order of the polygon vertices is clockwise, the calculated result is a positive value;

[0066] Sum the ordered areas of the trapezoids above to obtain the vector data area S. The summation formula is as follows:

[0067]

[0068] After simplification, it becomes:

[0069] After calculating the area S of the vector data within the layer, the heap sort algorithm is used to obtain the minimum value MIN_MJ within the layer. The sorting algorithm is described as follows:

[0070] The first step is to create the initial sequence to be sorted (R1, R2...Rn) as a max-heap, which is the initial unordered heap;

[0071] The second step is to swap the top element R[1] with the last element R[n] to obtain a new unordered region (R1, R2, ... Rn-1) and an ordered region (Rn), and satisfy R[1, 2 ... n-1] < = R[n];

[0072] In the third step, the new top of the heap R[1] after the swap may violate the properties of the heap, so the current unordered area (R1, R2, ... Rn-1) needs to be adjusted to a new heap, and then R[1] is swapped with the last element of the unordered area again to obtain a new unordered area (R1, R2 ... Rn-2) and an ordered area (Rn-1, Rn). Repeat this process until the number of elements in the ordered area is n-1, and the entire sorting process is completed.

[0073] Substitute the area S of the data to be encoded in the layer into the sorting sequence to obtain the minimum area MIN_MJ of the data to be encoded in the layer.

[0074] like Figure 2 As shown in, in step S211, by calculating the minimum area MIN_MJ of the data to be encoded in the layer, the minimum unit size is further calculated, which can be used in steps S221 to S224. When converting vector data into raster data, MinL is used to determine the grid unit size. In this way, the minimum buffer unit can be generated, and at the lowest cost, it is ensured that each vector data encoding is not omitted and can be included in the encoding calculation.

[0075] Through the above steps, we can obtain the minimum unit size MinL and start to calculate the sequential code of the data to be encoded in the layer:

[0076] Step S112: Execute rasterization of vector data, record the position sequence, and generate a reference positioning grid:

[0077] Executing data rasterization means: obtaining the vector rasterized data in the layer, converting the grid center into a point feature, performing buffer analysis with the point as the center and MinR as the radius, generating a buffer circle, obtaining the circumscribed rectangle of the buffer circle, and generating a reference positioning grid. The vector rasterized data in the layer is generated by rasterizing the data to be encoded in the layer.

[0078] The scan line seed point filling algorithm can be used to rasterize vector data. Its implementation principle is as follows: Step 1, select a seed point Seed (x, y) and store it in the stack; Step 2, if the stack is empty, the algorithm ends, otherwise execute Step 3; Step 3, take out the pixel to be filled from the stack, fill all the points that need to be filled and are connected to the point on the same scan line, and record the leftmost and rightmost positions to be filled: Xleft and Xright; Step 4, scan the previous and next rows of the third step, and within the range of Xleft≤x≤Xright, check whether they are all boundary points or points that have been filled. If not, store the rightmost position of each segment to be filled in as a new seed point in the stack; then, return to Step 2 to judge the status of the stack, and loop the process until all vector data in the layer have been processed.

[0079] The specific processing process is as follows Figure 2 Shown, including:

[0080] 1) Step S223: Obtaining the grid center turning point: Taking each grid as a unit, according to the point vectorization method, a point is formed by vectorizing a single pixel. The calculation formula is as follows:

[0081] x=x0+(J-0.5)*D x ,

[0082] y=y0+(I-0.5)*D y ,

[0083] Among them, x0 and y0 are the coordinates of the upper left corner origin, D x , D y is the length of both sides of the grid cell;

[0084] According to the embodiment of the present application, Figure 3 The result of pushing part P301 into the stack is shown in part P302; the result after the grid center is rotated is shown in part P303.

[0085] 2) Step S224: Automatically calculate the buffer circle radius based on the minimum area to generate the point element buffer circle:

[0086] In this step, a circle is drawn with the point coordinates as the center and the buffer circle radius as the radius. The formula is as follows:

[0087] r 2 ≤(xa) 2 +(yb) 2 , where point (a, b) is the point coordinate, (x, y) is any point on the plane, and r is the radius of the buffer circle, that is: r = MinR.

[0088] The vector data processing results in this step are as follows Figure 3As shown in the P304 section.

[0089] 3) Steps S230 to S231: Generate a reference positioning grid based on the buffer information:

[0090] Based on the point element buffer circle generated in step S224 as the reference circle, the reference circle is circumscribed into a rectangle to generate a reference positioning grid, and then the reference positioning grids are numbered in row and column order to generate a position reference code, which is used for reference positioning in subsequent steps.

[0091] When the base circle circumscribes a rectangle, the tangent function equation is as follows:

[0092] Where (a, b) is the coordinate of the point, (x, y) is any point on the plane, r is the radius of the circle, k is the slope of the tangent, and n is the intercept on the y-axis.

[0093] From the relationship between the circle and the tangent, we can know that the coordinates of the circumscribed vector grid are A(r, r), B(r, -r), C(-r, -r), and D(-r, r). Connect the lines and fill them into a grid surface to realize the circumscribed rectangle of the reference circle and generate the reference positioning grid. The corresponding diagram of the reference positioning grid and the position reference code is shown in Figure 3 P305 section.

[0094] After generating the reference positioning grid and location reference code, you can proceed to the next step:

[0095] Step S113: spatially superimpose the reference positioning grid and the data to be encoded in the layer to obtain a spatial connection relationship and acquire a sequence code of the data to be encoded in the layer.

[0096] The spatial connection relationship refers to the correspondence between the element code of the data to be encoded and the location reference code within the layer.

[0097] The specific implementation of this step is as follows Figure 2 As shown, the following steps are included:

[0098] 1) Step S231: Get the reference positioning grid of the buffer zone, i.e. Figure 3 The grid faces of the P305 section are numbered sequentially, such as 49, 52, 53, etc., which are position reference codes.

[0099] 2) Step S232: Establish a spatial connection between the reference positioning grid and the data to be encoded in the layer, and obtain a spatial connection relationship, that is, a correspondence between the position reference code of the reference positioning grid and the element code of the data to be encoded in the layer:

[0100] In this step, the scan line seed point filling algorithm is used to rasterize the reference positioning grid and the data to be encoded within the layer. The reference positioning grid is rasterized to a sequential code grid, the data to be encoded is rasterized to a grid of 1, and the background value is rasterized to a grid of 0. Arithmetic multiplication is performed. If any grid value is non-zero, it indicates spatial intersection, and the position code of the intersection of the data to be encoded is obtained. For example, the data to be encoded with position code 105 is shown in P601 in the figure. After calculation, the associated position code is shown in P603. That is, the arithmetic multiplication of the corresponding points of P601 and P602 yields the following results: 2, 4, 5, 6, 8.

[0101] In this embodiment, the position reference code of the reference positioning grid is matched with the element code of the data to be encoded in the identification layer, such as Figure 3 As shown in the P306 part, the element code identifies the location space of the data to be encoded in the layer, such as 3, 4, 5, 7, etc. in the P306 part.

[0102] In actual calculations, there is a one-to-many correspondence between reference positioning grids and the data to be encoded within a layer. For example, the data to be encoded within a layer corresponding to element code 4 is associated with reference positioning grids corresponding to reference position codes 56, 63, 73, and 74. In this invention, the minimum reference position code value 56 corresponding to element code 4 is retained, and the remaining reference position codes are deleted. Therefore, the step of obtaining the spatial connection relationship also includes clearing the connection relationship between a single element code and multiple reference positioning grid position codes, retaining the minimum position reference code corresponding to each element code, and ensuring the uniqueness of the sequential encoding.

[0103] In order to reflect the topological relationship between the positions of the data to be encoded in the layer, the heap sort algorithm is used to sort the data to be encoded in the layer in ascending order. The data to be encoded in the layer are traversed and the self-incremental encoding is performed starting from 1 according to the position order of the reference positioning grid to obtain the unique position code of the vector data in the layer, such as Figure 3 As shown in the P307 section, a unique number is generated for the data to be encoded in the layer according to the position sequence of the reference positioning grid in the layer; and the unique number is string-processed and supplemented with the corresponding length Len. The unique number after string processing is defined as a sequential code.

[0104] In this embodiment, the frequency length of the vector data in the layer is Len=2, so the length of the sequence code of the layer in this step is defined as 2. The unique number is processed in the string and the corresponding length is supplemented to Len. The definition of the encoding sequence code is as follows: Figure 3 As shown in the P307 section, for example, if the unique number is 5, the sequence code is 05.

[0105] It should be noted that the element code represents the unique identifier of the data to be encoded in the layer, and the sequence code not only uniquely represents the data to be encoded in the layer, but also is a sequence code that is encoded from top to bottom and from left to right. Figure 3 In the P307 part, you can see the position corresponding to the data to be encoded in the layer with a complete sequence code of 05. In the actual environment, there are also data to be encoded in the layer with sequence codes of 01 to 04 in the upper part of this area.

[0106] In addition, the present application is also suitable for application scenarios with fixed coding lengths. For situations where the coding length has been determined, Len can be assigned the determined length value.

[0107] After the sequential code is determined, step S120 can be executed: encoding is performed according to the layered code and the sequential code to generate a vector data code;

[0108] The 2-bit sequential code is combined with the layered code to generate the final unique code for the vector data, such as Figure 3 As shown in the P308 part, for example: 52012120600105, among which 520121 (county) 206 (township) 001 (village) is the hierarchical code and 05 is the sequential code.

[0109] If the length of the vector data in the layer is Len=5, then the length of the layer sequence code in this step is defined as 5, and the definition of the coding sequence code is as follows: Figure 9 As shown in part P901, the final generated vector data encoding is shown in part P902.

[0110] like Figure 2 As shown in step S251, when the code calculation of one layer is completed, the process proceeds to step S201 to start calculating the code of the vector data of the other layer. If the number of vector data in another layer is 3 digits, the length of the sequence code is Len=3. After the sequence code is combined with the layer code, the schematic diagram of the vector data code is finally generated. Figure 4 shown.

[0111] Based on the adaptive length vector data encoding method provided by the present invention, the present invention also provides an adaptive length vector data encoding system. The vector data encoding system provides a user with an input interface for the data to be encoded and an output interface for the results generated during the encoding process.

[0112] Its operation interface is as follows Figure 8 As shown, the system structure diagram is referenced Figure 7 ,As shown in the figure, the vector data encoding system includes the following parts:

[0113] P710 encoding data preparation module: used to obtain vector data to be encoded;

[0114] This module is reflected in the operation interface of the vector data encoding system, that is, it provides a P701 input interface for data to be encoded for users to input vector data files.

[0115] P720 layered data processing module: used to cyclically extract the layers to be coded, obtain the layer codes, filter the data to be coded within the layers according to the range of the layers to be coded, and calculate the sequence codes of the data to be coded within the layers;

[0116] The layered data processing module further includes a P721 coding parameter determination submodule for calculating the minimum unit size MinL in the layer to be coded and determining the number of bits Len of the coding length in the layer to be coded.

[0117] The coding parameter determination submodule calculates the minimum area MIN_MJ of the surface element composed of the vector data in the layer to be coded, and further calculates the minimum unit size MinL, MinL = INT (sqr (MIN_MJ)) - 1;

[0118] The coding parameter determination submodule is also used to count the frequency of the vector data in the layer, which is defined as the number of bits of the coding length Len; for example, when the vector data in the layer is 20,000, the number of bits Len = 5, and the sequence code with insufficient length is automatically filled with "0", for example Figure 9 The P901 part of the code is numbered 5 and has a supplementary length of "00005".

[0119] When the layered data processing module calculates the sequential code of the data to be encoded in the layer, it includes: rasterizing the vector data, obtaining the grid center turning point, making a circle with the minimum unit size MinR as the radius, and determining the buffer circle of the center turning point; wherein,

[0120] The layered data processing module further obtains the buffer zone circumscribed rectangle to generate a reference positioning grid, spatially superimposes the reference positioning grid with the data to be encoded in the layer, obtains the spatial connection relationship, and obtains the sequential code in the vector data layer after processing.

[0121] During the processing of the layered data processing module, the files of the process of generating sequential codes can be output as spatial data open format files at the P702 output interface of the vector data encoding system. The images of the relevant grid center turning points can be output as picture files through the output interface of the vector data encoding system.

[0122] The results of string processing performed during the processing can be reflected in the output results of the vector data encoding system.

[0123] P730 vector data encoding module: used to encode according to layered coding and sequential coding, generate vector data coding, and output the coding results in spatial data open format files through the output interface of the vector data coding system.

[0124] The present invention adopts spatial data processing and analysis technology, combines with actual project production needs, and adopts a layered code + sequential code combination encoding method under the condition of considering the topological relationship of vector data. The layered coding of vector data is extracted in advance according to the administrative jurisdiction. After traversing the vector data in the layer, the sequential coding of the adaptive coding length is performed to form a vector data encoding method and system with adaptive length. The user only needs to input the data to be encoded, the process data and the final encoding output position according to the method flow, which can realize automatic encoding of vector data and reduce the difficulty of encoding processing.

[0125] The above disclosures are only a few specific embodiments of the present invention. However, the present invention is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present invention.

Claims

1. A vector data encoding method with adaptive length, characterized in that: The following steps are involved: Obtain vector data to be encoded; cyclically extracting layers to be encoded from the vector data to be encoded, obtaining layer codes, screening data to be encoded in the layers according to the range of the layers to be encoded, and calculating sequence codes for the data to be encoded in the layers; Encoding according to the layered code and the sequential code to generate vector data code; The step of calculating the sequence code of the data to be encoded in the layer includes: Calculating a minimum unit size MinL of the data to be encoded in the layer and determining a sequential code length Len, wherein the sequential code length Len is defined as the length of the number of vector data in the layer, expressed as Len=len(number of vector data); According to the minimum unit size MinL, data rasterization is performed, the position sequence is recorded, and a reference positioning grid is generated, wherein the data rasterization is performed by obtaining vector rasterized data within the layer, converting the grid center into a point element, performing a buffer analysis with the point as the center and MinR as the radius, generating a buffer circle, and obtaining the circumscribed rectangle of the buffer circle to generate a reference positioning grid, wherein, The reference positioning grid is spatially superimposed with the data to be encoded in the layer to obtain a spatial connection relationship and a sequence code of the data to be encoded in the layer.

2. The vector data encoding method according to claim 1, wherein: Before calculating the minimum unit size MinL of the data to be encoded in the layer, the area of ​​the data to be encoded in the layer is calculated to obtain the minimum area MIN_MJ in the layer, where MinL=INT(sqr(MIN_MJ))-1.

3. The vector data encoding method according to claim 2, wherein: The calculation of the area of ​​data to be encoded in the layer comprises the following steps: Locate the position point (x i ,y i ), forming a polygon with the position points; Projecting each vertex of the polygon onto the x-axis to obtain projection points, which form multiple trapezoids with the vertices; Calculate the ordered area of ​​each trapezoid, where the ordered area is negative when the polygon vertices are in counterclockwise order and positive when the polygon vertices are in clockwise order. The ordered areas of the trapezoids are summed to obtain the area of ​​the vector data.

4. The vector data encoding method according to claim 1, wherein: Before spatially superimposing the reference positioning grid with the data to be encoded in the layer, numbering the reference positioning grid according to the order of rows and columns to generate a position reference code; The spatial connection relationship refers to the correspondence between the element code of the data to be encoded in the layer and the position reference code.

5. The vector data encoding method according to claim 4, characterized in that: The obtaining of the spatial connection relationship also includes cleaning the data of the association between the element code of the data to be encoded in the layer and the position reference code of the reference positioning grid, retaining the minimum position reference code corresponding to each element code, and ensuring the uniqueness of the sequential coding.

6. The vector data encoding method according to claim 1, wherein: The obtaining of the sequence code of the data to be encoded in the layer comprises: generating a unique number for the position of the data to be encoded in the layer; The unique number is subjected to string processing, and the corresponding length is supplemented to Len. The unique number after the string processing is defined as a sequence code.

7. The vector data encoding method according to claim 1, wherein: The hierarchical code includes a 6-digit district-level administrative division code, a 3-digit township-level administrative division code and a 3-digit village-level administrative division code.

8. An adaptive length vector data encoding system, characterized in that: include: Encoding data preparation module: used to obtain vector data to be encoded; Layered data processing module: used for cyclically extracting layers to be coded, generating layered codes, screening the data to be coded in the layers according to the range of the layers to be coded, and calculating the sequence code of the data to be coded in the layers; A vector data encoding module, configured to perform encoding according to the layered code and the sequential code to generate a vector data code; The layered data processing module further includes a coding parameter determination submodule configured to calculate a minimum unit size MinL in a layer to be coded and determine the number of bits Len of the coding length in the layer to be coded; wherein the sequential code length Len is defined as the length of the number of vector data in the layer, expressed as Len = len(number of vector data); When the layered data processing module calculates the sequence code of the data to be encoded in the layer, it performs data rasterization according to the minimum unit size MinL, records the position sequence, and generates a reference positioning grid. The data rasterization includes: obtaining the vector rasterized data in the layer, converting the grid center into a point element, performing a buffer analysis with the point as the center and MinR as the radius, generating a buffer circle, and obtaining the circumscribed rectangle of the buffer circle to generate a reference positioning grid. The reference positioning grid is spatially superimposed with the data to be encoded in the layer to obtain the spatial connection relationship and the sequence code of the data to be encoded in the layer.

9. The vector data encoding system according to claim 8, characterized in that: The vector data encoding system includes an input interface and an output interface for data to be encoded; The data to be encoded input interface is used for the user to input a vector data file; The output interface supports outputting image files and spatial data open format files.

10. The vector data encoding system according to claim 9, characterized in that: The output interface also supports outputting the encoding result after executing string processing; The character string processing includes: combining layered coding with sequential coding to generate vector data coding.

Citation Information

Patent Citations

  • Power GIS massive space point type vector data rapid symbolization display method

    CN104331427A

  • Fire point inversion method based on object-oriented and local extremum sliding search

    CN115760763A