Skip to contents

Extract GRDC Agroecological Zones Using Australian GPS Coordinates

Usage

extract_ae_zone(x)

Arguments

x

List. An object with names containing vector pairings of longitude and latitude values expressed as decimal degree values in that order, each individual vectors' 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.

Value

A data.table::data.table with the provided GPS coordinates and the respective GRDC agroecological zone.

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_ae_zone(x = locs)
#> Key: <location>
#>    location      x      y       ae_zone
#>      <char>  <num>  <num>        <char>
#> 1: Corrigin 117.87 -32.33    WA Central
#> 2: Merredin 118.28 -31.48    WA Eastern
#> 3: Tamworth 150.84 -31.07 NSW NE/Qld SE