360 Secure SkillHub
360 安全技能中心

OSRM Maps Skill

该技能通过 shell 脚本调用 OSRM 公共路由服务和 Nominatim/OpenStreetMap 地理编码服务,提供地名转坐标、坐标间距离与行程时间查询,支持驾车、步行和骑行模式,无需 API 密钥,需 python3 运行。仅返回道路网络估算,不含实时交通与公共交通。

adhishthite
adhishthite
热度 80.44
最近更新 2026-05-11 17:26:57
分类:生活依赖:代码执行 / 第三方 API应用场景:旅行

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add maps-osrm
Metadata
name
maps
description
Distance, routing, and geocoding using free APIs (OSRM + Nominatim/OSM). Use when the user asks about distance between places, travel time, directions, how far something is, or needs to convert a place name to coordinates. No API key required. Requires python3 (3.6+).
metadata
{"openclaw":{"requires":{"bins":["python3"]}}}

Maps

Free distance/routing (OSRM) and geocoding (Nominatim/OSM). No API keys needed.

Geocoding (place name → coordinates)

bash scripts/geocode.sh "Times Square, New York"

Returns lat,lon and display name. Use this first when you have place names instead of coordinates.

Distance & Route

bash scripts/distance.sh <origin_lat>,<origin_lon> <dest_lat>,<dest_lon> [mode]

Modes: driving (default), foot, bicycle

Examples:

# Manhattan to JFK Airport
bash scripts/distance.sh 40.7580,-73.9855 40.6413,-73.7781 driving

# Golden Gate Park to Fisherman's Wharf (walking)
bash scripts/distance.sh 37.7694,-122.4862 37.8080,-122.4177 foot

Workflow

  1. If user gives place names → geocode both with geocode.sh
  2. Use returned lat,lon pairs with distance.sh
  3. Report distance in km and duration in minutes

Limits

  • OSRM: free public demo server, no hard rate limit but be reasonable
  • Nominatim: max 1 request/second (OSM policy), include User-Agent
  • No live traffic data — durations are estimates based on road type/speed
  • Routing is road-network only (no public transit)