SOC layer point matching system and method based on R language
Through the SOC layer point matching system based on R language, buffer creation and spatial connection technology are used to solve the limitations of GIS technology in layer overlay and point matching, and efficient and accurate soil organic carbon data point matching is achieved, ensuring data quality and simplification of analysis.
Patent Information
- Application Number
- CN202411676133.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-14
AI Technical Summary
GIS technology has limitations and shortcomings in layer overlay and point matching, resulting in the problem of reduced data points and missing large-area data during point matching at different periods of soil organic carbon data.
A SOC layer point matching system based on R language was designed, including data loading, buffer creation, layer merging and matching, data analysis and result output modules, and utilizes the programmability and modular processing capabilities of R language to achieve efficient and accurate layer point matching.
Through buffer creation and spatial connection operations, the accuracy and efficiency of data matching are improved, the challenges brought by land use changes and sampling point location differences are solved, data quality is ensured, data analysis process is simplified, and technical effects of flexible matching, accurate and efficient data quality, and simplified analysis are achieved.
Smart Images

Figure CN119621860A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of geographic environment data processing, and in particular relates to a SOC layer point matching system and method based on R language. Background Art
[0002] Soil organic carbon (SOC) is an important indicator for measuring soil physical and chemical properties and fertility, and is of great significance for evaluating soil carbon sinks and forest carbon sinks. In the study of soil fertility in forest areas across the country, the research team plans to expand the SOC database by establishing a matching relationship between soil survey points in the target area in 1990 and 2015, and fill in the SOC background value of 1990 corresponding to the soil survey points in 2015.
[0003] Due to the difficulty of repeated sampling due to changes in land use types, infrastructure construction, and differences in sampling point locations between the two samplings, the number of data points available for analysis has been greatly reduced, resulting in large-scale data missing. By matching points from different layers to supplement blank data from different periods, batch matching of spatial points can be achieved using R language. Summary of the invention
[0004] The purpose of the present invention is to provide a SOC layer point matching system and method based on R language to solve the limitations and shortcomings of GIS technology in layer overlay and point matching. This technology utilizes the programmability, repeatability, modular processing capabilities and economy of R language to design a layer point matching system and method that can efficiently and accurately process large-scale spatial data.
[0005] The present invention achieves the above-mentioned purpose through the following technical solutions:
[0006] In a first aspect, the present invention proposes a SOC layer point matching system based on R language, the system comprising:
[0007] A data loading module is used to load soil organic carbon data layers of target soil monitoring points at different periods to form a file to be processed; the data layers include soil data points of at least two different periods;
[0008] A buffer creation module, used to establish a buffer using soil data points of a first period, wherein the buffer is used to determine a spatial range that may match soil data points of a second period;
[0009] The layer merging and matching module is used to spatially connect the soil data points of the second period with the buffer zone established by the soil data points of the first period to achieve layer merging, and determine the successfully matched soil data points based on the spatial relationship;
[0010] The data analysis module screens, aggregates and merges the successfully matched soil data points to obtain the matching results;
[0011] The result output module outputs the matching results in the form of visualization or text file, and the matching results include the number, ID and data type of the successfully matched soil data points.
[0012] Furthermore, the system also includes an environment configuration module and a data processing module;
[0013] The environment configuration module is used to pre-configure a software platform for executing layer point matching; the software platform includes an R language platform;
[0014] The data processing module is used to read and process the soil organic carbon data layer in the file to be processed, so as to integrate the soil organic carbon data layer of at least two periods into a shapefile file, and is also used to customize functions under the software platform to execute operations such as creating buffers, spatial connections, filtering unmatched data, and data grouping and aggregation.
[0015] Furthermore, the buffer creation module includes:
[0016] A buffer setting unit, used to formulate a partitioning strategy;
[0017] A buffer generating unit, used for generating a buffer according to the partitioning strategy;
[0018] The division strategy includes: taking the soil data point of the first period as the center point and setting a buffer radius to form a buffer zone.
[0019] Furthermore, the layer merging and matching module includes:
[0020] A connection unit, used for spatially connecting the soil data points of the second period with the buffer zone established by the soil data points of the first period;
[0021] an analysis unit, configured to determine that the soil data points of the second period successfully match the soil data points of the first period when the soil data points of the second period fall into the buffer zone;
[0022] The matching output unit is used to output successfully matched soil data points.
[0023] Furthermore, the data analysis module includes:
[0024] A screening unit, used to screen data points that meet preset conditions from the successfully matched soil data points, wherein the preset conditions include a variation range of the data points, a stability of the data points, or an abnormal value of the data points;
[0025] An aggregation unit, used to group and aggregate the screened soil data points according to a preset rule, wherein the preset rule includes aggregation based on the number of successful matches of the data point, the data point ID and the data point type;
[0026] The integration unit is used to merge the matching times, data point IDs and data point types of data points after grouping and aggregation in different periods into a target data set, and output the target data set as a matching result.
[0027] Furthermore, the result output module includes:
[0028] An interactive visualization unit, used to generate a visualization atlas of the matching results, so that users can view and analyze the matching results;
[0029] The report generation unit is used to generate a visual report according to the matching results and user needs, wherein the visual report includes the number, ID, data type and recommended measures of the successfully matched soil data points.
[0030] Furthermore, the system also includes a batch processing module, which is used to perform batch processing of layer point matching on soil organic carbon data layers of multiple target soil monitoring points at different periods.
[0031] In a second aspect, the present invention proposes a SOC layer point matching method based on R language, the method is implemented based on any of the layer point matching systems described above, and the method comprises the following steps:
[0032] S1. Pre-configuring a software platform for performing layer point matching through the environment configuration module; the software platform is an R language platform, and pre-customizing functions under the R language platform for performing operations such as creating a buffer, spatial connection, filtering unmatched data, and data grouping and aggregation;
[0033] S2, using the data loading module to load the soil organic carbon data layers of the target soil monitoring point at different periods to form a file to be processed, and reading and processing the soil organic carbon data layers in the file to be processed through the data processing, and integrating the soil organic carbon data layers of at least two periods into a file in shapefile format;
[0034] S3, using the buffer zone creation module to set a buffer zone radius with the soil data point of the first period as the center point, and generate a buffer zone;
[0035] S4, spatially connecting the soil data points of the second period with the generated buffer zone through the layer merging and matching module, and determining the successfully matched soil data points according to the spatial relationship;
[0036] S5, performing screening, aggregation and merging operations on the successfully matched soil data points through the data analysis module;
[0037] S6. Outputting the processed matching results in the form of a visual chart or a visual report through the result output module, wherein the matching results include the number of successfully matched soil data points, ID, data type and suggested measures.
[0038] The beneficial effects of the present invention are:
[0039] 1. The present invention first makes spatial matching more flexible by creating a buffer zone, which can accurately capture spatial proximity relationships and solve the challenges brought about by land use changes and differences in sampling point locations; secondly, the spatial connection operation greatly improves the accuracy and efficiency of data matching, and realizes the rapid matching of soil SOC data points in different periods. Furthermore, screening out unmatched data ensures data quality, reduces data noise, and improves the accuracy of data analysis. Finally, the data grouping and aggregation operation simplifies the data analysis process, making the results more intuitive and easy to understand, and able to quickly extract valuable information from large amounts of data. Therefore, the present invention achieves the technical effects of flexible matching, accurate and efficient matching, high data quality and simplified analysis in layer matching technology through innovative operations, providing strong support for research and decision-making in related fields.
[0040] 2. The present invention can process multiple geographic data files in batches, thereby improving work efficiency and consistency of data processing. At the same time, the technical solution can also process geographic data files in different formats, such as Shapefile, GeoJSON, etc., making the technical solution more widely applicable and flexible.
[0041] 3. The present invention makes full use of the programmability and modular design of R language, so that the present invention can flexibly cope with various complex data matching and analysis tasks. Through custom functions and scripts, the present invention can quickly adapt to different data formats and requirements, improving the versatility and applicability of the technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A structural schematic diagram of the layer point matching system provided by the present invention;
[0043] Figure 2 A schematic diagram of the structure of the buffer zone creation module provided by the present invention;
[0044] Figure 3 A structural schematic diagram of a layer merging and matching module provided by the present invention;
[0045] Figure 4 A structural schematic diagram of a data analysis module provided by the present invention;
[0046] Figure 5 A schematic diagram of the structure of the result output module provided by the present invention;
[0047] Figure 6 A technical roadmap of the layer point matching system provided by the present invention;
[0048] Figure 7 A schematic diagram of a flow chart of the layer point matching method provided by the present invention. DETAILED DESCRIPTION
[0049] The present application is further described in detail below in conjunction with the accompanying drawings. It is necessary to point out here that the following specific implementation methods are only used to further illustrate the present application and cannot be understood as limiting the scope of protection of the present application. Technical personnel in this field can make some non-essential improvements and adjustments to the present application based on the above application content.
[0050] Example 1 Technical background:
[0052] Now we need to obtain the background value of forest soil SOC content in different climate zones in China in 1990. Since the survey points in 1990 are not completely consistent with the survey points in 2015 with known data, we need to establish a point matching relationship between the survey points in the two periods. Due to the large sample size and wide spatial distribution, batch matching of spatial points is required. Therefore, it is necessary to design an efficient layer point matching method to save manpower and material resources required for batch processing of point data; and the R language used in this application is widely used in data analysis, statistical modeling, and data visualization, and is open source with rich packages for users to use in different fields.
[0053] like Figure 1-6 As shown, this embodiment proposes a SOC layer point matching system based on R language, and the system includes:
[0054] An environment configuration module is used to pre-configure a software platform for performing layer point matching; the software platform includes an R language platform;
[0055] A data loading module is used to load soil organic carbon data layers of target soil monitoring points at different periods to form a file to be processed; the data layers include soil data points of at least two periods;
[0056] The data processing module is used to read and process the soil organic carbon data layer in the to-be-processed file, so as to integrate the soil organic carbon data layer of at least one period into a shapefile file, and is also used to customize functions under the software platform to perform operations such as creating buffers, spatial connections, filtering unmatched data, and data grouping and aggregation;
[0057] A buffer creation module, used to establish a buffer using soil data points of a first period, wherein the buffer is used to determine a spatial range that may match soil data points of a second period;
[0058] The layer merging and matching module is used to spatially connect the soil data points of the second period with the buffer zone established by the soil data points of the first period to achieve layer merging, and determine the successfully matched soil data points based on the spatial relationship;
[0059] The data analysis module screens, aggregates and merges the successfully matched soil data points to obtain the matching results;
[0060] The result output module outputs the matching results in the form of visualization or text files. The matching results include the number, ID and data type of the successfully matched soil data points;
[0061] The batch processing module is used to perform batch processing of layer point matching on soil organic carbon data layers of multiple target soil monitoring points at different periods.
[0062] Further preferably, the buffer creation module includes:
[0063] A buffer setting unit, used to formulate a partitioning strategy;
[0064] A buffer generation unit, used for generating a buffer according to a partitioning strategy;
[0065] The division strategy includes: taking the soil data point of the first period as the center point and setting the buffer radius to form a buffer zone.
[0066] Buffer radius setting: Set a reasonable buffer radius according to actual application requirements. For example, in soil SOC data point matching, the buffer radius can be determined based on the distribution density of soil sampling points and the degree of land use change.
[0067] Buffer generation: Use spatial data processing tools such as the “sf” package of R language to generate a buffer of a specified radius with each data point as the center.
[0068] Further preferably, the layer merging and matching module includes:
[0069] A connection unit, used for spatially connecting the soil data points of the second period with the buffer zone established by the soil data points of the first period;
[0070] an analysis unit, configured to determine that the soil data points of the second period successfully match the soil data points of the first period when the soil data points of the second period fall into the buffer zone;
[0071] The matching output unit is used to output successfully matched soil data points.
[0072] Connection condition setting: Set the conditions for spatial connection based on spatial relationships (such as points within a buffer zone). For example, in soil SOC data point matching, data points from two periods can be spatially connected to find data points at the same or adjacent locations.
[0073] Execution of connection operation: Use the spatial connection function of R language to perform the spatial connection operation according to the set conditions to generate the connected data set.
[0074] Matching condition setting: Set the data matching conditions according to the actual application requirements. For example, in the soil SOC data point matching, you can set the time interval, data point position change range and other conditions to filter out unmatched data points.
[0075] Filtering operation execution: Use the data filtering function of the R language to filter the connected data set according to the set conditions and remove unmatched data points.
[0076] Further preferably, the data analysis module includes:
[0077] A screening unit, used to screen data points that meet preset conditions from the successfully matched soil data points, wherein the preset conditions include the variation range of the data points, the stability of the data points or the abnormal values of the data points;
[0078] An aggregation unit, used to group and aggregate the screened soil data points according to a set rule, wherein the preset rule includes aggregation based on the number of successful matches of the data point, the data point ID, and the data point type;
[0079] The integration unit is used to merge the matching times, data point IDs and data point types of data points after grouping and aggregation in different periods into a target data set, and output the target data set as a matching result.
[0080] Further preferably, the result output module includes:
[0081] An interactive visualization unit, used to generate a visualization atlas of the matching results, so that users can view and analyze the matching results;
[0082] The report generation unit is used to generate a visual report based on the matching results and user requirements. The visual report includes the number, ID, data type and recommended measures of the successfully matched soil data points.
[0083] It is understandable that in the data preparation stage, the matching system first cleans and converts the input data to ensure the integrity and accuracy of the data. Then, the system uses the technical means of creating a buffer zone to generate a buffer zone with a specified radius centered on each data point, providing a basis for the spatial connection operation. In the spatial connection stage, the system connects the data points of different layers according to the set spatial relationship conditions to generate a connected data set.
[0084] In order to further improve the accuracy of matching, the system also performs the operation of filtering unmatched data and removes unmatched data points according to the set matching conditions. Subsequently, the system groups and aggregates the data, sets the grouping conditions according to the actual application requirements, and performs aggregation calculations on the grouped data to generate an aggregated data set.
[0085] Finally, the system outputs the processed data set in the form of a visual chart or visual report, so that users can intuitively understand the results of data matching and analysis. Through this series of carefully designed operation steps, the layer point matching system of the present invention not only improves the accuracy and efficiency of matching, but also provides more powerful data support for research and decision-making in related fields.
[0086] like Figure 7 As shown, this embodiment also proposes a SOC layer point matching method based on R language, which is implemented based on the above-mentioned layer point matching system and includes the following steps:
[0087] S1. Pre-configure a software platform for performing layer point matching through an environment configuration module; the software platform is an R language platform, and pre-customize functions under the R language platform to perform operations such as creating a buffer, spatial connection, filtering unmatched data, and data grouping and aggregation;
[0088] S2, using a data loading module to load soil organic carbon data layers of target soil monitoring points at different periods to form a to-be-processed file, and reading and processing the soil organic carbon data layers in the to-be-processed file through data processing, integrating the soil organic carbon data layers of at least two periods into a file in shapefile format;
[0089] S3, using the buffer zone creation module to take the soil data point of the first period as the center point, set the buffer radius, and generate a buffer zone;
[0090] S4, spatially connecting the soil data points of the second period with the generated buffer zone through a layer merging and matching module, and determining the successfully matched soil data points according to the spatial relationship;
[0091] S5, performing screening, aggregation and merging operations on the successfully matched soil data points through the data analysis module;
[0092] S6. The processed matching results are output in the form of a visual chart or a visual report through a result output module. The matching results include the number of successfully matched soil data points, ID, data type and recommended measures.
[0093] According to the above-mentioned embodiment of the present invention, when the technical solution is implemented, firstly, by creating a buffer zone, the spatial matching is made more flexible, and the spatial proximity relationship can be accurately captured, solving the challenges brought by land use changes and differences in the locations of sampling points; secondly, the spatial connection operation greatly improves the accuracy and efficiency of data matching, and realizes the rapid matching of soil SOC data points in different periods. Furthermore, filtering out unmatched data ensures data quality, reduces data noise, and improves the accuracy of data analysis. Finally, the data grouping and aggregation operation simplifies the data analysis process, making the results more intuitive and easy to understand, and can quickly extract valuable information from large amounts of data. Therefore, the present invention achieves the technical effects of flexible matching, accurate and efficient matching, high data quality and simplified analysis in layer matching technology through innovative operations, providing strong support for research and decision-making in related fields.
[0094] As an example, an implementation case is set up, and the case is combined with the R language software platform to further elaborate on the layer point matching technology in the above embodiment of the present invention.
[0095] Case: In order to explore the disturbance of soil SOC in forest areas by comparing the changes in forest soil SOC content in seven different climate zones, namely, mid-temperate arid area, plateau temperate semi-arid area, mid-temperate semi-arid area, mid-temperate semi-humid area, warm temperate semi-humid area, northern subtropical humid area, and marginal tropical humid area, it is assumed that there are 10 soil data points in each target area in 1990 and 20 soil data points in 2015. And according to the topography and area of the target forest area, a reasonable buffer zone radius of 5km is calculated. The program code and analysis are as follows.
[0096] Step 1: Load the basic database, build the land processing function and feature matching function
[0097] In this step, we first loaded the "sf" package in R language, which is equipped with a wealth of geospatial data processing functions and methods, and defined a custom function process_shapefile. This custom function belongs to the matching function, which will help us perform point matching processing of soil SOC.
[0098] When defining the function, four parameters are arranged, namely soil90_file, soil15_file, search_radius, and output_file. These parameters will store relevant special data points, buffer radius and other data. The code is as follows:
[0099] library(sf)
[0100] process_shapefile<-function(soil90_file,soil15_file,search_radius,output_file){
[0101] Step 2: Create SOC data storage space and read soil SOC data
[0102] In this step, researchers need to count the SOC special data points of each region in 2015 as a shapefile file and store it in the variable soil15. Secondly, the SOC soil census points in 1990 need to be counted as shapefile files and stored in the variable soil90. This step aims to integrate soil data and digitize soil sampling information to facilitate the next step of processing. When the sampling data is in other file formats, users can also use other parameters or similar information reading functions. The code is as follows:
[0103] soil15<-st_read(soil15_file)
[0104] soil90<-st_read(soil90_file)
[0105] Step 3: Create buffers for the 2015 soil data points
[0106] This step uses the st_buffer function. The st_buffer function establishes a buffer zone with the 2015 soil SOC data as the center. When the 1990 soil data sampling point falls into it, it can be considered that the two sampling points can be considered as the same sampling point. This step sets the buffer radius to 5km and stores it in the variable search_radius to generate a spatial region. This spatial region with a radius of 5km is the appropriate buffer range calculated based on the specific data of the measurement site.
[0107] It should be noted that the 5km buffer radius in this step is a relatively appropriate range calculated after comprehensively considering the topography and geomorphology of different sampling point areas and taking the sampling point data into account. In the practice of this technology, different projects should have corresponding buffer radii.
[0108] The code for this step is as follows:
[0109] buffered_soil15<-st_buffer(soil15,dist=search_radius)
[0110] Step 4: Establish spatial connection between soil SOC data points in 1990 and 2015.
[0111] When spatially connecting the soil SOC data points, we used the inclusion relationship connection, that is, we established a buffer zone with the soil data points in 2015 as the center, and tried to make the data in 1990 fall into the buffer zone. If there is only one successful matching point, it can be directly connected; if there are multiple points, they need to be counted by type.
[0112] This step uses the st_join function to connect the data points of the two years, where st_within means that the function matches the points within the buffer. If the point in 1990 falls within the buffer with a radius of 5km centered on the soil data point in 2015, then the point will be connected to the point in the center of the buffer. The code is as follows:
[0113] joined<-st_join(soil90,buffered_soil15,join=st_within,left=TRUE)
[0114] Step 5: Filter soil SOC matching results.
[0115] In this step, the complete.cases function is used to filter out the data points in 1990 that have not been successfully matched, and retain those that have successfully matched the soil data points in 2015. After this step, the preliminary filtering of the data is achieved. The code is as follows:
[0116] filtered_joined<-joined[complete.cases(joined$OBJECTID.y),]
[0117] Step 6: Determine the matching conditions of soil SOC.
[0118] This step is the conditional judgment part for matching soil data points. If a soil data point in 2015 does not fall into any soil data point in 1990 in the buffer, there is no matching result. At this time, the function will output "No matching point found" and return NULL.
[0119] If there is a soil SOC data point in 1990 that falls into the buffer, that is, there is a matching result, then the function will convert the matching result after spatial connection into the data frame joined_subset_df before continuing processing. The code is as follows:
[0120] if(nrow(filtered_joined)==0){
[0121] cat("No matching points found.\n")
[0122] return(NULL)
[0123] }else{
[0124] joined_subset_df<-as.data.frame(filtered_joined)
[0125] Step 7: Statistics of matching results of soil SOC data.
[0126] After successfully matching the soil data information, the results need to be counted. This step uses the table function to calculate the number of times the 2015 soil SOC data points with matching results are matched, and uses the aggregate function to group and aggregate the 1990 soil SOC data point IDs that fall into the same soil data point buffer. After the aggregation is completed, the aggregate function is used again to aggregate the types of the corresponding 1990 soil data points. The code is as follows:
[0127] match_count<-as.data.frame(table(joined_subset_df$OBJECTID.x))
[0128] match_ids<-aggregate(joined_subset_df$OBJECTID.y,by=
[0129] list(joined_subset_df$OBJECTID.x),FUN=function(x)paste(unique(x),collapse=","))
[0130] match_types<-aggregate(joined_subset_df$RASTERVALU.y,by=
[0131] list(joined_subset_df$OBJECTID.x),FUN=function(x)paste(unique(x),collapse=","))
[0132] Step 8: Merge soil data point matching results.
[0133] This step uses the merge function to merge the number of successful matches of the 2015 soil SOC data points and the ID and type of the matched 1990 soil SOC data points into a table.
[0134] The column names of this table represent: the successfully matched soil SOC data point ID of 2015, the number of successfully matched soil SOC data points of 2015, the matched soil SOC data point ID of 1990, and the type of matched soil SOC data point of 1990. The code is as follows:
[0135] match_count<-merge(match_count,match_ids,by.x="Var1",by.y="Group.1",all.x=TRUE)
[0136] match_count<-merge(match_count,match_types,by.x="Var1",by.y="Group.1",all.x=TRUE)
[0137] colnames(match_count)<-c("OBJECTID of soil15","Number of matches","OBJECTID of matched soil90","Type of soil90")
[0138] Step 9: Export the soil matching results as
[0139] After step 8 is completed, the matching of soil SOC data points in 1990 and 2015 can be obtained. Use write.table to output the final matching result table to the specified file path output_file, and separate the results with tabs. This step is also the end of the soil data point matching function. The code is as follows:
[0140] write.table(match_count,file=output_file,sep="\t",quote=FALSE,row.names=FALSE)
[0141] return(match_count)
[0142] }
[0143] }
[0144] Step 10: Apply the soil SOC data point matching function in the actual R language environment
[0145] When the main function needs to call a custom function, our code is as follows.
[0146] Among them, soil90_files is the shapefile file location of the soil SOC data of different forest areas in the country in 1990, and soil15_files is the shapefile file location of the soil SOC data survey points obtained again in 2015 in different forest areas in the country. search_radius is the buffer radius we will create, centered on the 2015 soil data point. output_files is the file save path of the matching results generated after the soil SOC data point matching procedure in 1990 and 2015. The code is as follows:
[0147] soil90_files<-"soil90 storage location"
[0148] soil15_files<-"soil15 storage location"
[0149] search_radius<-buffer radius
[0150] output_files<-"save location"
[0151] Step 11: Batch matching of soil data points
[0152] In order to realize batch processing of soil SOC data, this technology chooses to use the mapply function. After using mapply, the number of soil SOC data points, buffer radius and output function can be transferred to the process_shapefile function in batches, so that the point matching function can realize batch processing operations. That is, the forest soil survey point data of different climate zones can be processed simultaneously. In the function of this step, SIMPLIFY = FALSE is intended to ensure that the results returned are in list format. The code is as follows:
[0153] results<-mapply(process_shapefile,soil15_files,soil90_files,search_radius,output_files,SIMPLIFY=FALSE)
[0154] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0155] In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0156] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A SOC layer point matching system based on R language, characterized in that: The system comprises: A data loading module is used to load soil organic carbon data layers of target soil survey points at different periods to form a file to be processed; the data layers include soil data points of at least two different periods; A buffer creation module, used to establish a buffer using soil data points of a first period, wherein the buffer is used to determine a spatial range that may match soil data points of a second period; The layer merging and matching module is used to spatially connect the soil data points of the second period with the buffer zone established by the soil data points of the first period to achieve layer merging, and determine the successfully matched soil data points based on the spatial relationship; The data analysis module screens, aggregates and merges the successfully matched soil data points to obtain the matching results; The result output module outputs the matching results in the form of visualization or text files, and the matching results include the number, ID and data type of the successfully matched soil data points.
2. According to the R language-based SOC layer point matching system of claim 1, it is characterized in that: The system also includes an environment configuration module and a data processing module; The environment configuration module is used to pre-configure a software platform for executing layer point matching; the software platform includes an R language platform; The data processing module is used to read and process the soil organic carbon data layer in the file to be processed, so as to integrate the soil organic carbon data layer of at least two periods into a shapefile file, and is also used to customize functions under the software platform to execute operations such as creating buffers, spatial connections, filtering unmatched data, and data grouping and aggregation.
3. According to the R language-based SOC layer point matching system of claim 1, it is characterized in that: The buffer zone creation module comprises: A buffer setting unit, used to formulate a partitioning strategy; A buffer generating unit, used for generating a buffer according to the partitioning strategy; The division strategy includes: taking the forest soil data point of the first period as the center point and setting a buffer radius to form a buffer zone.
4. The SOC layer point matching system based on R language according to claim 3 is characterized by: The layer merging and matching module includes: A connection unit, used for spatially connecting the soil data points of the second period with the buffer zone established by the soil data points of the first period; an analysis unit, configured to determine that the soil data points of the second period successfully match the soil data points of the first period when the soil data points of the second period fall into the buffer zone; The matching output unit is used to output successfully matched soil data points.
5. The SOC layer point matching system based on R language according to claim 4 is characterized in that: The data analysis module includes: A screening unit, used to screen data points that meet preset conditions from the successfully matched soil data points, wherein the preset conditions include a variation range of the data points, a stability of the data points, or an abnormal value of the data points; An aggregation unit, used to group and aggregate the screened soil data points according to a preset rule, wherein the preset rule includes aggregation based on the number of successful matches of the data point, the data point ID and the data point type; The integration unit is used to merge the matching times, data point IDs and data point types of data points after grouping and aggregation in different periods into a target data set, and output the target data set as a matching result.
6. The SOC layer point matching system based on R language according to claim 1, characterized in that: The result output module includes: An interactive visualization unit, used to generate a visualization atlas of the matching results, so that users can view and analyze the matching results; The report generation unit is used to generate a visual report according to the matching results and user needs, wherein the visual report includes the number, ID, data type and recommended measures of the successfully matched soil data points.
7. The SOC layer point matching system based on R language according to claim 1, characterized in that: The system also includes a batch processing module, which is used to perform batch processing of layer point matching on soil organic carbon data layers of multiple target soil monitoring points at different periods.
8. A SOC layer point matching method based on R language, characterized in that: The method is implemented based on the layer point matching system according to any one of claims 1 to 7, and the method comprises the following steps: S1. Pre-configuring a software platform for performing layer point matching through the environment configuration module; the software platform is an R language platform, and pre-customizing functions under the R language platform for performing operations such as creating a buffer, spatial connection, filtering unmatched data, and data grouping and aggregation; S2, using the data loading module to load the soil organic carbon data layers of the target soil monitoring point at different periods to form a file to be processed, and reading and processing the soil organic carbon data layers in the file to be processed through the data processing, and integrating the soil organic carbon data layers of at least two periods into a file in shapefile format; S3, using the buffer zone creation module to set a buffer zone radius with the soil data point of the first period as the center point, and generate a buffer zone; S4, spatially connecting the soil data points of the second period with the generated buffer zone through the layer merging and matching module, and determining the successfully matched soil data points according to the spatial relationship; S5, performing screening, aggregation and merging operations on the successfully matched soil data points through the data analysis module; S6. Outputting the processed matching results in the form of a visual chart or a visual report through the result output module, wherein the matching results include the number of successfully matched soil data points, ID, data type and suggested measures.