Zonal Statistics and Trial Plots extraction tools

Introduction

Zonal Statistics and Trial Plot Extraction tools offer a quick and efficient way to digitize field trials and extract plot-level data for trials of different sizes and layouts. Zonal Statistics works with any type of imagery, both RGB and multispectral.

On a high level, the workflow includes following steps:

  1. Create plot boundaries or custom zones 
  2. Choose which statistics to calculate
  3. Calculate the statistics
  4. Export the statistics

Step 1. Create plot boundaries or custom zones

The first step is to create plot boundaries that will be used that will be used to outline the areas that statistics will be generated for. There are 4 different ways to create plot boundaries:

  • Trial Plot Tools provide 2 options for  generation of plot boundaries for a field trial. 
    • Generate plots offers a semi-automated way of creating boundaries by providing the dimensions and gaps between the plots and visually matching them with the map.
    • Auto-detect plots uses AI-algorithms to automatically detect the gaps between the plots when those are clearly visible.
  • Custom zones allows creating plots or zones of any size and shape that are not necessarily limited to field trials and can be used to analyze selected parts of any field.
  • Import SHP/KML can be used to import existing plots or zones from SHP or KML files. The files need to be in WGS84(EPSG:4326) coordinate system.

Generate plots

This option suits well in the scenarios where the gaps between the plots are not very clear and the automated detection may not work well. 

Click New -> Generate plots to start the workflow. A template grid with 5x5 plots will appear on the map. Next step is to align the template with the imagery. 

Drag the grid so that one of its corners matches the corner of the first plot in the imagery:

After that, it's usually easiest to first align the Rotation of the grid, then the length of the long and short side of the plot and after - the gaps between the plots.

Once the dimensions and gaps between the plots in the template match well with the background imagery, you can go ahead and adjust number of rows and columns so that the whole trial is covered with plots:

Click "Next" to proceed to the step where you can specify plot numbering.

Here you can specify which naming pattern to use, from which corner the numbering should start, in which direction the numbering should go, what character to use as a separator between row and column numbers as well as how many digits to use.

Click "Save" to finalize this plot creation step. 

Auto-detect plots

This method works best usually in cereal crops in mid to late growth stages when the gaps between the plots are clearly visible.

To auto-detect the plots, first outline approximately the trial area to exclude any other unwanted objects and click "Detect".

Depending on the size of the trial and resolution of the imagery it may take anything from a few seconds to a few minutes for detection to finish. Once ready, you will see the detected plots outlined on the map:

Custom Zones

This option allows you to manually draw the plots or the polygons of custom shape and size using the drawing tools. 

Once a few plots/zones are drawn, the copy/paste tools can be used to efficiently generate the plots for the whole field.

Import SHP/KML

If you have previously created the plot boundaries in Solvi or other software, you can import them with this option. 

The SHP or KML file needs to be in WGS84(EPSG:4326) coordinate system.

If you are importing the boundaries from the SHP-file, make sure to zip together .shp, .dbf, .shx and .prj files and choose the .zip file in order for the attributes like plot ids to follow along. If you only choose the .shp-file, only the geometries will be imported and the new plot ids will be generated automatically.

Step 2. Choose which statistics to generate

Click the Gears-button in the Zonal Statistics tool to open the settings where you can choose which statistics to generate:

Under the Included Statistics section you can choose which metrics for each data layer to calculate. Below are the available metrics:

  • 25th and 75th percentile
  • average value
  • median value
  • maximum value
  • minimum value
  • standard deviation
Next, under the Band Statistics you can choose for which individual bands you would like to calculate the metrics above. Here you can also choose if you want the units to be reflectance or raw (digital numbers) values.
In the Vegetation Indices section you can choose specific indices to calculate statistics for. The list of indices will vary depending on which bands are present in the orthomosaic and whether you have any custom indices in your account.

Finally, under in the Extra Data you can choose to generate statistics for the Plant Counts (if those were generated beforehand) and/or Height (if the dataset has an Elevation model).

Step 3. Calculate and View the Statistics

Now that you have created the plot boundaries and chosen which metrics to calculate, the statistics can be easily generated by clicking on the "Calculate Statistics"-button. The calculation may take a while depending on the number of plots and/or size of the dataset. 

Notice, that every time you make any changes to the plot boundaries or generate new plots, you will need to recalculate the statistics to account for the new changes.

Once the calculation is done, all plots will be automatically categorized in 5 equal classes depending on which metric is selected in the Displayed Statistics dropdown. 

The selected metric will also be displayed on top of each plot to easier compare the values. 

In the Zonal Statistics Settings you can choose to display the statistics values or zone identifiers, or both (or none) under the Display section. 

You can also choose to make polygons covering the plots to be transparent so it's possible to inspect the orthomosaic. The boundaries of the plots will still maintain the color classification.

Step 4. Export the results

All the metrics generated with Zonal Statistics tools can be exported in 2 formats:

  • CSV-file that can be viewed in Excel or accessed programmatically in languages like Python or R
  • SHP-file for use in GIS software like QGIS or ArcGIS

To make an export, open the Export-tab and click the arrow-button to choose the desired format. Then click Ok and the again on the large Zonal Statistics-button to download the file.