Skip to contents

fifo 1.1.4

Bug fixes

  • Cross-cutting (internal_functions.R)
    • as.integer(st_intersects()): Errors if any point matches more than one polygon. It is used in extract_ae_zone, extract_aagis_regions, extract_area and extract_daas_soil_order. It is replaced by .first_hit().
  • .create_sf(), sf branch:
    • if (!st_is(...)) fails for any {sf} object with more than one point.
    • all(st_intersects(sparse = FALSE)) rejects valid points whenever the AEZ has more than one polygon.
    • Objects with no location column broke the callers.
    • A point could be accepted as a list but rejected as sf, because the sf path checked it against the AEZ polygons while the list path used a bounding box. Both now use the bounding box.
  • locations = NULL / lonlat = NULL: Every extract_*() passes these NULL defaults, which overrode the real defaults, so data.frame input failed. .df_to_list() now falls back to 1 and 2:3.
  • .validate_lonlat(): Unnamed vectors and NA coordinates slipped through or gave cryptic errors. Duplicate location names are also rejected now, since they corrupt merges downstream.
  • Performance: aez.gpkg was read from disk on every call. It is now cached for the session.
  • extract_area: inherits(spatial, "spatVector") never matched, because the class is SpatVector. It also had no validation of area.
  • extract_daas_soil_order: SOIL != "Nodata" \| SOIL != "Lake" is always TRUE, so nothing was filtered. It is now !SOIL %in% c(...).
  • extract_aagis_regions:
    • Transformed the regions to a hard-coded EPSG:4326, which errors if the AEZ CRS differs.
    • It also returned a plain data.frame, not a data.table.
  • extract_smips:
    • Every collection was labelled smips_totalbucket_mm, so a runoff request came back mislabelled.
    • Dates were parsed from the last 8 characters of layer names, and rows were aligned only by recycling.
  • extract_data_drill: gsub(".X", "", location) is an unescaped regex that also corrupts names containing an uppercase X after any character (for example MAXWELL becomes MWELL). The code that needed the cleanup is gone.
  • extract_patched_point: Mangled location names with spaces or hyphens (as.data.frame() converts Perth CBD to Perth.CBD).
    • Dropped a location from the output, without any warning, whenever its nearest station was a non-BOM one.
    • The search is now restricted to BOM stations first.
    • Used 0.01745 for π/180.
    • Used a positional [, -4L], now drops by name.
  • Docs: Several didn’t match the code.
  • end_date was documented as defaulting to today but had no default.
  • The topsoil and SMIPS coordinate columns were misnamed.
  • The @returns for patched point was wrong.
  • The AEZ and AAGIS docs claimed EPSG:4326.
  • extract_asc.R had a bare # that splits the roxygen block and drops the title and description.
  • Lint roxygen sections for mismatched brackets.

fifo 1.1.3

  • Fixes several bugs that prevented extract_ae_zone and extract_smips and extract_topsoil_thickness from working properly

fifo 1.1.2

  • Add R-Universe URL to DESCRIPTION file so it’s not hidden in the R-Universe

fifo 1.1.1

Bug fixes

  • Fixes bug where extract_area() (and presumably other fns) failed due to differing crs specifications. The crs of the spatial object is now transformed to match the crs of the xy object before the spatial intersection is performed.

Minor changes

  • Removes digits preceding the soil class from TERN ASC.

  • Supersedes extract_daas_soil_order() with extract_asc() for extracting Australian Soil Classification data from TERN. The ASC data set is more accurate. The DAAS may be deprecated in future releases.

  • Improved documentation, removing redundant information.

fifo 1.1.0

  • Allows for locations of interest to be provided as a list, data.frame or {sf} object.

fifo 1.0.0

Major changes

  • Remove extract_power() as I wish for this package to support only Australian data sources, NASA is not Australian.

Minor changes

  • Update functionality to match most recent release of {read.abares}. Removes caching of ABARES data within {fifo}.

Bug fixes

  • Return an integer value for the topsoil thickness in cm rather than an NA value.

fifo 0.1.2

Minor changes

  • Returns confusion index as a new column with soil class if requested.

fifo 0.1.1

Bug fixes

  • Fixes bad link to Digital Atlas of Australian Soils reference.

fifo 0.1.0

Minor changes

  • Adds new function extract_asc() to extract Australian Soil Classification data from TERN.

Bug fixes

  • The extra documentation for xy is now included in all functions’ documentation, not just extract_ae_zone().

fifo 0.0.4

Bug fixes

  • Ensures that there are no duplicated rows in the PatchedPoint weather data.

fifo 0.0.3

Minor changes

fifo 0.0.2

Minor changes

  • Better README install instructions.

  • Depends on R >= 4.1.0 due to using native pipe.

fifo 0.0.1

Major Changes

  • Forked from {extractOz}.

  • Use xy rather than x as the principal function argument providing the locations of interest.

  • Accept data.frame objects directly as xy rather than forcing the use of df_to_list().

  • Remove df_to_list() as an exported function, internal use only now that autodetects if xy is a data.frame that needs conversion to a list object.

  • Add extract_smips().

  • Add extract_aagis_regions().

  • Add extract_topsoil_thickness().

  • Greatly enhanced the checks of user-input longitude and latitude values.

    • If some values are invalid, the function will now continue with the valid values and issue a warning with the invalid values and the location that they are in.

    • Where x and y are reversed, {fifo} attempts to correct the order of the coordinates and issues a warning that this was done and proceeds with the operation.