← Back to all sparks
G

geodist

ANALYTICS
Velocity0.0

Fast, Dependency-Free Geodesic Distance Calculations

geodist stays dependency-free and fast, and warns you when 'cheap' distances stop being honest.

geospatialdistance-calculationzero-dependencyc-coder-package
Current state
geodist computes geodesic distances between coordinate pairs in C with no dependencies, offering several measures that trade accuracy for speed — including a 'cheap' approximation used by default. The API is small and largely finished; 0.1.0 added geodist_min() for nearest-match lookups and 0.1.1 is a compiler warning fix.
Where it's heading
Development has been about making the speed-accuracy trade visible rather than hiding it. The 0.0.6 release added messages telling users to pick a different measure once the default cheap approximation is applied beyond 100km, where its error stops being negligible. Around that, the work is input handling — tibble support, better lon/lat column matching, vector inputs — and hardening the C code. It is a package that treats being small and correct as the feature.
Prediction
Expect continued low-frequency maintenance: compiler warnings and geodesic source updates account for three of the last six releases, and the function surface has grown by only two entries in five years.

Recent moves

  1. 1y ago

    geodist 0.1.1 clears a clang warning in geodesic.c

    A compiler warning fix in the vendored geodesic source. Standard upkeep for a package whose value proposition is C code with no dependencies to hide behind.

    View source ↗
  2. 2y ago

    geodist 0.1.0 adds geodist_min() for nearest matches

    geodist_min() returns the index of the minimum-distance item in the second object, turning a full distance matrix computation into a nearest-neighbor lookup. For large inputs this avoids materializing a matrix users only wanted one column of.

    View source ↗
  3. 3y ago

    geodist 0.0.8 updates geodesic source, fixes clang warnings

    Vendored geodesic code refreshed, all clang warnings cleared with prototype headers added, and a Codeberg remote registered. Maintenance, plus a hedge against depending on a single forge.

    View source ↗
  4. 5y ago

    geodist 0.0.7 improves lon/lat column matching and tibbles

    Better inference of which columns hold longitude and latitude, plus a fix for tibble inputs. Small, but column-name guessing is where a coordinate package most often does the wrong thing silently.

    View source ↗
  5. 5y ago

    geodist 0.0.6 warns when cheap distances exceed 100km

    All functions now advise switching measure once the default cheap approximation is used beyond 100km, where its error becomes material. Making an accuracy trade announce itself is the right call for a default most users never revisit. C inputs are also protected, and the source mirrored across four forges.

    View source ↗
  6. 6y ago

    geodist 0.0.4 adds geodist_vec() for vector inputs

    geodist_vec() accepts individual coordinate vectors rather than requiring matrix or data frame assembly, alongside a fix for cheap distances between single points. Ergonomics for callers who already have separate lon and lat vectors in hand.

    View source ↗