An R-Based Adaptive Quadtree Spatial Tiling Workflow for Boundary-Exact GBIF Species Occurrence Mining within User-Defined KML Polygons
Pradhan, P.
Show abstract
Global Biodiversity Information Facility (GBIF) occurrence retrievals for an irregularly shaped region are limited by the API spatial query capabilities - rectangular envelopes or size/vertex-limited WKT polygons - neither of which conform to protected areas, sacred groves, wetlands, panchayat or municipal boundaries or any other arbitrary KML polygon of interest queried by users. This paper presents and validates an open, self-contained, adaptive spatial-tiling protocol that (i) ingests any KML polygon of any shape, size and location on earth, breaks it into a set of GBIF API-compatible rectangular tiles, (ii) queries, cleans and clips the individual records to the target polygon, and (iii) summarises the inventory with a generic diversity-completeness-rarefaction module, with minimal manual re-parameterisation between sites. The protocol implements an iterative quadtree refinement algorithm that adapts tile number, size and location to the target polygon geometry, is combined with a fault-tolerant pagination/retry query system, a boundary-exact two-step clipping procedure and a Chao1-based completeness assessment to ensure statistical comparability between sites of different spatial extent and sampling intensity. The algorithm is implemented in open R source (sf, terra, rgbif, tidyverse) with the tiling algorithm controlled by the four parameters only (initial cell size, area floor, tile overlap threshold, recursion limit), with default settings on a new site by simply changing the input file path. This paper describes in detail its five main components - (i) polygon input and validation, (ii) quadtree adaptive tiling, (iii) polygon coverage verification, (iv) tile-wise GBIF query with retry/shrink pagination and partial data retention, (v) boundary-exact deduplication, clipping and diversity estimation. A downstream generic module estimates diversity, Chao1 richness/completeness and Hurlbert rarefaction, for each taxonomic rank and generates rank-ordered diversity tables as output. The generalisability of algorithm to multiple sites has been demonstrated with second polygon (Sonamukhi Sal forest dominated stretch, Bankura district, West Bengal; approx. 610 sq km) that differs from the first (Bishnupur Sal forest dominated stretch; 938 sq km) in both size and complexity (10 vs 34 KML vertices) and report the tiling and diversity metrics comparable results across the two polygons. With no parameter changes, the algorithm generated 135 adaptive query tiles for Sal forest dominated stretch adjoining Bishnupur, and 86 tiles for Sal forest dominated stretch Sonamukhi SDFP, covering completely the area of both polygons. The number of tiles per 100 sq km is comparable between the two runs (14.4 vs 14.1 tiles) despite the 35% difference in polygon size and 3.4x vertex count. The tile-wise querying with retry/shrink pagination retrieved 6,169 GBIF records (excluding errors) with boundary-exact clipping across 404 species for Bishnupur and 1,222 GBIF records (excluding errors) across 271 species for Sonamukhi; the generic diversity module processed the records without further parameter changes and generated comparable metrics for each rank at both sites. The protocol addresses a general bioinformatic challenge in polygon-based GBIF queries, is provided as an open, reusable, documented method which has been validated on two sites. Because the protocol has so far been validated on only two polygons that differ markedly in size, shape and observer regime, it may be regarded as an initial cross-site validation rather than a comprehensive benchmark, and recommend testing on a broader, globally distributed set of polygons before the approach is treated as a general-purpose standard.
Matching journals
The top 4 journals account for 50% of the predicted probability mass.
Similar papers in this journal
Similar papers in this journal
- Geographic Name Resolution Service: A tool for the standardization and indexing of world political division names, with applications to species distribution modeling 95%
- Evaluating the data quality of iNaturalist termite records 94%
- A framework for the development of a global standardised marine taxon reference image database (SMarTaR-ID) to support image-based analyses 93%
Similar papers in this journal
- Large language models overcome the challenges of unstructured text data in ecology 93%
- FishPhyloMaker: An R package to generate phylogenies for ray-finned fishes 92%
- Using machine learning to count Antarctic shag (Leucocarbo bransfieldensis) nests on images captured by Remotely Piloted Aircraft Systems 92%
Similar papers in this journal
- TaxonTableTools - A comprehensive, platform-independent graphical user interface software to explore and visualise DNA metabarcoding data 94%
- COInr and mkCOInr: Building and customizing a non-redundant barcoding reference database from BOLD and NCBI using a lightweight pipeline. 92%
- debar, a sequence-by-sequence denoiser for COI-5P DNA barcode data 92%
"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.