paper

GeoThinneR: An R Package for Efficient Spatial Thinning of Species Occurrences and Point Data

arXiv:2505.07867 · doi:10.32614/RJ-2026-006

Abstract

In this paper we present GeoThinneR, an R package for efficient and flexible spatial thinning of species occurrence data. Spatial thinning is a widely used preprocessing step in species distribution modeling (SDM) that can help reduce sampling bias, but existing R implementations rely on brute-force algorithms that scale poorly with large datasets. GeoThinneR implements multiple thinning approaches, including ensuring a minimum distance between points, subsampling points on a grid, and filtering based on decimal precision. To handle large datasets, it introduces two optimized algorithms based on local kd-trees and adaptive neighbor estimation, which greatly reduce memory usage and execution time. Additional functionalities such as group-wise thinning and point prioritization are included to facilitate its use in SDM workflows. We here provide performance benchmarks using both simulated and real-world data to demonstrate substantial performance improvements over existing tools.