AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
39 stars 3 forks source link

Consider replacement for `ALA4R::intersect_points`? #142

Closed mjwestgate closed 8 months ago

mjwestgate commented 2 years ago

In ALA4R, the intersect_points function allowed users to specify a set of coordinates and receive the values of a user-specified set of spatial layers at those points. This is useful because the user can then rely solely on ALA for spatial data for modelling. An example workflow in galah syntax could look something like this:

galah_call() |>
  galah_coordinates()      # new function to specify where to extract points
  galah_select(cl22, el10982) |>
  atlas_layers()           # new function to get layer data

If the user then supplies these same layer fields to atlas_occurrences, they can simply rbind their presences and absences, then run a MAXENT-type model without needing to download or manipulate any spatial data.

The counter-argument to this - and the reason we haven't added it before - is that once the user has completed their model, they still need the raw spatial layers to re-project to geographic space. Ergo, it may be more efficient to acquire your own spatial data and use terra::extract or similar to get point values for both presences and absences at the same time. As the ALA doesn't support downloads of spatial layers at present, this limits the usefulness of the proposed function.

mjwestgate commented 8 months ago

On reflection, this is out of scope for galah; we provide point data, how you model it is up to you. So we won't implement this.