Déjà vu: point pattern analysis and point-in-polygon methods in ecological coding adventures
Abstract Point pattern analysis (PPA) is a key spatial approach in ecology, used to investigate how individual organisms or events are distributed across a landscape and what ecological processes drive these patterns. Among the different point pattern analysis types, point-in-polygon (PIP) is a fundamental spatial technique in ecology, used to examine the relationship between discrete point-based observations and broader landscape or habitat units. By overlaying point features—such as species occurrences, nests, or sampling locations—onto polygonal regions like habitat types, land use zones, or conservation areas, ecologists can investigate spatial patterns, assess species–habitat associations, and quantify ecological processes at multiple scales. This method facilitates the aggregation of ecological data and supports the integration of fine-scale biological observations with coarse-scale environmental or management variables. Point-in-polygon analysis plays a critical role in conservation planning, biodiversity monitoring, and ecological modeling, especially as spatial datasets become increasingly high-resolution and accessible. This paper disentangles the fundamental mathematical principles behind point-in-polygon analysis, with emphasis on the most widely used algorithms, namely Ray Casting and the Sunday’s methods. To bridge computational geometry and applied spatial ecology, I introduce the package, a lightweight R implementation that operates directly on coordinate matrices and provides transparent, reproducible point-in-polygon testing. Both theoretical derivations and ecology-based simulation examples are presented in R, a widely used open-source software environment among ecologists.
Authors
- Duccio Rocchini
Institutions
- University of Bologna (IT)
Publication Details
- Journal
- Environmental and Ecological Statistics
- Published
- 2026-07-30
- DOI
- https://doi.org/10.1007/s10651-026-00750-5
- Primary Topic
- Wildlife-Road Interactions and Conservation
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- European Commission
- HORIZON EUROPE Framework Programme