Method and device for processing spatial data of cultivated land resources
Through projection of cultivated land resource data, the problem of storage and analysis of cultivated land resource data is solved, and more efficient cultivated land resource management and data integration application is achieved.
Patent Information
- Application Number
- CN202410015681.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-01-04
AI Technical Summary
In the prior art, the vector data of cultivated land resources is organized and stored in administrative regions as units, making it difficult to conduct comprehensive calculation and analysis, and is not conducive to the refined management of cultivated land resources and the integrated application of remote sensing data.
By obtaining vector arable land resource spatial data files in multiple areas, cropping and building a regular grid according to the preset projection segmented band boundary, converting them into raster data, realizing more refined arable land resource spatial data storage and query.
It improves the refinement of spatial data processing of cultivated land resources, improves computing efficiency and robustness, and supports rapid query and analysis of multi-source data.
Smart Images

Figure CN118012833B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of land resource management, and in particular to a method and device for processing spatial data of cultivated land resources. Background Art
[0002] It is of great significance to protect cultivated land resources, explore sustainable utilization methods of cultivated land resources, and minimize the impact of cultivated land resource utilization on the ecological environment. The cultivated land resource system has regional, multi-scale, and holistic characteristics. It is an important means to explore sustainable utilization methods and appropriate remediation plans for cultivated land resources by studying the influence of cultivated land utilization structure and intensity characteristics in different regions on cultivated land output and farmland ecosystems, and then explore the key factors and their influencing mechanisms that affect cultivated land utilization, cultivated land output and farmland ecosystems, and diagnose the problems and challenges faced by regional cultivated land resource utilization.
[0003] In the related technologies, the investigation and research on cultivated land has accumulated a large amount of cultivated land map vector data and cultivated land quality index data. These data are often organized in the form of vector files and stored in administrative units. The existing schemes are not conducive to the comprehensive calculation and analysis of cultivated land resources. Summary of the invention
[0004] In view of the problems in the prior art, an embodiment of the present invention provides a method and device for processing spatial data of cultivated land resources.
[0005] Specifically, the embodiment of the present invention provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a method for processing spatial data of cultivated land resources, comprising:
[0007] Obtain vector spatial data files of cultivated land resources in multiple regions;
[0008] Each vector cultivated land resource spatial data file is clipped according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone;
[0009] According to the regular grid corresponding to each projection zone, the vector cultivated land resource spatial data subfile corresponding to each projection zone is cut to obtain the vector cultivated land resource spatial data subfile unit corresponding to each grid unit in the regular grid corresponding to each projection zone;
[0010] The vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid are converted into raster cultivated land resource spatial data sub-file units and stored in the target storage address; the target storage address is determined based on the projection band and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit.
[0011] Furthermore, after converting the vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid into raster cultivated land resource spatial data sub-file units and storing them in the target storage address, the method further includes:
[0012] Obtain the query information input by the user; the query information is used to query the spatial data of cultivated land resources;
[0013] According to the query information, the projection zone and grid unit corresponding to the queried cultivated land resource spatial data are determined;
[0014] Determine the target storage address corresponding to the queried cultivated land resource spatial data according to the projection zone and grid unit corresponding to the queried cultivated land resource spatial data;
[0015] According to the grid cultivated land resource spatial data sub-file unit stored in the target storage address, the query result of the queried cultivated land resource spatial data is obtained.
[0016] Furthermore, a 100-kilometer regular grid and a 10-kilometer regular grid corresponding to each projection zone are constructed; the spatial ranges of the 100-kilometer regular grid and the 10-kilometer regular grid are consistent with the spatial ranges of the corresponding projection zones; the 10-kilometer regular grid is nested in the 100-kilometer regular grid.
[0017] Further, converting the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit includes:
[0018] The vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the grid are converted into raster cultivated land resource spatial data sub-file units of multiple cultivated land quality attributes.
[0019] Furthermore, when the target storage address includes multiple grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, the multiple grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute are merged.
[0020] Furthermore, the query information includes:
[0021] Spatiotemporal query conditions, farmland quality attributes, and computational polynomial functions.
[0022] In a second aspect, an embodiment of the present invention further provides a device for processing spatial data of cultivated land resources, comprising:
[0023] An acquisition module is used to acquire vector spatial data files of cultivated land resources in multiple regions;
[0024] The first clipping module is used to clip each vector cultivated land resource spatial data file according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone;
[0025] The second clipping module is used to clip the vector cultivated land resource spatial data subfiles corresponding to each projection zone according to the regular grid corresponding to each projection zone, and obtain the vector cultivated land resource spatial data subfile units corresponding to each grid unit in the regular grid corresponding to each projection zone;
[0026] The processing module is used to convert the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit and store it in a target storage address; the target storage address is determined based on the projection band and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit.
[0027] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for processing spatial data of cultivated land resources as described in the first aspect are implemented.
[0028] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for processing spatial data of cultivated land resources as described in the first aspect are implemented.
[0029] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for processing spatial data of cultivated land resources as described in the first aspect.
[0030] The method and device for processing cultivated land resource spatial data provided by the embodiment of the present invention obtain vector cultivated land resource spatial data files of multiple regions, then clip each vector cultivated land resource spatial data file according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone; then clip the vector cultivated land resource spatial data sub-file corresponding to each projection zone according to the regular grid corresponding to each projection zone to obtain the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid corresponding to each projection zone; finally, convert the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and store it in the corresponding target storage address, thereby realizing the storage of more refined cultivated land resource spatial data, improving the degree of refinement of cultivated land resource spatial data processing, and having the advantages of high computational efficiency, high robustness and easy expansion. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 It is a schematic diagram of the flow of a method for processing spatial data of cultivated land resources provided by an embodiment of the present invention;
[0033] Figure 2 It is a schematic diagram of a process for cutting spatial data files of cultivated land resources in various counties and districts according to projection zoning rules provided by an embodiment of the present invention;
[0034] Figure 3 It is a schematic diagram of a process of constructing a 100-kilometer to 10-kilometer multi-level regular grid system and coding rules and segmenting a spatial data file provided by an embodiment of the present invention;
[0035] Figure 4 is a schematic diagram of querying spatial data of cultivated land resources provided by an embodiment of the present invention;
[0036] Figure 5 It is a structural schematic diagram of a farmland resource spatial data processing device provided by an embodiment of the present invention;
[0037] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The method of the embodiment of the present invention can be applied to land resource management scenarios, realizes more refined storage of cultivated land resource spatial data, improves the refinement of cultivated land resource spatial data processing, and has the advantages of high computational efficiency, high robustness, and easy scalability.
[0040] In the related technologies, the investigation and research on cultivated land has accumulated a large amount of cultivated land map vector data and cultivated land quality index data. These data are often organized in the form of vector files and stored in administrative units. The existing schemes are not conducive to the comprehensive calculation and analysis of cultivated land resources.
[0041] The method for processing cultivated land resource spatial data of the embodiment of the present invention obtains vector cultivated land resource spatial data files of multiple regions, then clips each vector cultivated land resource spatial data file according to the boundary of a preset projection zone to obtain a vector cultivated land resource spatial data sub-file corresponding to each projection zone; then clips the vector cultivated land resource spatial data sub-file corresponding to each projection zone according to the regular grid corresponding to each projection zone to obtain a vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid corresponding to each projection zone; finally, converts the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and stores it in the corresponding target storage address, thereby realizing the storage of more refined cultivated land resource spatial data, improving the degree of refinement of cultivated land resource spatial data processing, and having the advantages of high computational efficiency, high robustness, and easy expansion.
[0042] In order to facilitate a clearer understanding of the technical solutions of the embodiments of the present application, some technical contents related to the embodiments of the present application are first introduced.
[0043] Cultivated land resource data, including explicit spatial distribution data of cultivated land patches and implicit spatial data of indicators such as climate, soil, topography, engineering, and biodiversity related to cultivated land, are the basis for studying the sustainable utilization path of cultivated land. Cultivated land resource data has the characteristics of multi-source, heterogeneous, and multi-scale. On the one hand, there are many sources of explicit and implicit cultivated land resource data, mainly including spatial distribution data of cultivated land patches based on multi-resolution remote sensing image inversion, climate conditions, soil physical and chemical properties, etc. based on point observation sampling combined with model simulation, which are often based on medium and high spatial resolution raster data model organization or vector data model organization, and there are many differences in data structure, file format, coordinate reference, spatial resolution, etc. On the other hand, the past government-led surveys and studies on cultivated land have accumulated a large amount of cultivated land patch vector data and cultivated land quality indicator data. These data are often organized in the form of vector files and stored in county-level administrative units. This storage scheme is not conducive to the comprehensive calculation and analysis of large-scale cultivated land resource data, and it is difficult to integrate and apply with remote sensing data products. In addition, cultivated land patches are often spatially discrete. Organizing large-scale cultivated land patches into a raster dataset may result in high redundancy, which is not conducive to high-performance data computing and management. Existing spatial grid systems focus on improving the indexing efficiency of spatial data, but have weak support for spatial data reading, writing and comprehensive computing. Research and application of high-performance spatial data management methods for cultivated land resource data are important for studying the pattern and change process of cultivated land resource systems.
[0044] Combine the following Figure 1-Figure 6The technical solution of the present invention is described in detail with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0045] Figure 1 FIG. 1 is a flow chart of an embodiment of a method for processing spatial data of cultivated land resources provided by an embodiment of the present invention. Figure 1 As shown, the method provided in this embodiment includes:
[0046] Step 101, obtaining vector spatial data files of cultivated land resources in multiple regions;
[0047] Specifically, in the existing technology, the spatial data of cultivated land resources are organized in the form of vector files and stored in county-level administrative units. Although this is beneficial to the management and transmission of cultivated land resources at the county level to a certain extent, it is not conducive to the rapid query, update and visualization of cultivated land resource data on a global scale. It also seriously hinders the fusion calculation of cultivated land vector files and other remote sensing inversion data products organized based on raster models.
[0048] In order to solve the above problem, in the embodiment of the present application, vector farmland resource spatial data files of multiple regions are first obtained, that is, farmland resource spatial data files organized in the form of vector files of multiple counties are obtained.
[0049] Step 102: clipping each vector cultivated land resource spatial data file according to the preset projection zone boundary to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone;
[0050] Specifically, after obtaining the vector arable land resource spatial data files of multiple regions, in the embodiment of the present application, each vector arable land resource spatial data file is cropped according to the boundary of the preset projection zone to obtain the vector arable land resource spatial data sub-file corresponding to each projection zone; optionally, the preset projection zone can be a Gauss-Krüger 6° projection zone, or a Gauss-Krüger 3° projection zone or a Transverse Mercator 6° projection zone, etc., and the corresponding geographic coordinate system can be CGCS2000, WGS1984, Xi'an 80, etc., and the geocentric coordinate system is preferably selected.
[0051] For example, taking the spatial data set of some cultivated land quality indicators organized based on the county-level administrative division and the vector data model as an example, each vector cultivated land resource spatial data file is clipped according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data subfile corresponding to each projection zone. The specific process is as follows:
[0052] First, vector spatial data files of cultivated land resources in multiple regions were obtained. Each county corresponds to a set of vector data files, which are stored in SHAPEFILE format. The relevant cultivated land quality indicators are soil bulk density X1, soil organic carbon X2, soil thickness X3, pH value X4, gravel content X5, and tillage distance X6. These indicators are stored in the .dbf attribute table in the form of field attribute values. The cultivated land plot graphic data is stored in the .shp file. The coordinate reference is the Gauss-Krüger 6° zoning plane coordinate system, and the rotation ellipsoid parameters refer to the CGCS2000 coordinate system.
[0053] Then, the spatial data files of cultivated land resources in each county are cut according to the projection zoning rules. Optionally, the spatial data files F of cultivated land resources in each county can be processed one by one: the minimum longitude lon of the spatial range covered by the F file is extracted min With the maximum longitude lon max , according to lon min With lon max and the longitude boundary of Gauss-Krüger 6° zone; determine whether the spatial distribution of cultivated land graphics in the F file spans more than one Gauss-Krüger 6° projection zone. If "no", transform the F file coordinate system projection into its corresponding Gauss-Krüger 6° projection zone; if "yes", apply the boundary of the Gauss-Krüger 6° projection zone spanned by the F file to cut the F file into several sub-files SF k , and each sub-file SF k The coordinate system projection is transformed into its corresponding Gauss-Krüger 6° projection zone. Figure 2 As shown, the vector cultivated land resource spatial data file F 321281 (203) covers two Gauss-Krüger 6° projection zones, with WKIDs of 4498(201) and 4499(202) respectively. The boundaries of the projection zones are used to crop the vector file F 321281 (203), output sub-files SF 321281_1 (204) and SF 321281_2 (205).
[0054] Step 103, clipping the vector cultivated land resource spatial data subfile corresponding to each projection zone according to the regular grid corresponding to each projection zone, to obtain the vector cultivated land resource spatial data subfile unit corresponding to each grid unit in the regular grid corresponding to each projection zone;
[0055] Specifically, after clipping each vector cultivated land resource spatial data file according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data subfile corresponding to each projection zone, in the embodiment of the present application, a regular grid is constructed in each projection zone; wherein the spatial range of the regular grid in the projection zone covers the range of the entire projection zone. Optionally, a 100-kilometer regular grid and a 10-kilometer regular grid can be constructed in each projection zone, and the 10-kilometer regular grid is nested in the 100-kilometer grid. Optionally, after constructing a 100-kilometer regular grid and a 10-kilometer regular grid in each projection zone, the vector cultivated land resource spatial data subfile corresponding to each projection zone can be clipped according to the regular grid corresponding to each projection zone, and the vector cultivated land resource spatial data subfile unit corresponding to each grid unit in the regular grid corresponding to each projection zone is obtained, thereby also on the basis of clipping the vector cultivated land resource spatial data subfile by projection zone, the vector cultivated land resource spatial data subfile corresponding to the projection zone is clipped more finely by using the regular grid.
[0056] Step 104: convert the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and store it in a target storage address; the target storage address is determined based on the projection band and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit.
[0057] Specifically, after the vector farmland resource spatial data subfiles corresponding to each projection zone are clipped according to the regular grid corresponding to each projection zone, and the vector farmland resource spatial data subfile units corresponding to each grid unit in the regular grid corresponding to each projection zone are obtained, in the embodiment of the present application, the vector farmland resource spatial data subfile units corresponding to each grid unit in the regular grid are converted into raster farmland resource spatial data subfile units, and stored in the target storage address; wherein, the target storage address is determined based on the projection zone and grid unit corresponding to the vector farmland resource spatial data subfile unit, so that the farmland resource spatial data storage address in each spatial range can be quickly and accurately determined according to the projection zone and grid unit corresponding to the farmland resource spatial data. In addition, the raster farmland resource spatial data is easier to calculate and analyze than the vector farmland resource spatial data, thereby improving the analysis and processing efficiency of the farmland resource spatial data.
[0058] For example, the target storage address can be determined based on the following method: construct root directories for the Gauss-Kruger 6° projection zone respectively, and the root directory name is set to the WKID number of the corresponding Gauss-Kruger 6° projection zone. In the implementation process, an optional solution is to store the root directory in several data storage nodes to improve data reading and writing efficiency. The root directory path is ServerID / WKID, where ServerID is the data node number. Under each root directory, a 100-kilometer regular grid system is constructed with the coordinate (0, 0) as the origin. The length of each grid unit in the X and Y axis directions is 100 kilometers, and the shape is square. The X coordinate and Y coordinate of the grid vertex are both integer multiples of 100 kilometers. The spatial range of the grid system covers the boundary range of the projection zone corresponding to the root directory. The encoding of the 100-kilometer grid is expressed in a 4-digit code, in which the first 2 digits are assigned to the ordinate of the vertex with the smallest XY coordinate of the grid (unit: 100 kilometers), and the last 2 digits are assigned to the abscissa of the vertex with the smallest XY coordinate of the grid (unit: 100 kilometers). In each root directory, a folder is constructed for each 100-kilometer grid, and the folder name is set to the 100-kilometer grid code. A 10-kilometer regular grid system is constructed based on the 100-kilometer regular grid system, and each 100-kilometer grid unit is equally spaced into 10*10 10-kilometer grid units. The length of each 10-kilometer grid unit in the X and Y axis directions is 10 kilometers, and the shape is square. The X-coordinate and Y-coordinate of the grid vertex are integer multiples of 10 kilometers. The spatial scope of the 10-kilometer grid system is consistent with the 100-kilometer grid. The 10-kilometer grid code is expressed in a 6-digit code, and the 10-kilometer digit value of the vertical coordinate and horizontal coordinate of the vertex with the smallest XY coordinate of the 10-kilometer grid is appended to the 4-digit code of the 100-kilometer grid to which it belongs. In each 100-kilometer grid folder, a folder is constructed for each 10-kilometer grid inside it, and the folder name is set to the 10-kilometer grid code. For example Figure 3 As shown, taking the 10-kilometer grid (305) numbered 360756 as an example, let the vertical coordinate of the vertex M (306) with the smallest XY coordinate be Y M , the horizontal axis is X M (Unit: km). Assume that the 6-bit code of the 10-km grid (305) is "OOAANT", and "OO" corresponds to the two-bit Y-axis coordinate code of the 100-km grid. in is the floor sign, if Then "OO" = "0" & "OO", that is, add "0" to the left of the "OO" code; "AA" corresponds to the two-digit 100-kilometer grid X-axis coordinate code, in The symbol for rounding down; "N" corresponds to a ten-kilometer grid Y-axis coordinate code. "T" corresponds to a 10-kilometer grid X-axis coordinate code. SF 321281_1 (303) The spatial range is in the projection zone with WKID 4498, the corresponding 100-kilometer grid code is "3607", and the corresponding 10-kilometer grid code is "360756". The folder path corresponding to the 10-kilometer grid, that is, the target storage address of the raster cultivated land resource spatial data sub-file unit corresponding to the 10-kilometer grid unit, can be expressed as: "Server01 / 4498 / 3607 / 360756", where "Server01" represents the storage address of data node No. 1. SF 321281_2 (304) The spatial range is in the projection zone with WKID 4499, the corresponding 100-kilometer grid code is "3602", and the corresponding 10-kilometer grid code is "360242". The folder path corresponding to the 10-kilometer grid can be expressed as: "Server02 / 4499 / 3602 / 360242", where "Server02" represents the storage address of data node 2. In this embodiment, spatial data files corresponding to different projection zones are stored in different data nodes. In actual applications, other data node allocation schemes can also be designed.
[0059] Optionally, the specific process of clipping the subfiles of cultivated land resource spatial data one by one based on the regular grid is as follows:
[0060] For each Gauss-Krüger 6° projection zone root directory, use the 10-kilometer regular grid vector boundary to clip each county's cultivated land resource spatial data subfile SF k , output several sub-files SSF k,10kmgid , each sub-file SSF k,10kmgid Corresponding to a 10km regular grid 10kmgid that contains its spatial relationship. According to the subfile SSF k,10kmgidExecute vector to raster conversion on different fields of the data, and output the corresponding raster datasets of cultivated land quality indicators. The spatial resolution of the raster datasets is set to ps meters. The cultivated land quality indicators are soil bulk density X1, soil organic carbon X2, soil thickness X3, pH value X4, gravel content X5, and tillage distance X6. Encode the names of the output raster datasets of each indicator and store them as leaf nodes in the 10kmgid folder path of the 10km regular grid. The folder path is ServerID / WKID / 100kmgrid / 10kmgrid. The name code of each indicator raster dataset includes grid code, imaging date, starting pixel row and column number, number of pixel rows and columns, spatial resolution, data type code, etc. The grid code is the regular grid code corresponding to the raster file; the imaging date is composed of 8 digits: 4 digits for the year, 2 digits for the month, and 2 digits for the date; the starting pixel row and column number each occupy 5 digits, and those less than 5 digits are padded with 0 before the code, indicating that at the current raster file spatial resolution, the starting pixel of the raster file (row number: 0, column number: 0 ) The number of pixels from the minimum x-coordinate boundary and the maximum y-coordinate boundary of the grid. When the minimum X-coordinate value and the maximum Y-coordinate value of the raster file and its corresponding grid are consistent, the row and column number of the starting pixel is encoded as "0000000000"; the number of rows and columns each occupies a 5-digit code, and the number of digits less than 5 is padded with 0 before encoding, indicating the number of rows and columns of pixels in the raster file; the spatial resolution occupies a 3-digit code, and the number of digits less than 3 is padded with 0 before encoding; the data type occupies a 4-digit code, which can be customized and the data type coding table can be constructed. The setting of the spatial resolution ps of the raster dataset refers to the map scale or the spatial resolution of the remote sensing data that should be in the vectorization process, and meets the following conditions: 1) a common divisor of 10,000 meters; 2) less than or equal to 10 meters. In this embodiment, ps is set to 2 meters. If the appropriate value of the spatial resolution ps is greater than 10 meters, the 100-kilometer regular grid vector boundary is used to clip the spatial data subfile SF of the cultivated land resources of each county. k , encode the name of each indicator raster dataset output, and store it as a leaf node in the 100km regular grid folder path, the folder path is ServerID / WKID / 100kmgrid. In this case, the ps setting needs to meet the common divisor of 100,000 meters. The appropriate value of the spatial resolution ps can generally be based on the production accuracy of the spatial data. For example, the ps of the cultivated land vector data generated by the vectorization of the raster data with a spatial resolution of 1 meter can be 1 meter or 2 meters; and the ps of the cultivated land vector data generated by the vectorization of the raster data with a spatial resolution of 30 meters can be 32 meters or higher.
[0061] It should be noted that the embodiment of the present application reorganizes the cultivated land resource quality data file based on a regular grid of hundreds to tens of kilometers arranged in row and column order under a plane projection coordinate system, and encodes the cultivated land resource spatial data file according to the grid spatial range, data type and spatial resolution, which has the advantages of high computational efficiency, high robustness and easy expansion.
[0062] The method of the above embodiment, after obtaining the vector cultivated land resource spatial data files of multiple regions, cuts each vector cultivated land resource spatial data file according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone; then cuts the vector cultivated land resource spatial data sub-file corresponding to each projection zone according to the regular grid corresponding to each projection zone to obtain the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid corresponding to each projection zone; finally, converts the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and stores it in the corresponding target storage address, thereby realizing the storage of more refined cultivated land resource spatial data, improving the degree of refinement of cultivated land resource spatial data processing, and having the advantages of high computational efficiency, high robustness and easy expansion.
[0063] In one embodiment, after converting the vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid into raster cultivated land resource spatial data sub-file units and storing them in the target storage address, the method further includes:
[0064] Obtain the query information input by the user; the query information is used to query the spatial data of cultivated land resources;
[0065] According to the query information, the projection zone and grid unit corresponding to the queried cultivated land resource spatial data are determined;
[0066] Determine the target storage address corresponding to the queried cultivated land resource spatial data according to the projection zone and grid unit corresponding to the queried cultivated land resource spatial data;
[0067] According to the grid cultivated land resource spatial data sub-file unit stored in the target storage address, the query result of the queried cultivated land resource spatial data is obtained.
[0068] Specifically, in an embodiment of the present application, multi-source spatial data are segmented and reorganized based on a regular grid, and the cultivated land resource spatial data file is encoded according to the grid spatial range, data type and spatial resolution, and based on this, a data storage path and a metadata-free data retrieval strategy are constructed, thereby realizing the rapid extraction of multi-source cultivated land resource spatial data.
[0069] Optionally, the query information input by the user can be obtained first; then, according to the query information, the projection zone and grid unit corresponding to the queried cultivated land resource spatial data are determined; according to the projection zone and grid unit corresponding to the queried cultivated land resource spatial data, the target storage address corresponding to the queried cultivated land resource spatial data is determined. Optionally, the query information includes: spatiotemporal query conditions, cultivated land quality attributes, and calculation polynomial functions. Among them, the carrier of the time parameter can be a one-dimensional array [d1, d2], and d1 and d2 are both 8-bit encoded strings: 4 bits correspond to the year, 2 bits correspond to the month, and 2 bits correspond to the date, respectively extracting the raster files in the time period d1-d2. If the raster file of the specified date dx is extracted, d1=d2=dx is set; if the extracted target type data has only one period or a specific number of periods, a pre-defined 8-bit code can be used. For example, in this embodiment, since there is only one period of cultivated land quality index data, it is pre-defined to use "00000000" as the time parameter. The carrier of the spatial parameter is a two-dimensional array of n rows and 2 columns, and each row of the array corresponds to a geographical coordinate of a point, wherein the 0th column represents the longitude and the 1st column represents the latitude. A spatial query condition can be formed based on the two-dimensional array: if the two-dimensional array has only 1 row, the spatial query condition is point intersection; if the two-dimensional array contains 2 rows, the spatial query condition is line intersection; if the two-dimensional array is greater than 2 rows, starting from the first row, the corresponding point coordinates of each row are connected in order, and finally the last row points are connected to the first row points to form a closed polygon, and the spatial query condition is polygon intersection. In this embodiment, the spatial query condition is based on a 4-row, 2-column two-dimensional array {{lon E ,lat E},{lon F ,lat F},{lon G ,lat G},{lon G ,lat H}} The polygon formed by the coordinate reference is the GCS2000 geographic coordinate system. The carrier of the object type parameter is a two-dimensional array of m rows and 2 columns (m≥1), each row in the array corresponds to a type of cultivated land resource quality indicator, the element value of the first column is a pre-defined independent variable symbol, which corresponds to the independent variable symbol in the calculation polynomial function; the element value of the second column is the same as the 4-digit code of the data type in the raster file name encoding corresponding to the regular grid. In this embodiment, the object type parameter (cultivated land quality attribute) is based on a 6-row and 2-column two-dimensional array {{x1,0001},{x2,0002},{x3,0003},{x4,0004},{x5,0005},{x6,0006}}. The optional parameters of the calculation mode include "0", "1": "0" means directly outputting the query results without performing calculations; "1" means performing calculations on the extracted raster files according to the polynomial function and outputting the calculation results. In this embodiment, the calculation mode parameter is set to "1". The calculation polynomial function is customized by the user. In this embodiment, weighted average calculation of multiple arable land quality indicators is carried out, and the calculation polynomial function is set to "q1*x1+q2*x2+q3*x3+q4*x4+q5*x5+q6*x6", where q1, q2, q3, q4, q5, q6 represent the corresponding weights of the arable land quality indicators, and q1+q2+q3+q4+q5+q6=1.
[0070] Optionally, after obtaining the query information input by the user, the projection zone and grid unit corresponding to the queried cultivated land resource spatial data can be determined according to the query information. For example, the two-dimensional array {{lon E ,lat E},{lon F ,lat F},{lon G ,lat G},{lon H ,lat H}}Does it span multiple Gauss-Krüger 6° projection zones? If not, directly determine the unique Gauss-Krüger 6° projection zone WKID based on the polygon P corresponding to the two-dimensional array of spatial query conditions w , and apply the polygon P with the projection band WKID w The corresponding ten-kilometer regular grid vector boundary performs spatial overlay analysis, extracts the ten-kilometer regular grid that intersects with the polygon P space, and forms a ten-kilometer regular grid code set GC{}. If yes, the Gauss-Kruger 6° projection zone boundary is applied to clip the polygon P corresponding to the spatial query condition two-dimensional array into s (s>1) sub-polygons subP k (k=1,..,s), each sub-polygon subP k Corresponding to a unique Gauss-Krüger 6° projection with WKIDk For each sub-polygon subP k , apply subP k With projection with WKID k The corresponding ten-kilometer regular grid vector boundary performs spatial overlay analysis and extracts the polygon subP k A ten-kilometer regular grid intersecting in space forms a regular grid code set GC k {}.
[0071] Optionally, after determining the target storage address corresponding to the queried farmland resource spatial data, the query result of the queried farmland resource spatial data can be obtained according to the raster farmland resource spatial data subfile unit stored in the target storage address. For example, if the polygon P corresponding to the two-dimensional array of spatial query conditions is included in the unique Gauss-Krüger 6° projection band, the raster file corresponding to each element in the ten-kilometer regular grid code set GC{} is processed in parallel: Taking the i-th ten-kilometer regular grid in GC{} as an example, assuming that the grid 6-bit code is GC[i], the grid corresponding raster file storage folder path DIR GC[i] For "ServerID / WKID w / Left(GC[i],4) / GC[i]". "Left(GC[i],4)" means extracting the first 4 digits of GC[i], which is consistent with the 100-kilometer grid code to which GC[i] belongs. Extract DIR according to the object type parameter GC[i] The raster files corresponding to the farmland resource quality indicators x1, x2, x3, x4, x5, and x6 under the path are calculated pixel by pixel using the calculation polynomial function, and the result raster file F corresponding to GC[i] is output. r The above calculation process is performed on the raster file corresponding to each element in the ten-kilometer regular grid code set GC{} to form a result raster file set F r {}.like Figure 4 As shown, the ten-kilometer regular grid code set GC corresponding to the spatial query range (502) is GC={360756, 360757, 360746, 360747}; the grid corresponding raster file storage folder path is DIR GC[] ={Server01 / 4498 / 3607 / 360756, Server01 / 4498 / 3607 / 360757, Server01 / 4498 / 3607 / 360746, Server01 / 4498 / 3607 / 360747}; For each folder path, extract the raster files corresponding to the folder-class cultivated land resource quality indicators x1, x2, x3, x4, x5, x6, perform polynomial calculations, and output the calculation result files.
[0072] If the polygon P corresponding to the two-dimensional array of spatial query conditions spans several Gauss-Krüger 6° projection zones, each sub-polygon subP is processed separately in parallel or serially. k The corresponding ten-kilometer regular grid code set GC k {}, parallel processing of ten-kilometer regular grid code collection GC k The grid file corresponding to each element in {}: k Take the ith 10-kilometer regular grid in {} as an example, assuming that the 6-bit code of the grid is GC k [i], the grid corresponds to the grid file storage folder path DIR GCk[i] For "ServerID / WKID w / Left(GC k [i],4) / GC k [i]".Left(GC k [i],4)” means extracting GC k [i] The first 4 bits of the code are the same as GC k [i] The 100km grid code is consistent. Extract DIR according to object type parameters GCk[i] The raster files corresponding to the cultivated land resource quality indicators x1, x2, x3, x4, x5, and x6 under the path are calculated pixel by pixel using the calculation polynomial function, and the GC is output. k [i] One-to-one corresponding result grid file F k,r . For the 10 km regular grid code set GC k The raster file corresponding to each element in {} executes the above calculation process to form a result raster file set F k,r {}(Each sub-polygon subP k Corresponding to a result raster file set F k,r {}).
[0073] Optionally, if the polygon P corresponding to the two-dimensional array of spatial query conditions is included in the unique Gauss-Krüger 6° projection band, then the raster file set F in the projection band is r {}Execute data merging and output the final calculation result file.
[0074] Optionally, if the polygon P corresponding to the spatial query condition two-dimensional array spans several Gauss-Krüger 6° projection zones, each subpolygon subP k The corresponding raster file set F k,r {}Execute data merging and output multiple final calculation result files.
[0075] It should be noted that, in view of the characteristics of the discrete spatial distribution of cultivated land resources, in the embodiment of the present application, multi-level regular grids are applied to perform segmentation, reorganization, and cleaning of spatial data of cultivated land resources with different grouping methods and multi-source heterogeneous, and establish an association relationship between grid code-file storage address-data type. In a specific spatiotemporal query and calculation scenario, this method supports directly calculating the target raster file storage path based on the spatiotemporal query conditions and data type conditions, and then directly extracting files, and splicing these files in the form of assembling building blocks, which not only greatly saves the time-consuming file retrieval and clipping processing, but also facilitates the integration of customized raster file calculation functions in this process. At the same time, this method is compatible with data-intensive parallel processing strategies, and can further improve computing efficiency by splitting the spatial query range into several sub-ranges for parallel processing. In addition, this method is applicable to different types of medium and high-resolution raster data files.
[0076] The method of the above embodiment, after obtaining the query information input by the user, determines the projection zone and grid unit corresponding to the queried cultivated land resource spatial data according to the query information; then determines the target storage address corresponding to the queried cultivated land resource spatial data according to the projection zone and grid unit corresponding to the queried cultivated land resource spatial data; finally, according to the raster cultivated land resource spatial data sub-file unit stored in the target storage address, obtains the query result of the queried cultivated land resource spatial data, thereby realizing more refined storage of cultivated land resource spatial data, and can quickly extract multi-source cultivated land resource spatial data and perform analysis, calculation and processing.
[0077] In one embodiment, the method for processing farmland resource spatial data further includes:
[0078] Construct a 100-kilometer regular grid and a 10-kilometer regular grid corresponding to each projection zone; the spatial range of the 100-kilometer regular grid and the 10-kilometer regular grid is consistent with the spatial range of the corresponding projection zone; the 10-kilometer regular grid is nested in the 100-kilometer regular grid.
[0079] Specifically, in each projection zone, the embodiment of the present application constructs a 100-kilometer regular grid and a 10-kilometer regular grid corresponding to each projection zone, thereby making it possible to realize the clipping and storage of cultivated land resource spatial data based on different accuracies, thereby making it possible to realize the query, analysis and calculation of cultivated land resource spatial data at different accuracies, meet the needs of query, analysis and calculation of cultivated land resource spatial data at different accuracies in different scenarios, and improve the efficiency, accuracy and comprehensiveness of cultivated land resource spatial data processing.
[0080] In one embodiment, converting the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into the raster cultivated land resource spatial data sub-file unit includes:
[0081] The vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the grid are converted into raster cultivated land resource spatial data sub-file units of multiple cultivated land quality attributes.
[0082] Specifically, there are multiple attribute fields in the vector arable land resource spatial data file. In the embodiment of the present application, in the process of converting the vector arable land resource spatial data sub-file units corresponding to each grid unit in the regular grid into raster arable land resource spatial data sub-file units, according to the multiple attribute fields in the vector arable land resource spatial data file, the vector arable land resource spatial data sub-file units corresponding to each grid unit in the grid can be converted into raster arable land resource spatial data sub-file units of multiple arable land quality attributes. For example, a vector cultivated land resource spatial data file is converted into a soil bulk density X1 raster cultivated land resource spatial data file, a soil organic carbon X2 raster cultivated land resource spatial data file, a soil thickness X3 raster cultivated land resource spatial data file, a pH value X4 raster cultivated land resource spatial data file, a gravel content X5 raster cultivated land resource spatial data file, and a tillage distance X6 raster cultivated land resource spatial data file, a total of 6 raster cultivated land resource spatial data files. This allows the storage, query, analysis and calculation of cultivated land resource spatial data files from a more refined dimension, making the processing, query, analysis and calculation of cultivated land resource spatial data files more refined, improving the processing efficiency of cultivated land resource spatial data files, and meeting the processing needs of cultivated land resource spatial data files for different users in different scenarios.
[0083] The method of the above embodiment converts the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the grid into a raster cultivated land resource spatial data sub-file unit of multiple cultivated land quality attributes, so that the cultivated land resource spatial data file can be stored, queried, analyzed and calculated from a more refined dimension, making the processing, query, analysis and calculation of the cultivated land resource spatial data file more refined, improving the processing efficiency of the cultivated land resource spatial data file, and meeting the processing requirements of cultivated land resource spatial data files for different users in different scenarios.
[0084] In one embodiment, the method for processing spatial data of cultivated land resources further includes:
[0085] When the target storage address includes multiple grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, the multiple grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute are merged.
[0086] Specifically, in the boundary areas of counties and districts, there may be a situation where there are cultivated land resource spatial data files of multiple counties and districts in one grid unit. Therefore, in an embodiment of the present application, when the target storage address corresponding to the same grid unit includes multiple raster cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, the multiple raster cultivated land resource spatial data sub-file units with the same cultivated land quality attribute are merged, so that there is only one merged cultivated land resource spatial data file in the target storage address corresponding to the grid unit, thereby effectively improving the processing efficiency of the cultivated land resource spatial data file and reducing the processing complexity and calculation amount.
[0087] For example, for each Gauss-Krüger 6° projection zone root directory, the ten-kilometer grid folder can be traversed one by one, and for each arable land quality indicator (including soil bulk density X1, soil organic carbon X2, soil thickness X3, pH value X4, gravel content X5, and tillage distance X6), the number of raster files corresponding to the indicator in each non-empty ten-kilometer grid folder is calculated. If the number of raster files is equal to 1, the raster file is traversed row by row and column by column respectively, and the pixels with empty values in the entire row and column are shrunk and cleaned from the edge, and the file name is re-encoded, and the row and column number code and the row and column number code of the starting pixel are modified; if the number of raster files is greater than 1, several raster files corresponding to the indicator are mosaicked and merged and output as one file, and the file is shrunk and cleaned, the file name is re-encoded, and the original raster file is deleted. It should be noted that if the spatial resolution of the arable land quality index raster file is set to be greater than 10 meters in step 103 and the raster file is stored in a 100-kilometer regular grid folder, then step 104 is to merge and clean the arable land quality index spatial data files of the same type corresponding to the regular grid for each 100-kilometer grid folder, and re-encode the file name.
[0088] The method of the above embodiment, when the target storage address corresponding to the same grid unit includes multiple raster cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, merges the multiple raster cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, so that there is only one merged cultivated land resource spatial data file in the target storage address corresponding to the grid unit, thereby effectively improving the processing efficiency of the cultivated land resource spatial data file and reducing the processing complexity and calculation amount.
[0089] For example, a method for processing spatial data of cultivated land resources is provided in an embodiment of the present application, and the specific process is as follows:
[0090] First, the spatial data files of cultivated land resources in each county are cropped according to the projection zoning rules; the projection zoning rules can be Gauss-Krüger 6° projection zoning, Gauss-Krüger 3° projection zoning or Transverse Mercator 6° projection zoning, etc. The corresponding geographic coordinate system can be CGCS2000, WGS1984, Xi'an 80, etc., and the geocentric coordinate system is preferred.
[0091] Then, a 100-km-10-km multi-level regular grid system and coding rules are constructed; among them, the number of rows and columns of the 100-km grid regular grid corresponding to each projection zone is the same, and the number of rows and columns of the 10-km regular grid is the same. The 100-km grid and the 10-km grid have a nested relationship. The 100-km grid is coded as a 4-digit code "OOAA", "OO" and "AA" are the 100-km code of the Y-axis coordinate and the 100-km code of the X-axis coordinate respectively; the 10-km grid is coded as a 6-digit code "OOAANT", in which the first 4 digits of the code are consistent with the upper 100-km grid to which the 10-km grid belongs, "N" and "T" are the 10-km code of the Y-axis coordinate and the 10-km code of the X-axis coordinate respectively; the 10-km grid is coded as a 6-digit code "OOAANT" and can also be adjusted to "AAOOTN".
[0092] Next, the cultivated land resource spatial data subfiles are divided one by one based on the regular grid system and encoded and stored separately; optionally, the appropriate spatial resolution ps is determined according to the production process and original data of the cultivated land resource spatial data. If ps≤10 meters, the 10-kilometer regular grid system is used to clip the cultivated land resource spatial data, and the parent folder path of the output file is "ServerID / WKID / 100kmgrid / 10kmgrid / "; if ps>10 meters, the 100-kilometer regular grid system is used to clip the cultivated land resource spatial data, and the parent folder path of the output file is "ServerID / WKID / 100kmgrid / ". If the output file is a vector file, it is converted into a raster file according to the pre-designed field type, spatial resolution and raster data type.
[0093] Finally, for each regular grid, the spatial data files of the same type of cultivated land quality indicators corresponding to the regular grid are merged and cleaned, and the file names are recoded. Optionally, the number of raster files with the same date code, data type code, and spatial resolution corresponding to each 10-kilometer grid can be detected. If the number of files is greater than 1, these raster files are merged to form a new file, the new file's inspiration pixel row and column numbers and row and column numbers are recalculated, and the new file is recoded based on the calculation results.
[0094] Optionally, in the process of querying the spatial data of cultivated land resources, it can be done in the following ways:
[0095] First, the high-performance computing interface of cultivated land resource spatial data is called to set the spatiotemporal query conditions, data processing objects and calculation polynomial functions;
[0096] Then, the regular grid set corresponding to the spatial query range is parsed;
[0097] Next, the regular grid set is processed in parallel, the spatial data of cultivated land resources corresponding to the regular grid is extracted and the calculation is performed according to the polynomial function;
[0098] Finally, the calculation results corresponding to each regular grid are merged and the final calculation results are output.
[0099] The method of the above embodiment, in a plane projection coordinate system, reorganizes the cultivated land resource quality data file based on a regular grid of 100 kilometers to 10 kilometers arranged in row and column order, maps the data storage path based on a unified row and column coding rule and constructs a metadata-free data indexing strategy. The data extraction and calculation process are compatible with a parallel processing strategy, and has the characteristics of high computing efficiency, high robustness, and easy expansion. It is compatible with the integrated management of cultivated land resource quality indicator data and comprehensive evaluation data and other soil, climate, hydrology, and ecological data, and effectively improves the processing efficiency and refinement of cultivated land resource quality data.
[0100] The cultivated land resource spatial data processing device provided by the present invention is described below. The cultivated land resource spatial data processing device described below and the cultivated land resource spatial data processing method described above can be referenced to each other.
[0101] Figure 5 Schematic diagram of the structure of the farmland resource spatial data processing device provided by the present invention. The farmland resource spatial data processing device provided by this embodiment includes:
[0102] An acquisition module 710 is used to acquire vector farmland resource spatial data files of multiple regions;
[0103] The first clipping module 720 is used to clip each vector cultivated land resource spatial data file according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone;
[0104] The second clipping module 730 is used to clip the vector cultivated land resource spatial data subfile corresponding to each projection zone according to the regular grid corresponding to each projection zone, and obtain the vector cultivated land resource spatial data subfile unit corresponding to each grid unit in the regular grid corresponding to each projection zone;
[0105] Processing module 740 is used to convert the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and store it at a target storage address; the target storage address is determined based on the projection band and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit.
[0106] Optionally, the processing module 740 is further used to: obtain query information input by the user; the query information is used to query the cultivated land resource spatial data;
[0107] According to the query information, the projection zone and grid unit corresponding to the queried cultivated land resource spatial data are determined;
[0108] Determine the target storage address corresponding to the queried cultivated land resource spatial data according to the projection zone and grid unit corresponding to the queried cultivated land resource spatial data;
[0109] According to the grid cultivated land resource spatial data sub-file unit stored in the target storage address, the query result of the queried cultivated land resource spatial data is obtained.
[0110] Optionally, the second clipping module 730 is also used to: construct a 100-kilometer regular grid and a 10-kilometer regular grid corresponding to each projection zone; the spatial range of the 100-kilometer regular grid and the 10-kilometer regular grid is consistent with the spatial range of the corresponding projection zone; the 10-kilometer regular grid is nested in the 100-kilometer regular grid.
[0111] Optionally, the processing module 740 is specifically used to: convert the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the grid into a raster cultivated land resource spatial data sub-file unit of multiple cultivated land quality attributes.
[0112] Optionally, the processing module 740 is further used to merge the multiple raster farmland resource space data sub-file units with the same farmland quality attribute when the target storage address includes multiple raster farmland resource space data sub-file units with the same farmland quality attribute.
[0113] Optionally, the query information includes: spatiotemporal query conditions, farmland quality attributes and calculation polynomial functions.
[0114] The device of the embodiment of the present invention is used to execute the method in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0115] Figure 6An example physical structure diagram of an electronic device is shown, which may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute the method for processing cultivated land resource spatial data, which includes: obtaining vector cultivated land resource spatial data files of multiple regions; clipping each vector cultivated land resource spatial data file according to the boundary of the preset projection zone to obtain the vector cultivated land resource spatial data sub-file corresponding to each projection zone; clipping the vector cultivated land resource spatial data sub-file corresponding to each projection zone according to the regular grid corresponding to each projection zone to obtain the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid corresponding to each projection zone; converting the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and storing it to the target storage address; the target storage address is determined based on the projection zone and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit.
[0116] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0117] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the cultivated land resource spatial data processing method provided by the above-mentioned methods, and the method includes: obtaining vector cultivated land resource spatial data files of multiple regions; clipping each vector cultivated land resource spatial data file according to the boundary of a preset projection zone to obtain a vector cultivated land resource spatial data sub-file corresponding to each projection zone; clipping the vector cultivated land resource spatial data sub-file corresponding to each projection zone according to the regular grid corresponding to each projection zone, and obtaining the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid corresponding to each projection zone; converting the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and storing it to a target storage address; the target storage address is determined based on the projection zone and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit.
[0118] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the above-mentioned cultivated land resource spatial data processing methods.
[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed 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. Those of ordinary skill in the art may understand and implement it without creative effort.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing spatial data of cultivated land resources, characterized in that: include: Obtain vector spatial data files of cultivated land resources in multiple regions; Cutting each of the vector cultivated land resource spatial data files according to the boundaries of the preset projection zones to obtain vector cultivated land resource spatial data sub-files corresponding to each projection zone; Constructing a 100-kilometer regular grid and a 10-kilometer regular grid corresponding to each projection zone; the spatial ranges of the 100-kilometer regular grid and the 10-kilometer regular grid are consistent with the spatial ranges of the corresponding projection zones; the 10-kilometer regular grid is nested in the 100-kilometer regular grid; According to the regular grid corresponding to each projection zone, the vector cultivated land resource spatial data subfile corresponding to each projection zone is cut to obtain the vector cultivated land resource spatial data subfile unit corresponding to each grid unit in the regular grid corresponding to each projection zone; Convert the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and store it in a target storage address; The target storage address is determined based on the projection band and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit; The step of converting the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into the raster cultivated land resource spatial data sub-file unit comprises: Converting the vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid into raster cultivated land resource spatial data sub-file units of multiple cultivated land quality attributes; In the case where the target storage address includes a plurality of grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, the plurality of grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute are merged.
2. The method for processing spatial data of cultivated land resources according to claim 1, characterized in that: After the vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid are converted into raster cultivated land resource spatial data sub-file units and stored in the target storage address, the method further includes: Acquire query information input by a user; the query information is used to query the spatial data of cultivated land resources; According to the query information, determining the projection zone and grid unit corresponding to the queried cultivated land resource spatial data; Determine the target storage address corresponding to the queried farmland resource spatial data according to the projection zone and grid unit corresponding to the queried farmland resource spatial data; According to the grid cultivated land resource spatial data sub-file unit stored in the target storage address, the query result of the queried cultivated land resource spatial data is obtained.
3. The method for processing spatial data of cultivated land resources according to claim 2, characterized in that: The query information includes: Spatiotemporal query conditions, farmland quality attributes, and computational polynomial functions.
4. A spatial data processing device for cultivated land resources, characterized in that: include: An acquisition module is used to acquire vector spatial data files of cultivated land resources in multiple regions; The first clipping module is used to clip each of the vector cultivated land resource spatial data files according to the boundaries of the preset projection zones to obtain the vector cultivated land resource spatial data sub-files corresponding to each projection zone; construct a 100-kilometer regular grid and a 10-kilometer regular grid corresponding to each projection zone; the spatial range of the 100-kilometer regular grid and the 10-kilometer regular grid is consistent with the spatial range of the corresponding projection zone; The ten-kilometer regular grid is nested in the one-hundred-kilometer regular grid; The second clipping module is used to clip the vector cultivated land resource spatial data subfiles corresponding to each projection zone according to the regular grid corresponding to each projection zone, and obtain the vector cultivated land resource spatial data subfile units corresponding to each grid unit in the regular grid corresponding to each projection zone; A processing module, used for converting the vector cultivated land resource spatial data sub-file unit corresponding to each grid unit in the regular grid into a raster cultivated land resource spatial data sub-file unit, and storing it in a target storage address; The target storage address is determined based on the projection band and grid unit corresponding to the vector cultivated land resource spatial data sub-file unit; The converting of the vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid into the raster cultivated land resource spatial data sub-file units comprises: converting the vector cultivated land resource spatial data sub-file units corresponding to each grid unit in the regular grid into the raster cultivated land resource spatial data sub-file units of a plurality of cultivated land quality attributes; In the case where the target storage address includes a plurality of grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute, the plurality of grid cultivated land resource spatial data sub-file units with the same cultivated land quality attribute are merged.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for processing spatial data of cultivated land resources as described in any one of claims 1 to 3 are implemented.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for processing spatial data of cultivated land resources as described in any one of claims 1 to 3 are implemented.
