Skip to content

Packs / geospatial-public

distance-matrix

compute great-circle (haversine) distances between points and the nearest neighbour of each

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-geospatial-public

Install

logicpacks pack use geospatial-public/distance-matrix
get_pack geospatial-public/distance-matrix

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: python-stdlib
  • Checks: 1 in outcome/checks.yaml
  • Code: distances.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Goal

Compute great-circle (haversine) distances between points and the nearest neighbour of each.

Steps

  1. Put points in a CSV with WGS84 lat/lon (decimal degrees).
  2. Run distances.py.
  3. For road distance or travel time use a routing engine (maps space).

Edge cases

  • Lat/lon swapped is the most common bug; sanity-check one known pair.
  • Antimeridian crossings work with haversine; planar maths does not.

Don'ts

  • Don't use straight-line distance for delivery ETAs.

Routes (free first)

  1. python-stdlib: code/distances.py (no install).