← Back to all sparks
G

GeoThinneR

INFRA · APIS
Velocity0.0

Efficient Spatial Thinning of Species Occurrences

Spatial thinning grows a result object, and the API breaks to make room for it

spatial-thinningspecies-distributionoccurrence-databreaking-changeskd-tree
Current state
GeoThinneR removes spatially redundant occurrence records before species distribution modelling. Version 2.0.0 restructured it around a GeoThinned S3 class with print, summary, plot and trial-accessor methods, replacing the bare logical vectors earlier versions returned, and reorganised the methods into three named strategies — distance, grid and precision — with the search algorithm as a separate argument. The two releases since have added a priority system for choosing which of several tied points to drop.
Where it's heading
The package is moving from a function that returns an answer to a tool that returns something you can interrogate. Multiple thinning trials are first-class — you can ask for the largest, fetch a specific one, summarise one — and the recent work is about making the choice among tied candidates controllable rather than random. Dependency discipline runs alongside: the R-tree method was dropped when its package was not on CRAN, and spatial coverage degrades to NA rather than failing when s2 is missing.
Prediction
The priority mechanism now covers all three strategies and the last release was an overflow fix in the local kd-tree path at large sizes, so scale is where the pressure is. More work on the distance methods at large N is the likelier next step than another strategy.

Recent moves

  1. 5mo ago

    Integer overflow in local kd-tree grid assignment

    A large-dataset warning traced to split() assigning points to grid cells, plus clearer wording when s2 is unavailable. Housekeeping on the paths added in 2.0.0.

    View source ↗
  2. 8mo ago

    Priority-based tie-breaking across all thinning methods

    When several points are equally good candidates for removal, priority now decides — supported in the distance method, with NA treated as lowest priority, and ties broken randomly under grid and precision. is_lonlat() and an out-of-range warning catch the coordinate mistakes that silently ruin a thinning run.

    View source ↗
  3. 1y ago

    GeoThinned result objects and a reorganised method surface

    ⚡ SPARK

    A deliberate break. thin_points() stops returning logical vectors and returns a GeoThinned object with print, summary, plot, largest() and get_trial() methods; the tangle of method names collapses into three strategies with search algorithms as a separate argument; the least accurate method is deleted outright.

    View source ↗
  4. 1y ago

    R-tree thinning removed with its off-CRAN dependency

    r_tree_thinning() and the rtree dependency behind it are dropped so the package can live entirely on CRAN. Stamped 55 seconds before 2.0.0, so both tags were backfilled in one sitting.

    View source ↗