geospatial-routing-data
Geospatial routing data handling for depot and station coordinates, route node IDs, internal index mappings, great-circle distance matrices, and…
Skill by benchflow-ai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/benchflow-ai-geospatial-routing-data
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/geospatial-routing-data
What's inside
- Skill name
geospatial-routing-data- Description
- Geospatial routing data handling for depot and station coordinates, route node IDs, internal index mappings, great-circle distance matrices, and route-distance reconstruction. Use when optimization or reporting tasks involve latitude/longitude, station IDs, depots, distance metrics, vehicle routes, or validating travel distance from reported paths.
- License
- Apache-2.0
- Instructions
- 203 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Geospatial Routing Data
Use this skill before building a routing model or validating a routing report that contains coordinates, depots, station IDs, and route sequences.
The main risk is mixing user-facing IDs with internal array indices or using a different distance metric from the task.
## Parse Data Safely
Load structured data with a parser and build explicit mappings:
```python
import json
from pathlib import Path
data = json.loads(Path("/root/data.json").read_text())
stations_data = data["stations"]
station_ids = [int(s["id"]) for s in stations_data]
if len(station_ids) != len(set(station_ids)):
raise ValueError("duplicate station ids")
id_to_idx = {sid: idx for idx, sid in enumerate(station_ids)}
idx_to_id = {idx: sid for sid, idx in id_to_idx.items()}
```
Use internal indices in optimization variables. Use original station IDs in final reports.
## Coordinate Validation
Check coordinates before building distances:
```python
def parse_location(record, label):
lat = float(record["latitude"])
lon = float(record["longitude"])
if not (-90.0 <= lat <= 90.0):
raise ValueError(f"{label} latitude out of range: {lat}")
if not (-180.0 <= lon <= 180.0):
raise ValueError(f"{label} longitude out of range: {lon}")
return {"latitude": lat, "longitude": lon}
depot = parse_location(data["depot"], "depot")
station_locations = [parse_location(s, f"station {s['id']}") for s in stations_data]
```
Latitude and longitude are degrees. Convert to radians only inside the distance function.
## Great-Circle Distance
Match the task's declared distance metric. If the task specifies an Earth radius, use that exact value.
For great-circle miles with Earth radius `3960.0`, use:
```python
import math
def great_circle_miles(a, b, radius=3960.0):
lat1 = float(a["latitude"])
lon1 = float(a["longitude"])
lat2 = float(b["latitude"])
lon2 = float(b["longitude"])
deg_to_rad = math.pi / 180.0
phi1 = (90.0 - lat1) * deg_to_rad
phi2 = (90.0 - lat2) * deg_to_rad
theta1 = lon1 * deg_to_rad
theta2 = lon2 * deg_to_rad
cos_arc = (
math.sin(phi1) * math.sin(phi2) * math.cos(theta1 - theta2)
+ math.cos(phi1) * math.cos(phi2)
)
cos_arc = max(-1.0, min(1.0, cos_arc))
return math.acos(cos_arc) * radius
```
Clamp `cos_arc` into `[-1, 1]` to avoid floating-point domain errors.
Do not mix:
- Euclidean distance on degrees;
- haversine with a different Earth radius;
- miles and meters;
- rounded distances inside the optimization objective.
## Build Routing Nodes
Use separate depot labels when the route output must show a start and end depot:
```python
START = "depot_start"
END = "depot_end"
stations = range(len(stations_data))
from_nodes = [START, *stations]
to_nodes = [*stations, END]
def node_location(node):
if node in (START, END):
return depot
return station_locations[int(node)]
```
Build distances over the same arc set used by the optimization model:
```python
distances = {}
for i in from_nodes:
for j in to_nodes:
if i == j:
continue
if i == START and j == END:
continue # omit if vehicles must visit at least one station
distances[i, j] = great_circle_miles(node_location(i), node_location(j))
```
If direct depot-to-depot travel is allowed, keep the `(START, END)` arc.
## Convert Routes Between IDs and IndicesFrom benchflow-ai/skillsbench, Apache-2.0.
More from benchflow-ai/skillsbench
- 0.552score
hex-grid-spatial
benchflow-ai
Hex grid spatial utilities for offset coordinate systems.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
grpo
benchflow-ai
Reference for the GRPO (Group Relative Policy Optimization) algorithm.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
mesh-analysis
benchflow-ai
Analyzes 3D mesh files (STL) to calculate geometric properties (volume, components) and extract attribute data.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
task-review
benchflow-ai
SkillsBench task PR review — classifies the task track (standard / research / multimodal), runs static policy checks against the track-specific rubric…
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
civ6lib
benchflow-ai
Civilization 6 district mechanics library.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
d3-visualization
benchflow-ai
Build deterministic, verifiable data visualizations with D3.js (v6).
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
modal-gpu
benchflow-ai
Run Python code on cloud GPUs using Modal serverless platform.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
mhc-algorithm
benchflow-ai
Implement mHC (Manifold-Constrained Hyper-Connections) for stabilizing deep network training.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
transaction-concurrency-control-foundations
benchflow-ai
Provides database transaction concurrency-control background.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
search-accommodations
benchflow-ai
Lookup accommodations by city from the bundled dataset.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
search-attractions
benchflow-ai
Retrieve attractions by city from the bundled dataset.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
rl-post-training
benchflow-ai
Diagnostic guide for RL-based post-training of language models (GRPO, PPO, REINFORCE, DPO).
SkillCFreshness: C★ 1.9KClaude Code +9
Signals
- Stars
- 1,870
- Forks
- 372
- Open issues
- 50
- Last commit (this folder)
- Apr 29, 2026 (6 months ago)
- Last release
- Jun 14, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/benchflow-ai/skillsbench
- Website
- www.skillsbench.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from benchflow-ai
- 0.552score
modal-gpu
benchflow-ai
Run Python code on cloud GPUs using Modal serverless platform.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
task-review
benchflow-ai
SkillsBench task PR review — classifies the task track (standard / research / multimodal), runs static policy checks against the track-specific rubric…
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
transaction-concurrency-control-foundations
benchflow-ai
Provides database transaction concurrency-control background.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
search-attractions
benchflow-ai
Retrieve attractions by city from the bundled dataset.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
search-accommodations
benchflow-ai
Lookup accommodations by city from the bundled dataset.
SkillCFreshness: C★ 1.9KClaude Code +9 - 0.552score
mhc-algorithm
benchflow-ai
Implement mHC (Manifold-Constrained Hyper-Connections) for stabilizing deep network training.
SkillCFreshness: C★ 1.9KClaude Code +9
Cite this page
geospatial-routing-data skill. Agent Mart. https://agentmart.dev/skills/benchflow-ai-geospatial-routing-data (last updated 2026-10-24)