Dear Bruce,
I think that you are searching for function st_join(x = points, y = polygons, join = st_contains, left = TRUE) from package "sf".
HTH,
Ákos
____________
Ákos Bede-Fazekas
Centre for Ecological Research, Hungary

2024. 05. 20. 12:18 keltezéssel, roee maor írta:
Hi Bruce,

If I understand your needs correctly, I think you can get it done with the
extract() function from package {terra} by looping over all your species
and all attributes per species.

I once extracted distribution range metrics for ~2k mammal species from the
IUCN data using extract() from the **{raster}** package, which took about
3-4 days IIRC, but {terra} functions are generally faster than their
{raster} ancestors (and your code may well be more efficient than mine!).

Hope this helps,
Roi

On Mon, 20 May 2024 at 11:00, <r-sig-ecology-requ...@r-project.org> wrote:

Send R-sig-ecology mailing list submissions to
         r-sig-ecology@r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
         https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
or, via email, send a message with subject or body 'help' to
         r-sig-ecology-requ...@r-project.org

You can reach the person managing the list at
         r-sig-ecology-ow...@r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-ecology digest..."


Today's Topics:

    1. Question on R GIS packages to extract point associations
       (Bruce Miller)

----------------------------------------------------------------------

Message: 1
Date: Mon, 20 May 2024 05:12:56 -0400
From: Bruce Miller <batsnc...@gmail.com>
To: "r-sig-ecology@r-project.org" <r-sig-ecology@r-project.org>
Subject: [R-sig-eco] Question on R GIS packages to extract point
         associations
Message-ID: <fc0746ad-6579-4270-9ab4-f1917c6e4...@gmail.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi all,

Eons ago Hawthorne Beyer had Hawths Tools that used R to provide some
really useful things like split shape files such as the IUCN or Mammals
of the World into species specific files.  This has long since been
defunct >15 years.  I do not recall but I think there was also an
association module that was able to extract polygon overlay features
related to the point data.

I can accomplish what I am interested in using ESRI ArcGIS or ArcPro but
it takes a lot of time to set this up. Then run this one species at a
time using Xtools.

What I need to do is extract species associations (point data) from
multiple layers of shape file polygons that are varied ecological
attributes.
This extracts all of the attributes of the overlays for each point layer.
Examples are elevation, vegetation types, ecosystem etc. then write the
table of all associations by species.
Often I need to include proximity to water bodies like rivers, lakes and
lagoons.

Are/Is there an R package or packages that can do this w/o loading the
GIS and using the point data and ecological attribute polygons using R?

I have hundreds of species I need to do this with at varied geographic
levels, both country level and landscape level like Mesoamerica,
Caribbean etc.

Thanks to any R GIS gurus other there for a reply.

Bruce Miller




------------------------------

Subject: Digest Footer

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


------------------------------

End of R-sig-ecology Digest, Vol 194, Issue 13
**********************************************
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to