Next Article in Journal
Diagnosis of Nutritional Deficiencies in Coffee Plants Through Automated Analysis of Digital Images Using Deep Learning in Uncontrolled Agricultural Environments
Previous Article in Journal
A Critical Review of Life Cycle Assessments of Cocoa: Environmental Impacts and Methodological Challenges for Sustainable Production
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture

School of Agricultural Engineering, University of Campinas–UNICAMP, Campinas 13083-875, SP, Brazil
*
Author to whom correspondence should be addressed.
AgriEngineering 2025, 7(12), 420; https://doi.org/10.3390/agriengineering7120420
Submission received: 15 October 2025 / Revised: 29 November 2025 / Accepted: 3 December 2025 / Published: 5 December 2025

Abstract

Segmenting agricultural fields into management zones (MZ) is a core principle of precision agriculture (PA). However, the widespread adoption of PA remains limited, partly due to operational barriers in MZ segmentation. These barriers often involve the necessity for advanced programming skills and a strong statistical background, in addition to the lack of a free, integrated and straightforward tool that executes the entire workflow. Addressing this gap required the development of the open-source QGIS plugin Precision Zones. The plugin reproducibly implements the entire MZ segmentation pipeline: (i) raster layers preprocessing; (ii) dimensionality reduction via Principal Component Analysis (PCA); (iii) multivariate clustering using K-Means ++, with integrated support for determining the optimal number of zones through the Elbow and Silhouette methods; (iv) spatial filtering of MZ to mitigate noise; and (v) assessment of MZ agronomic effectiveness using statistical metrics (i.e., within-zone variance reduction). This tool enables practical MZ segmentation for a wide range of agricultural applications, eliminating the need for programming knowledge. Despite its robust architecture, as a novel tool, it has not yet been formally characterized and presented to the scientific community. Therefore, this study describes the Precision Zones plugin, address the step-by-step user decisions and presents its validation. In a reproducible case study, the plugin produced agronomically coherent MZ and reduced within-zone variability (VR%) for most soil attributes analyzed. The study concludes that Precision Zones provides a reproducible, user-friendly workflow that bridges the gap between advanced spatial analysis and practical precision agriculture applications for growers, consultants and researchers.

1. Introduction

Due to the inherent spatio-temporal variability in agricultural areas, variable-rate interventions focus on maximizing production through the rational use of inputs, applying the required dose at the right time [1]. To enable effective site-specific management, the segmentation of the field through detailed spatial information is required. This information must precisely represent spatial variability, the behavior of key soil attributes and the productivity level of each portion of the field. Meeting these requirements necessitates the use of various techniques for soil spatial diagnosis. These methods are generally categorized into two main approaches: (i) point-sampling grids, which provide data for spatial interpolation and variable-rate application maps, and (ii) management zones (MZ), which focus on investigation and fixed-rate intervention within relatively homogeneous field portions [2]. The latter approach, in addition to enabling investigation of soil variability, offers precise guidance for various management practices, including cultivar selection, defining plant population density, and the application of plant growth regulators. The use of MZ further promotes on-farm experimentation by aligning scientific interests with producers’ needs [3]. However, the quick and clear perception that farmers have when changing the way they fertilize their crops makes soil fertility sampling and management, based on segmenting fields into management zones, one of the main drivers of this site-specific approach.
In Brazil, soil mapping for Precision Agriculture (PA) is predominantly reliant on systematic georeferenced sampling (sampling grids) [4]. Consequently, the sampling conducted by most PA practitioners employs a regular grid design. Regular grid sampling offers the key advantage of guaranteeing uniform field coverage, particularly when prior knowledge of the target attributes is unavailable [5]. However, due to the unique variability exhibited by soil attributes, research indicates that sampling densities lower than one sample per hectare are inefficient for mapping multiple attributes, especially the available levels of phosphorus (P) and potassium (K) [6,7], which are the main fertilizers applied based on soil mapping. Despite these known drawbacks, sparse grids remain the standard practice in PA, with sampling density mainly varying from three to five hectares per sample [4], likely due to the high costs inherent to sampling and laboratory analysis, particularly across large areas. Thus, reduced prediction accuracy results from these sparse sampling densities impair variable-rate application returns. Consequently, this limitation motivates the search for alternative mapping techniques.
As a more efficient alternative, the segmentation of management zones provides a strategy for subdividing fields into blocks characterized by lower within-zone variance compared to the whole field [8]. The segmentation of MZ typically employs unsupervised machine-learning techniques. This approach relies on environmental covariates derived from remote and/or proximal sensing to accurately reflect the spatial variation of the target attributes [9]. Broadly, MZ can be defined as subregions of the field that share a relatively homogeneous combination of yield-limiting factors [10]. The segmentation process relies on input data, where covariate layers often offer high resolution and low acquisition costs. This segmentation typically employs unsupervised classification techniques such as K-means [11] and Fuzzy C-means [12]. These techniques are often applied to synthetic variables obtained via Principal Component Analysis (PCA) [13]. The resulting clusters constitute the MZ, ensuring that applying a single rate of a given agricultural input within each zone maximizes resource-use efficiency [14].
The application of MZ approaches in agricultural areas effectively addresses spatial variability in crops. This approach not only provides increased effectiveness for mapping soil fertility compared to conventional techniques [8] but also allows for a substantial reduction in the required number of soil sampling points [15]. Research in maize fields demonstrates that segmenting the area into MZ increased grain yield while reducing the application of inputs such as N, P, and K [16]. In a related study, productivity zones were successfully identified in maize using only vegetation indices [9]. This MZ approach serves as a viable alternative to traditional yield maps, which are often scarce on many farms. Moreover, a different use for MZ, where covariates are grouped into macro- and micro-homogeneity zones can optimize grid sampling, particularly at low sampling densities [17].
Despite the established advantages of MZ as a valuable advancement in precision agriculture, their adoption by PA practitioners and scientists faces practical hurdles. These challenges, particularly in data processing and MZ generation, critically restrict broader access to the technique. MZ segmentation requires managing multiple data sources and resolutions, necessitating several geospatial preprocessing steps. These steps include conversion among map projections and coordinate reference systems (CRS), clipping, resampling, and pixel co-location. Subsequently, the methodological phase requires complex choices, such as variable selection, dimensionality reduction (e.g., PCA), choosing the optimal number of zones, and tuning clustering hyperparameters. This full workflow demands specialized technical expertise and significant experimentation time. Although some routines for MZ segmentation exist, including different clustering strategies and criteria for selecting the number of zones [18,19], there is substantial heterogeneity in how these procedures are operationalized and reported, with decisions often left implicit (e.g., parameter settings, standardization, handling of input data, and spatial post-processing), which limits reproducibility and comparability across studies. Moreover, the agronomic evaluation of zoning results is often conducted in a somewhat subjective manner, thereby increasing reliance on an expert’s outcomes. Furthermore, the full MZ segmentation workflow also lacks integrated routines for comparison, validation, and reproducibility (such as standardized reports, metrics, and exports) within a single software environment. This automation bottleneck represents a critical area requiring research in PA [20]. Hence, few existing PA software packages offer high-level statistical tools that integrate all these necessary steps, particularly in a user-friendly, open-access interface.
To overcome the challenges in scaling up the use of MZ, the free QGIS plugin Precision Zones was developed. The selection of QGIS [21] was due to its open-source nature with a highly active community and, together with its intuitive interface, may lead to a widespread adoption of the plugin and expand the MZ approach in precision agriculture.
Precision Zones operationalizes the full MZ segmentation workflow commonly used in scientific studies [12,13,17,22,23,24]. The plugin requires no programming skills and features a guided, intuitive interface that integrates the following routines: (i) import, harmonization (CRS, resolution, clipping), and extraction/co-location of the used variables; (ii) z-score standardization of variables and PCA; (iii) selection of the number of zones and clustering (K-means); (iv) post-processing with a modal filter; and (v) evaluation of MZ (descriptive statistics, within-zone variance reduction, and report exports). Despite numerous studies on management zone segmentation, few open-source tools integrate preprocessing, clustering, and validation within a single environment. Given the necessity of formally presenting this novel management-zone generation tool to the scientific community and other PA/QGIS users, this paper characterizes the Precision Zones plugin by describing its architecture and integrated workflow. Furthermore, the paper demonstrates the plugin’s performance and the agronomic utility of the generated management zones in a reproducible case study. Moreover, we present a straightforward metric to evaluate MZ segmentation performance based on user-defined meta attributes, namely variance reduction (VR%), and propose performance classes for it.

2. Materials and Methods

The Precision Zones plugin is an open-source tool for QGIS, developed in Python 3.10 and designed for QGIS version 3.44.11 or later. The source code is available on GitHub (https://github.com/Derleimelo/Precision-Zones-Plugin) accessed on 23 October 2025, and the plugin is available in the official QGIS repository (https://plugins.qgis.org/plugins/precision_zones/) accessed on 23 October 2025. The methodological protocol embedded within the plugin is based on the integration of routines and techniques validated in the literature for the segmentation and evaluation of management zones in precision agriculture [12,13,22,25,26,27]. The integration of routines typically scattered across different software packages into a single environment (Figure 1) allows Precision Zones to leverage specialized geospatial libraries for the full MZ segmentation workflow. However, its contribution goes beyond merely aggregating a step-by-step analysis, as it implements a reproducible protocol for management-zone delineation, with explicit parameter settings, consistency checks, and standardized outputs. This process is executed through five main steps (Figure 1), which can be summarized as follows:
(i)
Data Preprocessing and Harmonization: the routine enables the selection of a boundary (in UTM coordinates) and multiple input rasters with varying dimensions and resolutions. The plugin automatically performs clipping, reprojection, and resampling to a common resolution. Subsequently, points are generated at the centroids of the reference raster and values are extracted from all layers. Finally, a data completeness filter is applied to ensure cross-layer consistency: if a point has NoData/NA in any raster, the same point is removed from the dataset as a whole (i.e., the record is dropped for all variables), ensuring that all layers share exactly the same sampling points in subsequent steps.
(ii)
Dimensionality Reduction and Data Transformation: variables are standardized via z-score, followed by a Principal Component Analysis (PCA). The plugin reports eigenvalues, loadings, and explained (and cumulative) variance, exports the resulting Principal Components (PCs) in GeoTIFF format, and allows the user to select the number of PCs for subsequent clustering.
(iii)
Clustering Optimization: the K-means ++ clustering is performed using either the selected PCs or, alternatively, the standardized original variables (z-score). A sweep over the number of clusters (k) is executed, and an Elbow and Silhouette chart is generated to support the user in choosing the optimal number of MZ.
(iv)
Post-Processing and Smoothing: the clustering results are rasterized, ensuring the alignment of extent and grid with the reference raster. A modal filter (majority) is then applied for spatial smoothing without altering the initial pixel count.
(v)
Zoning Validation: the agronomic effectiveness of the MZ segmentation is assessed via area-weighted Variance Reduction (VR%) and Per-zone statistics (mean, variance, 95% CI, CV%, etc.), visualized in boxplots, and exported as CSV files and figures.
The plugin provides a guided, user-friendly workflow to access and integrate the required layers. To ensure data quality, the system automatically validates the Coordinate Reference System (CRS), resolution, and extent of the selected QGIS layers. Furthermore, the workflow integrates options for resampling, clipping, and z-score standardization, enabling analyses only after these harmonization steps are successfully completed. This comprehensive system of interface checks and messages reduces errors and ensures methodological reproducibility. The entire workflow operates through a guided graphical interface, which eliminates the need for programming knowledge. This design allows for both sequential and modular execution and facilitates seamless integration with external data sources.

Case Study

The characterization and evaluation of Precision Zones utilized a case study conducted in a ~107-hectare area located in the municipality of Cosmópolis, state of São Paulo, Brazil (22°41′55.16″ S, 47°10′34.15″ W) (Figure 2). The climate classification, according to the Köppen system, is Cwa (humid subtropical with hot summers), characterized by a mean annual precipitation of 1400 mm and a mean annual temperature of 20–22 °C. The area features gently undulating terrain and is characterized, predominantly, by a Latosol soil type, with a surface texture (0–20 cm) ranging from clay to clay-loam-sandy. Grain production predominates, with soybean cropped in the first season and oat or grain sorghum in the second season. Soil fertility management in both seasons is conventional, utilizing a fixed-rate application according to the grower’s standards.
The primary focus of this case study involves investigating soil variability through management zones; consequently, the analysis employs agronomically relevant soil data as the target variables. However, it is important to note that other datasets (e.g., yield and proximal sensing) can also be utilized, depending on the application, given that management zones have a broad scope and serve multiple purposes.
Dense soil sampling was implemented across the entire study area using a regular 40 × 40 m grid, which corresponds to a density of 6 sampling points per hectare (Figure 2). Each sampling point constitutes a composite sample, generated from six subsamples collected within a 5 m radius of the central point using an instrumented quad bike with an automated auger. Samples were collected at a depth of 0–20 cm, which is the recommended depth for fertilizer prescriptions in grain-producing areas [28]. The implemented high sampling density provided the necessary resolution to test the efficiency of the management zones in grouping the attributes of interest. The composite samples subsequently underwent chemical and physical determinations at a certified soil analysis laboratory. The study selected three soil attributes for management zone segmentation: available phosphorus (P, mg dm−3), available potassium (K, mmolc dm−3), and cation exchange capacity (CEC, mmolc dm−3). Phosphorus and potassium merit inclusion because their status dictates the most frequent fertilization replenishment in Brazilian agricultural areas. Similarly, the study incorporates Cation Exchange Capacity (CEC) due to its strong influence on overall soil fertility and its relationship with liming requirements for soil correction in Brazil. The soil sampling dataset is available at the University of Campinas Research Data Repository (ReDU) [29].
The proposed methodology captures variability in the study areas by subdividing the field into MZ segmentation, which functions analogously to blocking, thereby favoring the identification of internally homogeneous zones for the selected soil attributes. This process simultaneously reduces the field’s intrinsic variability and enables uniform management within each MZ. Furthermore, well-segmented MZ supports a sampling plan that accurately represents the attributes of interest, which, in turn, increases fertilizer use efficiency in the context of precision agriculture.
The study utilized seven covariates for MZ segmentation (Figure 3): apparent magnetic susceptibility of the soil (SMa); a digital elevation model (DEM) from the SRTM mission; soil clay and sand contents; the normalized mean of five grain yield maps; a synthetic image of the Enhanced Vegetation Index (EVI) from Sentinel-2 MSI; and a synthetic image of VH-polarization backscatter from Sentinel-1 SAR. EVI and VH data were obtained at the soybean vegetative peak of each year (2019–2024), and the per-pixel mean was subsequently computed for each index [17,30]. This set of covariates merits inclusion due to its empirical relationship with soil attributes and its established use in farm and field-scale studies focusing on precision agriculture [17,30,31,32,33,34] and on management-zone segmentation [8,22,23,25,35,36]. The SMa, clay, sand, and yield datasets originated as point samples; therefore, we generated continuous surfaces via ordinary kriging. Specific interpolation resolutions were applied to validate the resampling algorithm: 10 m for SMa and the mean yield, and 5 m for the clay and sand content. Conversely, DEM, EVI, and VH were acquired directly in raster format and required no interpolation, with a 30 m (DEM) and 10 m (EVI and VH) resolution. The entire set of covariates was obtainable through open-source plugins (Smart-Map, EasyDEM, RAVI, and AGLgis) available in QGIS.
To specifically demonstrate the plugin’s ability to handle heterogeneity across layers (Figure 3), the study deliberately utilized raster files with differing spatial extents and Coordinate Reference Systems (CRS). Examples of this heterogeneity include the VH layer extending beyond the working boundary and the EVI with pixels clipped along surrounding field access roads. Furthermore, the data spanned different CRS, such as WGS 84 geographic (EPSG:4326) and WGS 84/UTM 23S (EPSG:32723). To promote the use of open data and code, the full dataset used in this work is available in [37].
The study initially imported the seven covariates and the field boundary (in vector format) into Precision Zones. The spatial resolution was set to 10 m, and the execute command was run. This action resampled all rasters to a standard grid, ensuring pixel co-location across layers, and simultaneously clipped the images to the boundary extent. Given the number of layers and their potential collinearity, the routine performed Principal Component Analysis (PCA) to generate linear synthetic variables (PCs) [26,27] commonly used for management zone segmentation [13,22]. To determine the optimal number of management zones, the routine utilized the Elbow [38] and Silhouette [39] indices, allowing the identification of the ideal number of zones through the curves displayed in the plugin layout [39]. Finally, the zones were generated, and both the chart and the CSV file containing the Elbow and Silhouette matrix were exported.
The final step for refining the zones involved reducing spurious noise. Because unsupervised classification (which groups pixels solely by value similarity) can produce small, spurious clusters of pixels from one zone embedded in another, the Precision Zones’ Modal Filter was applied to mitigate such noise. This filter performs a categorical majority operation on the zone raster, replacing the value of each pixel with the most frequent class in its neighborhood. For this case study, we set the radius to r = 5 pixels, corresponding to a 5 × 5 window around the central pixel.
Evaluation of the MZ efficiency in grouping soil data occurred within the Analyses tab of Precision Zones. We imported the soil sampling points as a CSV file using UTM coordinates. To assess performance in aggregating homogeneous regions of P, K, and CEC separately, the plugin calculated the area-weighted Variance Reduction (VR%) (Equation (1)), as used in [23,25], and showed the respective boxplots, allowing a visual inspection of the zoning performance. The VR% quantifies how effectively the MZ segmentation captures the meta-attribute homogeneity across the field. This combination of the VR% metric and visual assessment enables verification that the MZ not only reduces within-zone variability but also maintains clear contrasts between zones. Moreover, the plugin can export several other statistical metrics, such as the coefficient of variation (CV%) and the within-zone standard deviation of the target variables, providing further support for selecting the number of zones [24].
VR% = [1 − VT∑i = 1C(Wmz,i/WT × Vmz,i)] × 100
where:
  • C: number of MZ
  • Wmz,i: area of zone i (m2)
  • Wmz,i: area of zone i (m2)
  • WT: total field area (m2)
  • Vmz,i: variance of the data within zone i
  • VT: variance of the data over the entire area
Although VR% is a robust metric for assessing management zone performance, some issues hinder its use and interpretation. First, it is observed that different studies operationalize the VR% calculation with minor methodological variations, which reduces direct comparability across studies [18,23,25,40]. Therefore, in this study, we explicitly define and standardize the VR% formulation, including area weighting and a full description of all terms in the equation (Equation (1)), to make the calculation transparent and reproducible. In addition, VR% is typically reported only as a percentage value, without a standardized interpretation, impairing intuitive evaluation by ordinary practitioners. Thus, based on tests we have conducted on management zones implementation and aiming to simplify the interpretation of results, as well as to standardize comparisons across attributes and different covariate combinations, we propose grouping VR% values into performance classes (Table 1). This classification enables a more direct interpretation of the results, especially because VR% is still uncommon as a validation metric in this context, and it makes findings more communicable and comparable, analogous to classification schemes used for other model-validation metrics, such as the ratio of performance to interquartile range (RPIQ) [41], which is highly used and cited in the literature.

3. Results

3.1. Plugin Characterization

In the Resampling tab (Figure 4), Precision Zones displays a dependency and environment checklist to ensure workflow reproducibility, listing required components such as pandas (data cleaning and I/O), scikit-learn (K-means), and the SAGA NextGen provider (majority filter). The Recheck button (Figure 4) automatically validates the availability of these libraries/providers in the QGIS environment, flagging any missing items, while the “show instructions” option opens a step-by-step guide for installation and enabling each one. This mechanism ensures workflow reproducibility by standardizing the execution environment before subsequent analyses and reducing result variability arising from heterogeneous CPU configurations. The process requires the input of a field boundary in the vector format, which must be in a planar coordinate projection (UTM), and the raster layers of interest, which may feature differing coordinate reference systems (CRSs). After defining the target resolution (in meters), the plugin harmonizes the rasters by reprojecting each layer to the boundary’s CRS, clipping it to the study area, and aligning it to the same grid using the GDAL Clip Raster by Mask Layer function with bilinear resampling. The system then uses the first processed raster to generate points at pixel centroids; the values of the remaining layers are extracted at exactly these same points, thereby ensuring precise collocation across all variables. This procedure ensures that each new zone pixel derives from a common set of pixels encompassed by all layers [42,43].
In the PCA tab (Figure 5), the plugin applies Principal Component Analysis to the resampled raster variables following z-score standardization (mean 0 and standard deviation 1). The interface displays, for each component (PC), both the explained vari-ance (%) and cumulative variance (%), as well as the corresponding eigenvalue (λ), which allows an immediate assessment of the number of PCs necessary to capture most of the varia-bility. These values serve as the criterion for choosing the number of synthetic variables to use in the zoning stage [13,22,27]. Furthermore, the plugin supports CSV export of two PCA outputs: a summary detailing explained and cumulative variance by PC, and the loadings matrix of the original variables on each PC. This feature enables reproducibility and subsequent analysis outside QGIS environment. The plugin also provides the functionality to export the PCs as rasters, offering two formats: a separate GeoTIFF for each individual PC or a single multi-band GeoTIFF containing all PCs. This export feature provides the necessary data to visualize principal components (PCs) and support independent interpretation. Moreover, it enables the reuse of the PCs for purposes beyond zoning, e.g., as predictor variables in spatial modeling [44], which includes utilization in other software environments.
The Zones tab (Figure 6) presents two data source options for clustering: (i) PCA (selected components) or (ii) original variables. For such clustering analysis, the plugin use a well-known procedure, which combines PCA + K-Means and selects k (number of zones) using internal criteria [42,45,46]. When the “original variables” option is enabled, the PC selector is disabled, and the plugin utilizes all variables selected in the first tab, without running PCA. These variables are always standardized by z-score to prevent overestimating layers with different value scales [47], a standard routine for management zones analyses [16,45,48]. Thus, the following clustering analysis requires a defined range for the number of clusters to be tested (min k and max k). The plugin then runs K-Means alongside the Elbow [38] and Silhouette [39] methods. For each k, the plugin fits K-Means using the parameters ‘n_init = 10’, ‘random_state = 0’, and ‘max_iter = 300’. ‘n_init = 10’ performs ten independent initializations, retaining the best solution for greater robustness; ‘random_state = 0’ fixes the random seed to ensure reproducibility across machines and runs; and ‘max_iter = 300’ sets the iteration cap, stopping earlier if convergence occurs. The plugin reports inertia (sum of within-cluster squares) measured for the Elbow index, and the Silhouette index indicates zone separation (higher values being preferable). Inertia summarizes within-zone compactness and typically decreases as k increases; the Elbow criterion highlights the point at which additional clusters yield diminishing reductions in inertia. Silhouette complements this analysis by jointly considering within-zone cohesion and between-zone separation, with higher values indicating more distinct and internally consistent zones. Both indices are presented in a table and in the Elbow plus Silhouette plot, aiding in the decision of the appropriate number of candidate clusters (k) for zoning. The plot and table are exportable (PNG/CSV). The final segmentation step requires the desired number of clusters (zones) to be specified. The plugin then trains K-Means with that selected k, generating a categorical GeoTIFF (labels 1…k, type UInt16) that matches the resolution, CRS, and grid defined in the resampling step. The plugin automatically saves the file to the chosen folder and adds it to the QGIS project.
In the Mode Filter tab (Figure 7), the plugin operates independently of the previous steps, allowing the input of any raster already loaded in QGIS (including internally generated layers or external files). The applied filter is a SAGA majority (mode) filter. The Window size parameter defines the neighborhood radius in cells (e.g., 3 = 7 × 7; 5 = 11 × 11), and the plugin uses a circular neighborhood (kernel “circle”). This configuration promotes local aggregation at the data scale, smoothing small speckled patches and making MZs more cohesive [49]. In this case study, we adopted r = 5, which provided the best balance between removing small embedded clusters and preserving zone shapes and boundaries. Considering a 10 m pixel size and a circular kernel area computed as πr2, the effective neighborhood corresponds to approximately 0.78 ha (for comparison, r = 3 and r = 7 correspond to ≈0.28 ha and 1.54 ha, respectively); however, the plugin supports user-defined radii beyond these values when stronger smoothing is needed. This post-processing step is commonly applied after segmenting MZs [23] to enhance spatial coherence and facilitate variable-rate prescriptions. After processing, the output is automatically aligned to the input grid (resolution, extent, and CRS), zone IDs are preserved via overlap remapping, and the original symbology is replicated. The resulting layer is added to the project as a temporary layer, with an option to save it permanently to a user-specified folder.
The Analysis tab (Figure 8) enables the evaluation of generated zones using external data (e.g., yield, soil samples), operating independently of the main workflow (previous steps). This analysis requires a zone raster already loaded in QGIS (either internally generated or external) and a CSV containing samples, which must share the same CRS (UTM) as the raster. The interface requires the definition of the CSV columns representing X (easting), Y (northing), and the meta-attribute to be analyzed (one at a time). The plugin then executes point-to-zone mapping and computes, for each zone and meta-attribute, the mean, variance, number of samples, and area of each zone (ha). The interface also displays VR%: Higher VR% values indicate that the zoning is more effective at reducing data variability, aligning with the objective of grouping the attributes of interest within the MZ. Beyond the metrics displayed in the interface, the plugin supports exporting the results to CSV with additional statistics, including: percent area by zone, median, CV, minimum, Q1, Q3, maximum, IQR, skewness, and 95% CI (lower and upper bounds) of the meta-attribute. Furthermore, the tab provides the capability to export boxplots (PNG), which compare the overall dataset with the distribution of values for each MZ. This visualization supports the agronomic interpretation of MZ performance by clustering the attributes of interest.

3.2. Plugin Performance in the Case Study

Based on the Elbow + Silhouette graphical analysis (Figure 6), we interpreted that after four zones (k = 4), the clustering gain with more MZ would be negligible. The inertia difference (elbow plot) between k = 3 and k = 4 is approximately 3500, while the subsequent difference from k = 4 to k = 5 is substantially lower, at approximately 2300. The remaining discrepancies among subsequent k values fall below 1250. Because the elbow in the Elbow plot (Figure 6) was not highly pronounced, the analysis integrated these inertia differences with the Silhouette index. The Silhouette index value declined substantially from k = 4 onward, which further supported selecting k = 4 as the number of zones. The final MZ were generated from the three selected PCs (three components), followed by a majority filter (window r = 5) to remove speckle from isolated pixels within the extent of the original raster (Figure 9). The choice of three PCs is supported by the explained variance (Table 2): PC1 (54.85%), PC2 (15.07%), PC3 (12.99%), resulting in an 82.96% cumulative variance. This result follows Joliffe’s criterion [27]; thus, by retaining PCs that explain more than 70% of the cumulative variance, we captured most of the variability in the environmental covariates used. The loadings (Table 3) explain the variability represented by each PC: PC1 summarizes a overall soil textural gradient (sand/clay with positive loadings; yield, SMa, and EVI with negative loadings), PC2 emphasizes DEM associated with texture (DEM and texture with positive loadings), and PC3 is dominated by the VH radar signal (loading ≈ 0.93), capturing information related to surface moisture/structure [50]. The generated zones occupied 15.33%, 23.04%, 41.39%, and 20.24% of the usable area, corresponding to 13.76, 20.68, 37.16, and 18.17 ha, respectively, indicating spatial dominance of zone 3 (Table 4). Analyzing all these complex results in Precision Zones is facilitated because spatial alignment, dimensionality reduction, multivariate classification, and zone filtering are integrated into a single tool.
Regarding the efficiency of zoning for soil investigation, the results showed contrasting patterns across the three evaluated attributes. For Cation Exchange Capacity (CEC), the zones demonstrated good differentiation: MZ means ranged from 100.1 to 152.1 mmolc dm−3 (with distinct data dispersions) and variance reduction (VR%) reached 57.95% (Table 5), indicating high effectiveness of the zoning approach for this attribute. Potassium availability, in turn, showed an even stronger pattern: the mean values for each zone differed considerably (ranging from approximately 4.4 mmolc dm−3 in the zones with lower levels up to 10.7 in those with higher levels), resulting in VR% = 62.66% (Table 6). According to the proposed VR% performance classification (Table 1), both attributes were classified as “very good”, indicating high zoning effectiveness and strong discriminatory ability of the zones for CEC and K. Phosphorus, on the other hand, showed the weakest spatial characterization via management zones. The zone means were close (ranging from ≈ 42.8 to 53.6) and the VR% was only 2.9%, suggesting zoning inefficiency for grouping this attribute (Table 7), which, according to Table 1, falls into the “very poor” class and suggests that zoning was ineffective for grouping this attribute. The zones’ ability to cluster similar data is visually emphasized by the clear separation and dissimilarity among the boxplots for K and CEC, contrasting markedly with the similarity among all P groups (Figure 10).

4. Discussion

Several precision agriculture tools, including commercial software and plugins that already handle spatial data and support management decisions, are available to producers and researchers without programming expertise. However, an open-access solution that integrates the entire workflow for intuitively generating management zones, including smoothing/filtering and evaluating zone quality, remains unavailable. Precision Zones fills this gap by transforming raster data into MZ aimed at site-specific management. The intuitive interface guides the user through the complete process, from data preparation to zone validation. Precision Zones implements a logical sequence (protocol) for statistical analysis of multivariate spatial data to produce variability maps and statistical reports. The PCA/K-means-driven segmentation enables multivariate analysis of multiple layers for a wider audience, as it allows interaction with their data without requiring advanced statistical training or programming expertise. By lowering this barrier, the plugin broadens access to precision agriculture workflows across productive sectors and to other scientists in the agrarian sciences. Moreover, because many commercial platforms offer zoning primarily based on satellite imagery, the combined use of free data obtained from other QGIS plugins (e.g., RAVI for Sentinel-2 acquisition) with Precision Zones enables the generation of equivalent products at low cost while maintaining methodological transparency and reproducibility. Nevertheless, we emphasize that, although the plugin automates and guides the workflow, users still need basic GIS familiarity and the ability to critically interpret the generated outputs (e.g., PCs, clustering indices, and validation metrics). Even so, these skills can be acquired through free or short-term training, which supports the plugin’s applicability to a broad range of users, including technicians, agronomists, consultants, researchers, and, in some cases, growers.
Although Precision Zones currently allows the entire management-zone workflow to be run continuously, the tool also offers the capability to perform each step separately: zone generation, filtering, and analysis of external attributes. This flexibility enables the import of zones produced in other software or plugins lacking a filtering function, such as Smart-Map [51]. Furthermore, the plugin supports running only the analysis step to validate how effectively the zones segment homogeneous regions with respect to the attributes of interest. A current limitation is that validation is performed one attribute at a time. Future updates to the plugin will address this by implementing batch evaluation for multiple attributes, thereby optimizing analysis time. It must also be stressed that zoning performance depends heavily on the relationship between the covariates used for segmentation and the agronomic attributes of interest; when this relationship is weak, any zoning technique tends to yield limited gains. Finally, the quality and resolution of the input data, as well as the size of the majority filter radius, can influence the zones’ spatial coherence and the VR% values. Consequently, reporting these parameters is essential, and sensitivity analyses are encouraged.
The Precision Zones workflow produced coherent zones in the case study. The results captured relevant patterns in Potassium and Cation Exchange Capacity, demonstrated by high VR% values, whereas Phosphorus showed little zonal structure (low VR%). The process utilized seven environmental covariate layers that underwent Principal Component Analysis (PCA). Based on Joliffe’s selection criterion [27], three Principal Components (PCs) were chosen for zoning, capturing greater than 70% cumulative variance. Although, in this study, PC retention was guided by cumulative variance, the choice of the number of PCs can also be supported by eigenvalues, such as the Kaiser rule (λ ≥ 1) [52] when PCA is computed from the correlation matrix (standardized data). In many datasets, these diagnostics tend to converge, such that the point at which cumulative variance reaches an operational threshold (e.g., 70%) often coincides with retaining PCs with λ ≥ 1; when they do not coincide, the decision can be guided by a joint interpretation of both criteria, prioritizing the one the user considers most appropriate for their MZ segmentation needs. The Elbow plus Silhouette plot indicated ambiguity, suggesting either three or four zones for segmentation; four was consequently adopted as the evaluation number to maximize the potential gain in homogeneity. Because the inertia analysis for k clusters reflects the grouping of covariates rather than the soil attributes themselves, zoning can become inefficient if the covariate set has little relationship with the soil attributes or is highly random.
The results of this study indicate that Management Zones can be recommended for site-specific management of CEC and K, achieving high VR% values. Conversely, P offers no management advantage, given the very low VR%. Mapping P is particularly challenging due to the frequent observation of weak spatial clustering in agricultural areas [53,54], which hinders the adoption of mapping techniques [17]. In such cases, uniform-rate management of phosphate fertilizers may be more appropriate. CEC and K, however, showed a positive response to partitioning into zones, indicating that using the zones generated by the plugin would improve sampling efficiency and fertilizer prescription in the study area. Moreover, when interpreting these values based on the proposed VR% performance classes (Table 1), CEC (VR% = 57.95%) and K (VR% = 62.66%) fall into the “good” category, whereas P (VR% = 2.9%) is classified as “poor”. This categorization does not replace the quantitative analysis, but it provides an operational criterion for reading and communicating the results, reducing subjectivity in VR% interpretation and facilitating comparisons across different attributes, covariate combinations, and studies; we acknowledge, however, that these thresholds are proposed as a practical reference and may be adjusted as additional studies and edaphoclimatic conditions expand the empirical validation basis. Such classification must be implemented in the plugin in the near future. It is important to note that this good partitioning pattern relies on key preconditions: there must be a relationship between the input covariates and the target soil attributes, and the variables of interest must display spatial clustering. This spatial clustering of the meta-attributes can be assessed a priori via variogram modeling [55] or by computing Moran’s Index [56]. When these requirements are met, using Precision Zones enables efficient adoption of management zones in precision agriculture.

5. Conclusions

Digital mapping techniques in agricultural fields, organized into a workflow for generating management zones, were implemented in the Precision Zones plugin for QGIS. The plugin’s viability stems from its employment of literature-validated analysis and methods, while simultaneously offering a guided graphical interface and predefined parameters. This enables the reproducible creation and refinement of management zones without requiring programming knowledge, thereby encouraging adoption by different types of users, such as consultants, researchers and even growers.

Author Contributions

Conceptualization, D.D.M. and L.R.A.; methodology, D.D.M.; validation, D.D.M.; formal analysis, D.D.M. and L.R.A.; investigation, D.D.M., I.A.C. and L.R.A.; data curation, D.D.M. and I.A.C. writing—original draft preparation, D.D.M., I.A.C. and L.R.A.; writing—review and editing, D.D.M. and L.R.A.; supervision, L.R.A.; project administration, L.R.A. All authors have read and agreed to the published version of the manuscript.

Funding

This study was financed, in part, by the São Paulo Research Foundation (FAPESP), Brazil. Process numbers: 2024/14044-4 and 2022/03160-8. This work also received support from the National Council for Scientific and Technological Development (CNPq), Brazil (productivity fellowship no. 306867/2022-2).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets and code supporting this study are openly available. Data: Melo, D.D.; Cunha, I.A.; Amaral, L.R. [37] “Data linked to the article ‘Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture.’” Research Data Repository of Unicamp (REDU), Version: Draft. https://doi.org/10.25824/redu/69K3UG accessed on 5 October 2025. Code: Precision Zones QGIS plugin source code, GitHub: https://github.com/Derleimelo/Precision-Zones-Plugin accessed on 23 October 2025; packaged distribution in the official QGIS repository: https://plugins.qgis.org/plugins/precision_zones/ accessed on 23 October 2025.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gebbers, R.; Adamchuk, V.I. Precision Agriculture and Food Security. Science 2010, 327, 828–831. [Google Scholar] [CrossRef]
  2. Valente, D.S.M.; Pereira, G.W.; de Queiroz, D.M.; Zandonadi, R.S.; Amaral, L.R.d.; Bottega, E.L.; Costa, M.M.; de Freitas Coelho, A.L.; Grift, T. Accuracy of Various Sampling Techniques for Precision Agriculture: A Case Study in Brazil. Agriculture 2024, 14, 2198. [Google Scholar] [CrossRef]
  3. Lacoste, M.; Bellon-Maurel, V.; Piot-Lepetit, I.; Cook, S.; Tremblay, N.; Longchamps, L.; McNee, M.; Taylor, J.; Ingram, J.; Adolwa, I.; et al. Farmer-Centric On-Farm Experimentation: Digital Tools for a Scalable Transformative Pathway. Agron. Sustain. Dev. 2025, 45, 18. [Google Scholar] [CrossRef]
  4. Cherubin, M.R.; Damian, J.M.; Tavares, T.R.; Trevisan, R.G.; Colaço, A.F.; Eitelwein, M.T.; Martello, M.; Inamasu, R.Y.; Pias, O.H.d.C.; Molin, J.P. Precision Agriculture in Brazil: The Trajectory of 25 Years of Scientific Research. Agriculture 2022, 12, 1882. [Google Scholar] [CrossRef]
  5. Brus, D.J. Sampling for Digital Soil Mapping: A Tutorial Supported by R Scripts. Geoderma 2019, 338, 464–480. [Google Scholar] [CrossRef]
  6. Amaral, L.R.; Justina, D.D.D. Spatial Dependence Degree and Sampling Neighborhood Influence on Interpolation Process for Fertilizer Prescription Maps. Eng. Agrícola 2019, 39, 85–95. [Google Scholar] [CrossRef]
  7. Cherubin, M.R.; Santi, A.L.; Eitelwein, M.T.; Menegol, D.R.; Da Ros, C.O.; Pias, O.H.d.C.; Berghetti, J. Eficiência de Malhas Amostrais Utilizadas Na Caracterização Da Variabilidade Espacial de Fósforo e Potássio. Ciência Rural 2014, 44, 425–432. [Google Scholar] [CrossRef][Green Version]
  8. Gonçalves, J.d.P.; Pinto, F.d.A.d.C.; Queiroz, D.M.d.; Valente, D.S.M. Using Sentinel-1 Time Series Data for the Delineation of Management Zones. AgriEngineering 2025, 7, 150. [Google Scholar] [CrossRef]
  9. de Almeida, G.S.; Rizzo, R.; Amorim, M.T.A.; dos Santos, N.V.; Rosas, J.T.F.; Campos, L.R.; Rosin, N.A.; Zabini, A.V.; Demattê, J.A.M. Monitoring Soil–Plant Interactions and Maize Yield by Satellite Vegetation Indexes, Soil Electrical Conductivity and Management Zones. Precis. Agric. 2023, 24, 1380–1400. [Google Scholar] [CrossRef]
  10. Vrindts, E.; Mouazen, A.M.; Reyniers, M.; Maertens, K.; Maleki, M.R.; Ramon, H.; De Baerdemaeker, J. Management Zones Based on Correlation between Soil Compaction, Yield and Crop Data. Biosyst. Eng. 2005, 92, 419–428. [Google Scholar] [CrossRef]
  11. Anderberg, M.R. Cluster Analysis for Applications; Academic Press: New York, NY, USA, 1973; p. 359. [Google Scholar]
  12. Córdoba, M.A.; Bruno, C.I.; Costa, J.L.; Peralta, N.R.; Balzarini, M.G. Protocol for Multivariate Homogeneous Zone Delineation in Precision Agriculture. Biosyst. Eng. 2016, 143, 95–107. [Google Scholar] [CrossRef]
  13. Córdoba, M.; Bruno, C.; Costa, J.; Balzarini, M. Subfield Management Class Delineation Using Cluster Analysis from Spatial Principal Components of Soil Variables. Comput. Electron. Agric. 2013, 97, 6–14. [Google Scholar] [CrossRef]
  14. Nawar, S.; Corstanje, R.; Halcro, G.; Mulla, D.; Mouazen, A.M. Delineation of Soil Management Zones for Variable-Rate Fertilization: A Review. Adv. Agron. 2017, 143, 175–245. [Google Scholar] [CrossRef]
  15. Maltauro, T.C.; Guedes, L.P.C.; Uribe-Opazo, M.A.; Canton, L.E.D. Spatial Multivariate Optimization for a Sampling Redesign with a Reduced Sample Size of Soil Chemical Properties. Rev. Bras. Cienc. Solo 2023, 47. [Google Scholar] [CrossRef]
  16. Bhagwan, P.V.; Anjaiah, T.; Ravali, C.; Chary, D.S.; Zamani, A.T.; Ullah, S.; Rebouh, N.Y.; Tariq, A. Delineation and Evaluation of Management Zones for Site-Specific Nutrient Management Using a Geostatistical and Fuzzy C Mean Cluster Approach. Sci. Rep. 2025, 15, 20991. [Google Scholar] [CrossRef]
  17. Melo, D.D.; Cunha, I.A.; Amaral, L.R. Hierarchical Stratification for Spatial Sampling and Digital Mapping of Soil Attributes. AgriEngineering 2025, 7, 10. [Google Scholar] [CrossRef]
  18. Gavioli, A.; de Souza, E.G.; Bazzi, C.L.; Schenatto, K.; Betzek, N.M. Identification of Management Zones in Precision Agriculture: An Evaluation of Alternative Cluster Analysis Methods. Biosyst. Eng. 2019, 181, 86–102. [Google Scholar] [CrossRef]
  19. Hamed Javadi, S.; Guerrero, A.; Mouazen, A.M. Clustering and Smoothing Pipeline for Management Zone Delineation Using Proximal and Remote Sensing. Sensors 2022, 22, 645. [Google Scholar] [CrossRef]
  20. Kerry, R.; Escolà, A. (Eds.) Sensing Approaches for Precision Agriculture; Progress in Precision Agriculture; Springer International Publishing: Cham, Switzerland, 2021; 415p. [Google Scholar] [CrossRef]
  21. QGIS. QGIS Geographic Information System. Available online: https://qgis.org/ (accessed on 12 October 2025).
  22. Oldoni, H.; Silva Terra, V.S.; Timm, L.C.; Júnior, C.R.; Monteiro, A.B. Delineation of Management Zones in a Peach Orchard Using Multivariate and Geostatistical Analyses. Soil Tillage Res. 2019, 191, 1–10. [Google Scholar] [CrossRef]
  23. Oldoni, H.; Magalhães, P.S.G.; Oliveira, A.L.G.; Lima, J.P.; Figueiredo, G.K.D.A.; Moro, E.; Amaral, L.R. Management Zones Delineation: A Proposal to Overcome the Crop-Pasture Rotation Challenge. Precis. Agric. 2025, 26, 21. [Google Scholar] [CrossRef]
  24. Torney, L.; Weltzien, C.; Herold, M.; Vogel, S.; Voß, S. Improving Agricultural Management Zoning Involving Sentinel-2 Timeseries, Crop’s Phenology Stages and Proximal Soil Sensing Data. Discov. Agric. 2025, 3, 113. [Google Scholar] [CrossRef]
  25. Gavioli, A.; de Souza, E.G.; Bazzi, C.L.; Guedes, L.P.C.; Schenatto, K. Optimization of Management Zone Delineation by Using Spatial Principal Components. Comput. Electron. Agric. 2016, 127, 302–310. [Google Scholar] [CrossRef]
  26. Hotelling, H. Analysis of a Complex of Statistical Variables into Principal Components. J. Educ. Psychol. 1933, 24, 417–441. [Google Scholar] [CrossRef]
  27. Jolliffe, I.T. Principal Component Analysis for Special Types of Data; Springer: New York, NY, USA, 2002; pp. 338–372. [Google Scholar]
  28. Recomendações de Adubação e Calagem Para o Estado de São Paulo; Boletim Técnico 100; Cantarella, H., Quaggio, J.A., Mattos, D., Jr., Boaretto, R.M., van Raij, B., Eds.; Instituto Agronômico (IAC): Campinas, Brazil, 2022. [Google Scholar]
  29. Melo, D.D.; Amaral, L.R. Replication Data for: Hierarchical Stratification for Spatial Sampling and Digital Mapping of Soil Attributes; Repositório de Dados de Pesquisa da Unicamp (ReDaU): Campinas, SP, Brazil, 2024; p. V1. [Google Scholar] [CrossRef]
  30. Amaral, L.R.; Oldoni, H.; Baptista, G.M.M.; Ferreira, G.H.S.; Freitas, R.G.; Martins, C.L.; Cunha, I.A.; Santos, A.F. Remote Sensing Imagery to Predict Soybean Yield: A Case Study of Vegetation Indices Contribution. Precis. Agric. 2024, 25, 2375–2393. [Google Scholar] [CrossRef]
  31. Pusch, M.; Samuel-Rosa, A.; Sergio Graziano Magalhães, P.; Rios do Amaral, L. Covariates in Sample Planning Optimization for Digital Soil Fertility Mapping in Agricultural Areas. Geoderma 2023, 429, 116252. [Google Scholar] [CrossRef]
  32. Heuvelink, G.B.M.; Webster, R. Spatial Statistics and Soil Mapping: A Blossoming Partnership under Pressure. Spat. Stat. 2022, 50, 100639. [Google Scholar] [CrossRef]
  33. Silva, C.d.O.F.; Grego, C.R.; Manzione, R.L.; Oliveira, S.R.d.M. Improving Coffee Yield Interpolation in the Presence of Outliers Using Multivariate Geostatistics and Satellite Data. AgriEngineering 2024, 6, 81–94. [Google Scholar] [CrossRef]
  34. Silva, C.d.O.F.; Grego, C.R.; Manzione, R.L.; Oliveira, S.R.d.M.; Rodrigues, G.C.; Rodrigues, C.A.G. Delineation of Management Zones Dealing with Low Sampling and Outliers. Precis. Agric. 2025, 26, 19. [Google Scholar] [CrossRef]
  35. Bougiouklis, J.N.; Barouchas, P.E.; Petropoulos, P.; Tsesmelis, D.E.; Moustakas, N. Precision Soil Sampling Strategy for the Delineation of Management Zones in Olive Cultivation Using Unsupervised Machine Learning Methods. Sci. Rep. 2025, 15, 8253. [Google Scholar] [CrossRef]
  36. Shashikumar, B.N.; Kumar, S.; George, K.J.; Singh, A.K. Soil Variability Mapping and Delineation of Site-Specific Management Zones Using Fuzzy Clustering Analysis in a Mid-Himalayan Watershed, India. Environ. Dev. Sustain. 2023, 25, 8539–8559. [Google Scholar] [CrossRef]
  37. Melo, D.D.; Amaral, L.R.; Cunha, I.A. Data Linked to the Article “Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture”; Repositório de Dados de Pesquisa da Unicamp (REDU/UNICAMP): Campinas, SP, Brazil, 2025; Draft version. [Google Scholar] [CrossRef]
  38. Thorndike, R.L. Who Belongs in the Family? Psychometrika 1953, 18, 267–276. [Google Scholar] [CrossRef]
  39. Rousseeuw, P.J. Silhouettes: A Graphical Aid to the Interpretation and Validation of Cluster Analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef]
  40. Ping, J.L.; Dobermann, A. Creating Spatially Contiguous Yield Classes for Site-Specific Management. Agron. J. 2003, 95, 1121–1131. [Google Scholar] [CrossRef]
  41. Nawar, S.; Mouazen, A.M. Predictive Performance of Mobile Vis-near Infrared Spectroscopy for Key Soil Properties at Different Geographical Scales by Using Spiking and Data Mining Techniques. Catena 2017, 151, 118–129. [Google Scholar] [CrossRef]
  42. Serrano, J.; Shahidian, S.; Paixão, L.; Marques da Silva, J.; Moral, F. Management Zones in Pastures Based on Soil Apparent Electrical Conductivity and Altitude: NDVI, Soil and Biomass Sampling Validation. Agronomy 2022, 12, 778. [Google Scholar] [CrossRef]
  43. Dogar, S.S.; Brogi, C.; O’Leary, D.; Hernández-Ochoa, I.M.; Donat, M.; Vereecken, H.; Huisman, J.A. Combining Electromagnetic Induction and Satellite-Based NDVI Data for Improved Determination of Management Zones for Sustainable Crop Production. SOIL 2025, 11, 655–679. [Google Scholar] [CrossRef]
  44. John, K.; Abraham, I.I.; Kebonye, N.M.; Agyeman, P.C.; Ayito, E.O.; Kudjo, A.S. Soil Organic Carbon Prediction with Terrain Derivatives Using Geostatistics and Sequential Gaussian Simulation. J. Saudi Soc. Agric. Sci. 2021, 20, 379–389. [Google Scholar] [CrossRef]
  45. Reuter, T.; Nahrstedt, K.; Jarmer, T.; Broll, G.; Trautz, D. Delineation of Management Zones in Clover-Grass for Site-Specific Management of Subsequent Crops. Precis. Agric 2025, 26, 61. [Google Scholar] [CrossRef]
  46. Silva Costa, B.R.; Oldoni, H.; da Silva, T.M.M.; Farinassi, L.G.; Bognola, I.A.; Bassoi, L.H. How Similar Is the Zoning of Different Vegetation Indices: Defining the Optimal Framework for Monitoring Grapevines’ Growth within Vigorous Vineyards. Sci. Hortic. 2023, 322, 112404. [Google Scholar] [CrossRef]
  47. Milligan, G.W.; Cooper, M.C. A Study of Standardization of Variables in Cluster Analysis. J. Classif. 1988, 5, 181–204. [Google Scholar] [CrossRef]
  48. Oldoni, H.; Costa, B.R.S.; Bognola, I.A.; de Souza, C.R.; Bassoi, L.H. Homogeneous Zones of Vegetation Index for Characterizing Variability and Site-Specific Management in Vineyards. Sci. Agric. 2021, 78, e20190243. [Google Scholar] [CrossRef]
  49. Betzek, N.M.; Souza, E.G.d.; Bazzi, C.L.; Schenatto, K.; Gavioli, A. Rectification Methods for Optimization of Management Zones. Comput. Electron. Agric. 2018, 146, 1–11. [Google Scholar] [CrossRef]
  50. Cunha, I.A.; Baptista, G.M.M.; Prudente, V.H.R.; Melo, D.D.; Amaral, L.R. Integration of Optical and Synthetic Aperture Radar Data with Different Synthetic Aperture Radar Image Processing Techniques and Development Stages to Improve Soybean Yield Prediction. Agriculture 2024, 14, 2032. [Google Scholar] [CrossRef]
  51. Pereira, G.W.; Valente, D.S.M.; de Queiroz, D.M.; Coelho, A.L.d.F.; Costa, M.M.; Grift, T. Smart-Map: An Open-Source QGIS Plugin for Digital Mapping Using Machine Learning Techniques and Ordinary Kriging. Agronomy 2022, 12, 1350. [Google Scholar] [CrossRef]
  52. Kaiser, H.F. The Application of Electronic Computers to Factor Analysis. Educ. Psychol. Meas. 1960, 20, 141–151. [Google Scholar] [CrossRef]
  53. Bottega, E.L.; Marçal De Queiroz, D.; De Assis, F.; Pinto, C.; Cristiano, E.; Alves De Souza, M. Spatial Variability of Soil Attributes in No a No-Tillage System with Crop Rotation in the Brazilian Savannah. Rev. Ciênc. Agron. 2013, 44, 1. [Google Scholar] [CrossRef]
  54. López-Castañeda, A.; Zavala-Cruz, J.; Palma-López, D.J.; Rincón-Ramírez, J.A.; Bautista, F. Digital Mapping of Soil Profile Properties for Precision Agriculture in Developing Countries. Agronomy 2022, 12, 353. [Google Scholar] [CrossRef]
  55. Oliver, M.A.; Webster, R. A Tutorial Guide to Geostatistics: Computing and Modelling Variograms and Kriging. Catena 2014, 113, 56–69. [Google Scholar] [CrossRef]
  56. Câmara, G.; Carvalho, M.S.; Cruz, O.G.; Correa, V. Análise Espacial de Áreas. In Análise Espacial de Dados Geográficos; Druck, S., Carvalho, M.S., Câmara, G., Monteiro, A.M.V., Eds.; Embrapa: Brasília, Brazil, 2004; pp. 157–209. [Google Scholar]
Figure 1. Methodological overview of the main functions of the Precision Zones plugin.
Figure 1. Methodological overview of the main functions of the Precision Zones plugin.
Agriengineering 07 00420 g001
Figure 2. Geographic location of the study area and distribution of soil sampling points across the field, Cosmópolis, São Paulo, Brazil.
Figure 2. Geographic location of the study area and distribution of soil sampling points across the field, Cosmópolis, São Paulo, Brazil.
Agriengineering 07 00420 g002
Figure 3. Maps of the seven covariates used to segment the management zones. All generated maps utilize a distinct color ramp, spanning from minimum to maximum values for each layer, due to the unique value range inherent in each dataset.
Figure 3. Maps of the seven covariates used to segment the management zones. All generated maps utilize a distinct color ramp, spanning from minimum to maximum values for each layer, due to the unique value range inherent in each dataset.
Agriengineering 07 00420 g003
Figure 4. Precision Zones graphical user interface: first tab of the plugin (Step 1—Figure 1).
Figure 4. Precision Zones graphical user interface: first tab of the plugin (Step 1—Figure 1).
Agriengineering 07 00420 g004
Figure 5. Precision Zones graphical user interface: second tab of the plugin (Step 2—Figure 1). Principal component analysis results for variance, cumulative variance and corresponding eigenvalue, with options to export the summary as CSV and the PCs as GeoTIFF.
Figure 5. Precision Zones graphical user interface: second tab of the plugin (Step 2—Figure 1). Principal component analysis results for variance, cumulative variance and corresponding eigenvalue, with options to export the summary as CSV and the PCs as GeoTIFF.
Agriengineering 07 00420 g005
Figure 6. Precision Zones graphical user interface: third tab of the plugin (Step 3—Figure 1). Selection of PCs/variables, Elbow + Silhouette, and zone generation commands.
Figure 6. Precision Zones graphical user interface: third tab of the plugin (Step 3—Figure 1). Selection of PCs/variables, Elbow + Silhouette, and zone generation commands.
Agriengineering 07 00420 g006
Figure 7. Precision Zones graphical user interface: fourth tab of the plugin (Step 4—Figure 1). Modal filtering (noise reduction in zones).
Figure 7. Precision Zones graphical user interface: fourth tab of the plugin (Step 4—Figure 1). Modal filtering (noise reduction in zones).
Agriengineering 07 00420 g007
Figure 8. Precision Zones graphical user interface: fifth tab of the plugin (Step 5—Figure 1). Analysis and validation of zones with field samples. Variance reduction (%) (VR) highlighted in red.
Figure 8. Precision Zones graphical user interface: fifth tab of the plugin (Step 5—Figure 1). Analysis and validation of zones with field samples. Variance reduction (%) (VR) highlighted in red.
Agriengineering 07 00420 g008
Figure 9. (a) original zones generated by the Precision Zones plugin; (b) zones filtered by the modal filter.
Figure 9. (a) original zones generated by the Precision Zones plugin; (b) zones filtered by the modal filter.
Agriengineering 07 00420 g009
Figure 10. Boxplots showing soil attribute values (P, K, and CEC) for the complete set of samples (All) and after zoning the area into four subregions (zones 1 to 4, i.e., Z1 to Z4); the orange line denotes the median, and the dots indicate outliers.
Figure 10. Boxplots showing soil attribute values (P, K, and CEC) for the complete set of samples (All) and after zoning the area into four subregions (zones 1 to 4, i.e., Z1 to Z4); the orange line denotes the median, and the dots indicate outliers.
Agriengineering 07 00420 g010aAgriengineering 07 00420 g010b
Table 1. Performance classes for VR% (area-weighted within-zone variance reduction).
Table 1. Performance classes for VR% (area-weighted within-zone variance reduction).
ClassVR%Interpretation
Excellent≥70Strong within-zone homogenization (high zoning effectiveness)
Good40–70Meaningful and consistent gain
Fair10–40Modest gain
Poor<10Negligible gain (or worse)
Negative VR% values indicate that zoning increased within-zone variance, i.e., performance was worse than the unzoned baseline.
Table 2. PCA: individual and cumulative variance of the PCs.
Table 2. PCA: individual and cumulative variance of the PCs.
Principal ComponentEigenvalue (λ)Variance (%)Cumulative Variance (%)
PC13.8454.8554.85
PC21.0515.0769.92
PC30.9112.9982.91
PC40.8211.7394.64
PC50.253.5298.16
PC60.101.4699.61
PC70.030.39100.00
Table 3. PCA factor loadings by component (PC1–PC7). In bold, the most important information layers within the three PCs used for clustering.
Table 3. PCA factor loadings by component (PC1–PC7). In bold, the most important information layers within the three PCs used for clustering.
PC1PC2PC3PC4PC5PC6PC7
Sand0.450.43−0.170.140.260.04−0.71
Mean VH0.160.130.930.30−0.020.01−2.8 × 10−5
MDE−0.330.652 × 10−3−0.11−0.34−0.58−5.9 × 10−5
Clay0.440.43−0.170.140.260.040.71
average yield−0.430.36−0.100.32−0.220.72−2.8 × 10−6
SMa−0.420.190.19−0.400.760.091.76 × 10−4
Mean EVI−0.32−0.16−0.150.770.35−0.365.5 × 10−5
Table 4. Summary of management zones: number of soil samples in each zone (n), area (ha), and proportion of area (%).
Table 4. Summary of management zones: number of soil samples in each zone (n), area (ha), and proportion of area (%).
ZonesnArea (ha)Area (%)
18313.7615.33
212620.6823.04
323437.1641.39
411518.1720.24
Table 5. Performance of the zones for clustering cation exchange capacity (CEC): descriptive statistics and variance reduction in the bottom.
Table 5. Performance of the zones for clustering cation exchange capacity (CEC): descriptive statistics and variance reduction in the bottom.
ZonesMeanMedianCV%MinQ1Q3MaxSkewnessIQR95% CI Low95% CI HighVariance
Z1117.2114.016.877.0104.0127.5218.01.9423.5112.9121.5390.2
Z2100.199.021.158.089.0108.0180.01.0219.096.4103.9447.2
Z3104.7103.011.159.098.0108.0167.01.4410.0103.2106.2136.5
Z4152.1153.010.6115.0141.0163.5193.0−0.0522.5149.1155.1263.2
Total VR %57.95%
Table 6. Performance of the zones for clustering potassium (K): descriptive statistics and variance reduction in the bottom.
Table 6. Performance of the zones for clustering potassium (K): descriptive statistics and variance reduction in the bottom.
ZonesMeanMedianCV%MinQ1Q3MaxSkewnessIQR95% CI Low95% CI HighVariance
Z17.06.730.42.25.87.814.61.32.06.67.54.6
Z24.74.339.30.83.45.610.00.82.24.45.03.4
Z34.44.332.61.53.45.39.50.61.94.24.62.0
Z410.710.623.76.29.211.918.80.72.710.311.26.5
Total VR % 62.66%
Table 7. Performance of the zones for clustering phosphorus (P): descriptive statistics and variance reduction in the bottom.
Table 7. Performance of the zones for clustering phosphorus (P): descriptive statistics and variance reduction in the bottom.
ZonesMeanMedianCV%MinQ1Q3MaxSkewnessIQR95% CI Low95% CI HighVariance
Z142.839.044.415.031.552.51321.921.038.747.0363.8
Z253.648.051.913.032.070.51540.938.548.758.5775.6
Z353.647.045.213.037.065.01641.328.050.556.8590.2
Z445.741.040.517.032.056.01131.024.042.249.1344.0
Total VR % 2.9%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Melo, D.D.; Cunha, I.A.; Amaral, L.R. Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture. AgriEngineering 2025, 7, 420. https://doi.org/10.3390/agriengineering7120420

AMA Style

Melo DD, Cunha IA, Amaral LR. Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture. AgriEngineering. 2025; 7(12):420. https://doi.org/10.3390/agriengineering7120420

Chicago/Turabian Style

Melo, Derlei D., Isabella A. Cunha, and Lucas R. Amaral. 2025. "Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture" AgriEngineering 7, no. 12: 420. https://doi.org/10.3390/agriengineering7120420

APA Style

Melo, D. D., Cunha, I. A., & Amaral, L. R. (2025). Precision Zones: An Open-Source QGIS Plugin for Management-Zone Segmentation in Precision Agriculture. AgriEngineering, 7(12), 420. https://doi.org/10.3390/agriengineering7120420

Article Metrics

Back to TopTop