Skip to contents

Extracts the Australian Agricultural and Grazing Industries Survey (AAGIS) zones and regions. These regions represent the finest level of geographical aggregation for which the ABARES farm survey is designed to produce reliable estimates.

Usage

extract_aagis_regions(xy, locations = NULL, lonlat = NULL)

Arguments

xy

A list or data.frame object with names containing pairings of longitude and latitude values expressed as decimal degree values in that order. A data.frame may also be an sf points object. See Details for more.

locations

The column in which the location names are located as an Integer value. Defaults to 1.

lonlat

A vector of integer values indicating the column index in which the longitude and latitude values are contained. Defaults to 2:3.

Value

A data.table::data.table() with the provided GPS coordinates and the respective region(s)' name(s) and zone(s).

Note

The coordinate reference system for the AAGIS regions is internally converted to EPSG:4326 (WGS 84) for spatial intersection and ease of combining the returned values with other values from fifo.

xy

xy as a List Object

If xy is a list object, each individual vector's items should be named “x” (longitude) and “y” (latitude), respectively. The list item names should be descriptive of the individual vectors and will be included in a “location” column of the output.

xy as a Data Frame Object

If xy is a data.frame, it should be a three column object with the first column being the location name, the second longitude and the third, latitude both as decimal degrees in numeric format.

xy as an sf Object

If xy is an sf object, it should only be point geometry. If the data are projected, they will be reprojected to "EPSG:4326", Geographic Coordinate System WGS 84 before the extraction.

Examples

locs <- list(
  "Merredin" = c(x = 118.28, y = -31.48),
  "Corrigin" = c(x = 117.87, y = -32.33),
  "Tamworth" = c(x = 150.84, y = -31.07)
)

extract_aagis_regions(xy = locs)
#>   location      x      y                               name        zone
#> 1 Corrigin 117.87 -32.33 WA Central and Southern Wheat Belt Wheat Sheep
#> 2 Merredin 118.28 -31.48 WA Northern and Eastern Wheat Belt Wheat Sheep
#> 3 Tamworth 150.84 -31.07   NSW North West Slopes and Plains Wheat Sheep