makeXmGrid: Make a grid of X x X meters

View source: R/makeXmGrid.R

makeXmGridR Documentation

Make a grid of X x X meters

Description

Makes a grid across a field of a specified size. If the grid option was selected observations will be aggregated onto the centroids of 10m grid cells generated from the bounding box of the field boundary. If the field boundary is from the database, the centroid locations will be consistent for aggregted data across years. If the user imported a field boundary, these points may not be consistent across years unless the user uses the same field boundary each year. Again, it is strongly encouraged that the user updates the database with the field boundary they have imported, to assure the centroid location remains constant year to year. To create the aggregation table, a 10m grid is applied to the field using the bounding box of the field boundary. The locations of the center of the grid cells are extracted, as well as the grid ID. These create the basis of the aggregation table. If the observed option was selected, a grid is still made to identify the grid cells, however data is not aggregated to the grid cell centroid locations. The dot indicates that this function would be private if not for documentations sake.

Usage

makeXmGrid(db, boundary_import, fieldname, size = 10, farmername)

Arguments

db

Connection to an OFPE formatted database.

boundary_import

Whether the user uploaded their own field boundary or are using a boundary stored in the database.

fieldname

Name of the field for aggregation.

size

Size of grid to make (meters), default = 10.

farmername

Name of farmer that owns the field.

Value

None.


paulhegedus/OFPE documentation built on Nov. 23, 2022, 5:09 a.m.