Déjà vu: point pattern analysis and point-in-polygon methods in ecological coding adventures
摘要
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