Precision Agriculture

RecreatePassLines

Note this tool is part of a WhiteboxTools extension toolset. Please contact Whitebox Geospatial Inc. for information about purchasing a license activation key (https://www.whiteboxgeo.com).

This tool can be used to approximate the combine harvester swath pass lines from yield points. It is sometimes the case that either pass-line information is not stored in the point data created during harvesting, or that this information is lost. The YieldFilter and YieldMap tools however require information about the associated swath path for each point in the dataset. This tool can therefore serve as a pre-processing operation before running either of those more advanced mapping tools. It works by examining the geometry of nearby points and associating points with line features that observe a maximum angular change in direction (--max_change_in_heading). The tool creates two output vectors, including a pass line vector (--output) and a points vector (--output_points). The points output contains a PASS_NUM field within its attribute tables that indicate the unique identifier associated with features. The line vector output contains an AVGYIELD attribute field, which provides the pass-line average of the input yield values (--yield_field_name).

See Also: YieldFilter, YieldMap

Parameters:

FlagDescription
-i, --inputName of the input points shapefile
-y, --yield_field_nameName of the attribute containing yield data
--output_linesName of the output pass lines shapefile
--output_pointsName of the output points shapefile
-m, --max_change_in_headingMax change in heading
--ignore_zerosIgnore zero-valued yield points?

Python function:

wbt.recreate_pass_lines(
    i, 
    yield_field_name, 
    output_lines, 
    output_points, 
    max_change_in_heading=25.0, 
    ignore_zeros=False, 
    callback=default_callback
)

Command-line Interface:

>> ./whitebox_tools -r=RecreatePassLines -i=yield_points.shp ^
--yield_field_name='YIELD' -o=filtered_points.shp ^
--max_change_in_heading=25.0 

Source code is unavailable due to proprietary license.

Author: Whitebox Geospatial Inc. (c)

Created: 24/05/2021

Last Modified: 18/06/2021

YieldFilter

Note this tool is part of a WhiteboxTools extension toolset. Please contact Whitebox Geospatial Inc. for information about purchasing a license activation key (https://www.whiteboxgeo.com).

This tool can be used to filter the crop yield values associated with point data derived from commerical combine harvester yield monitors. Crop yield data often suffer from high levels of noise do to the nature of how these data are collected. Commercial crop yield monitors on combine haresters are prone to erroneous data for several reasons. Where harvested rows overlap, lower than expected crop yields may be associated with the second overlapping swath because the head of the harvesting equipment is only partially filled. The edges of fields are particularly susceptible to being harvested without a full swath of crop, resulting in anomalous crop yields. The starts of new swaths are also prone to errors, because of the misalignment between the time when the monitor begins recording and the time when grain begins flowing. Sudden changes in harvester speed, either speeing up or slowing down, can also result in anomalous yield measurements.

The YieldFilter tool can smooth yield point patterns, particularly accounting for differences among adjacent swath lines. The user must specify the name of the input points shapefile (--input), the name of the yield attribute (--yield_field), the pass number attribute (--pass_field_name), the output file (--output), the swatch width (combine head length, --width), the threshold value (--z_score_threshold), and optionally, minimum and maximum yield values (--min_yield and --max_yield). If the input vector does not contain a field indicating a unique identifier associated with each swath pass for points, users may use the RecreatePassLines to estimate swath line structures within the yield points. The threshold value, measured in standardized z-scores is used by the tool to determine when a point is replaced by the mean value of nearby points in adjacent swaths. The output vector will contain the smoothed yield data in the attribute table in a field named AVGYIELD.

The following images show before and after examples of applying YieldFilter:

See Also: RecreatePassLines, YieldMap

Parameters:

FlagDescription
-i, --inputName of the input points shapefile
-y, --yield_fieldName of the attribute containing yield data
-p, --pass_fieldName of the attribute containing pass line ID
-o, --outputName of the output points shapefile
-w, --widthPass swath width (m)
-z, --z_score_thresholdZ-score threshold value (default=2.5)
--min_yieldMinimum yield value in output
--max_yieldMaximum yield value in output

Python function:

wbt.yield_filter(
    i, 
    yield_field, 
    pass_field, 
    output, 
    width=6.096, 
    z_score_threshold=2.5, 
    min_yield=0.0, 
    max_yield=99999.9, 
    callback=default_callback
)

Command-line Interface:

>> ./whitebox_tools -r=YieldFilter -i=yield_points.shp ^
--yield_field_name='YIELD' --pass_field_name='PASS_NUM' ^
-o=filtered_points.shp --width=7.0 --z_score_threshold=3.0 ^
--max_yield=55.0 

Source code is unavailable due to proprietary license.

Author: Whitebox Geospatial Inc. (c)

Created: 25/05/2021

Last Modified: 25/05/2021

YieldMap

Note this tool is part of a WhiteboxTools extension toolset. Please contact Whitebox Geospatial Inc. for information about purchasing a license activation key (https://www.whiteboxgeo.com).

This tool can be used to create a segmented-vector polygon yield map from a set of harvester points. The user must specify the name of the input points shapefile (--input), the pass number attribute (--passFieldName), the output file (--output), the swatch width (combine head length, --width), and maximum angular change in direction (--maxChangeInHeading). If the input vector does not contain a field indicating a unique identifier associated with each swath pass for points, users may use the RecreatePassLines to estimate swath line structures within the yield points.

See Also: RecreatePassLines, YieldFilter

Parameters:

FlagDescription
-i, --inputName of the input points shapefile
-p, --pass_field_nameName of the attribute containing pass line ID
-o, --outputName of the output polygon shapefile
-w, --widthPass swath width (m)
-m, --max_change_in_headingMax change in heading

Python function:

wbt.yield_map(
    i, 
    pass_field_name, 
    output, 
    width=6.096, 
    max_change_in_heading=25.0, 
    callback=default_callback
)

Command-line Interface:

>> ./whitebox_tools -r=YieldMap -i=points.shp -p='PASS_NUM' ^
-o=yield_map.shp --width=7.0 --max_change_in_heading=25.0 

Source code is unavailable due to proprietary license.

Author: Whitebox Geospatial Inc. (c)

Created: 25/05/2021

Last Modified: 25/05/2021

YieldNormalization

Note this tool is part of a WhiteboxTools extension toolset. Please contact Whitebox Geospatial Inc. for information about purchasing a license activation key (https://www.whiteboxgeo.com).

This tool can be used to normalize the crop yield values (--yield_field) in a coverage of vector points (--input) derived from a combine harvester for a single agricultural field. Normalization is the process of modifying the numerical range of a set of values. Normalizing crop yield values is a common pre-processing procedure prior to analyzing crop data in either a statistical model or machine learning based analysis. The tool re-scales the crop yield values to a 0.0-1.0 range based on the minimum and maximum values, storing the rescaled yield data in an attribute field (named NORM_YIELD)) in the output vector file (--output). The user may also specify custom minimum and maximum yield values (--min_yield and --max_yield); any crop yield values less than this minimum or larger than the specified maximum will be assigned the boundary values, and will subsequently define the 0.0-1.0 range.

The user may also optionally choose to standardize (--standardize), rather than normalize the data. See here for a detailed description of the difference between these two data re-scaling methods. With this option, the output yield values (stored in the STD_YIELD field of the output vector attribute table) will be z-scores, based on differences from the mean and scaled by the standard deviation.

Lastly, the user may optionally specify a search radius (--radius), in meters. Without this optional parameter, the normalization of the data will be based on field-scale values (min/max, or mean/std. dev.). However, when a radius value larger than zero is specified, the tool will perform a regional analysis based on the points contained within a local neighbourhood. The radius value should be large enough to ensure that at least three point measurements are contain within the neighbourhood surrounding each point. Warnings will be issued for points for which this condition is not met, and their output values will be set to -99.0. When this warning occurs frequently, you should consider choosing a larger search radius. The following images demonstrate the difference between field-scale and localized normalization of a sample yield data set.

Like many other tools in the Precision Agriculture toolbox, this tool will work with input vector points files in geographic coordinates (i.e. lat/long), although it is preferable to use a projected coordinate system.

See Also: YieldMap, YieldFilter, RecreatePassLines, YieldFilter

Parameters:

FlagDescription
-i, --inputName of the input points shapefile
-y, --yield_fieldName of the attribute containing yield data
-o, --outputName of the output points shapefile
--standardizeShould the yield values be standardized (converted to z-scores) rather than normalized?
--radiusOptional search radius, in metres. Only specify this value if you want to calculate locally normalized yield
--min_yieldMinimum yield value in output
--max_yieldMaximum yield value in output

Python function:

wbt.yield_normalization(
    i, 
    yield_field, 
    output, 
    standardize=False, 
    radius=None, 
    min_yield=0.0, 
    max_yield=99999.9, 
    callback=default_callback
)

Command-line Interface:

>> ./whitebox_tools -r=YieldNormalization -i=yield_points.shp ^
--yield_field='YIELD' -o=filtered_points.shp --standardize ^
--radius=12.0 --min_yield=24.0 --max_yield=55.0 

Source code is unavailable due to proprietary license.

Author: Whitebox Geospatial Inc. (c)

Created: 20/06/2021

Last Modified: 21/06/2021