Make experimental plots/strips inside the field boundary
Source:R/make_exp_plots.R
make_exp_plots.Rd
Make experimental plots/strips inside the field boundary, harvester ab-line, and applicator/planter ab-line.
Arguments
- input_plot_info
(data.fram or a list of two data.frames) list of plot information created by make_input_plot()
- boundary_data
(character) path of the field boundary file or boundary as an sf
- abline_data
(character or sf) path of the ab-line file or ab-line as an sf
- abline_type
(character) the type of ab-line generation. Select from "free", "lock", and "none"
Examples
n_plot_info <-
prep_plot(
input_name = "NH3",
unit_system = "imperial",
machine_width = 30,
section_num = 1,
harvester_width = 20,
headland_length = 30,
side_length = 60
)
#> Since plot width was not provided via the `plot_with` option`, it was set to a least common multiplier of the widths of the machines.
exp_data <-
make_exp_plots(
input_plot_info = n_plot_info,
boundary_data = system.file("extdata", "boundary-simple1.shp", package = "ofpetrial"),
abline_data = system.file("extdata", "ab-line-simple1.shp", package = "ofpetrial"),
abline_type = "free"
)
exp_data$exp_plots
#> [[1]]
#> Simple feature collection with 190 features and 3 fields
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: -16.70043 ymin: 39.11967 xmax: -16.6964 ymax: 39.12686
#> Geodetic CRS: WGS 84
#> First 10 features:
#> plot_id poly_line strip_id geometry
#> 1 1 1_1 1 POLYGON ((-16.6964 39.11976...
#> 2 2 1_1 1 POLYGON ((-16.6964 39.12047...
#> 3 3 1_1 1 POLYGON ((-16.6964 39.12118...
#> 4 4 1_1 1 POLYGON ((-16.6964 39.12189...
#> 5 5 1_1 1 POLYGON ((-16.6964 39.1226,...
#> 6 6 1_1 1 POLYGON ((-16.6964 39.12331...
#> 7 7 1_1 1 POLYGON ((-16.6964 39.12402...
#> 8 8 1_1 1 POLYGON ((-16.69641 39.1247...
#> 9 9 1_1 1 POLYGON ((-16.69641 39.1254...
#> 10 10 1_1 1 POLYGON ((-16.69641 39.1261...
#>