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
)
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"
)
#> Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE
#> Warning: There was 1 warning in `dplyr::mutate()`.
#> ℹ In argument: `experiment_plots_dissolved = list(...)`.
#> ℹ In row 1.
#> Caused by warning:
#> ! package ‘sf’ was built under R version 4.2.3
exp_data$exp_plots
#> [[1]]
#> Simple feature collection with 190 features and 3 fields
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: 353001.7 ymin: 4331433 xmax: 353363.3 ymax: 4332225
#> Projected CRS: WGS 84 / UTM zone 28N
#> First 10 features:
#> plot_id poly_line strip_id geometry
#> 1 1 1_1 1 POLYGON ((353349.3 4331437,...
#> 2 2 1_1 1 POLYGON ((353350.7 4331516,...
#> 3 3 1_1 1 POLYGON ((353352.1 4331594,...
#> 4 4 1_1 1 POLYGON ((353353.5 4331673,...
#> 5 5 1_1 1 POLYGON ((353354.9 4331752,...
#> 6 6 1_1 1 POLYGON ((353356.3 4331831,...
#> 7 7 1_1 1 POLYGON ((353357.7 4331909,...
#> 8 8 1_1 1 POLYGON ((353359.1 4331988,...
#> 9 9 1_1 1 POLYGON ((353360.5 4332067,...
#> 10 10 1_1 1 POLYGON ((353361.9 4332146,...
#>