
Extract soil order from the 'Digital Atlas of Australian Soils' (DAAS) using Australian GPS coordinates
Source:R/extract_daas_soil_order.R
extract_daas_soil_order.RdThis function has been superseded by extract_asc(), which provides access
to a more accurate dataset based on the Australian Soil Classification (ASC).
Extracts the major soil order at the GPS points provided assuming that they are land-based coordinates.
Arguments
- xy
A
listordata.frameobject with names containing pairings of longitude and latitude values expressed as decimal degree values in that order. Adata.framemay also be an sf points object. See Details for more.- locations
The column in which the location names are located as an
Integervalue. Defaults to1.- lonlat
A
vectorofintegervalues indicating the column index in which the longitude and latitude values are contained. Defaults to2:3.
Value
A data.table::data.table() with the provided GPS
coordinates and the respective Digital Atlas of Australian Soils
(DAAS soil order), "Spatial Data Conversion of the Atlas of
Australian Soils to the Australian Soil Classification v01".
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_daas_soil_order(xy = locs)
#> Reading layer `soilAtlas2M_ASC_Conversion' from data source
#> `/vsizip///var/folders/r4/wwsd3hsn48j5gck6qv6npkpc0000gr/T//Rtmp3czHeP/6f804e8b-2de9-4c88-adfa-918ec327c32f.zip/SoilAtlas2M_ASC_Conversion_v01/soilAtlas2M_ASC_Conversion.shp'
#> using driver `ESRI Shapefile'
#> Simple feature collection with 22584 features and 7 fields
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: 112.8959 ymin: -43.63287 xmax: 153.6362 ymax: -10.49096
#> Geodetic CRS: GDA94
#> location x y daas_soil_order
#> 1 Corrigin 117.87 -32.33 Sodosol
#> 2 Merredin 118.28 -31.48 Sodosol
#> 3 Tamworth 150.84 -31.07 Dermosol