baidu-mapbox-isochrone

生成等时圈(isochrone)。通过百度地理编码API将地址转为BD-09坐标,转换为WGS84后,调用Mapbox Isochrone API生成等时圈SHP文件和Python预览图。当用户需要:给定地址生成等时圈地图、百度坐标转WGS84后做等时圈分析、生成等时圈shapefile并提供预览图时使用此技能。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "baidu-mapbox-isochrone" with this command: npx skills add ggyybb/baidu-mapbox-isochrone

等时圈生成器

通过百度地理编码 + 坐标转换 + Mapbox Isochrone API 生成等时圈 SHP 文件和预览图。

工作流程

执行 scripts/generate_isochrone.py,分 6 步完成:

[Step 1] 百度地理编码 (BD-09)
    → 地址 → 百度AK → BD-09 经纬度
[Step 2] 坐标转换 (BD-09 → WGS84)
    → coord_convert.bd2wgs()
[Step 3] Mapbox 等时圈 API
    → WGS84 坐标 + 出行模式 + 时间 → GeoJSON 等时圈面
[Step 4] 保存 Shapefile
    → point.shp(起点) + isochrone.shp(等时圈面)
[Step 5] 获取 WGS84 底图
    → ESRI 卫星影像瓦片 → rasterio 重投影为 WGS84 GeoTIFF
[Step 6] 生成预览图
    → matplotlib 叠加渲染(alpha=0.38半透明等时圈 + 卫星底图)

⚡ 自动发送流程(必须执行)

脚本成功后将触发自动发送,agent 必须执行以下步骤:

Step A: 打包所有产物

cd <output_dir>
zip <名称>.zip point.shp point.shx point.dbf point.prj point.cpg \
    isochrone.shp isochrone.shx isochrone.dbf isochrone.prj isochrone.cpg \
    base_map_wgs84.tif isochrone_preview.jpg

Step B: 发送预览图(通过 message 工具)

action: send
channel: feishu
message: 📍 <地址> · <N>分钟<出行模式>等时圈\n\n🗺️ WGS84坐标:<lng>, <lat>\n覆盖范围:<描述>
media: <preview_jpg路径>

Step C: 发送 ZIP 文件包(通过 message 工具)

action: send
channel: feishu
message: 📦 SHP全套文件包(含.shp/.shx/.dbf/.prj/.cpg + 底图TIFF + 高清预览图)
filePath: <zip路径>

参数(按顺序)

序号参数说明示例
1地址任意百度地图可识别的地址天津市南楼煎饼
2百度 AK百度地图开放平台 AKMEMORY.md 中已存储
3Mapbox AKMapbox 访问令牌MEMORY.md 中已存储
4出行模式driving / walking / cyclingwalking
5时间(分钟)等时圈时长15
6输出目录可选,默认为 /root/.openclaw/workspace/isochrone_output可省略

输出文件(默认路径)

生成在 /root/.openclaw/workspace/isochrone_output/ 下:

文件说明CRS
point.shp起点(经纬度点)EPSG:4326
isochrone.shp等时圈面EPSG:4326
isochrone_preview.jpg预览图(卫星底图 + 半透明等时圈)
base_map_wgs84.tifWGS84 重投影底图(EPSG:4326 GeoTIFF)EPSG:4326

使用示例

请帮我生成等时圈:
- 地址:天津市南楼煎饼
- 出行模式:walking
- 时间:15分钟

Agent 应执行:

python3 /root/.openclaw/workspace/skills/baidu-mapbox-isochrone/scripts/generate_isochrone.py "天津市南楼煎饼" "<百度AK>" "<MapboxAK>" "walking" 15

然后按"自动发送流程"打包并发送所有文件给用户。

API 密钥

  • 百度 AK:MEMORY.md → 百度AK 字段
  • Mapbox AK:MEMORY.md → Mapbox AK 字段

错误处理

错误原因处理
百度地理编码失败AK 无效或地址无法识别检查 AK / 换用更精确的地址
Mapbox API 认证失败Mapbox AK 错误核对 AK
Mapbox API 参数错误 (422)坐标超出支持区域确认地址在支持范围内
依赖缺失包未安装pip install coord_convert geopandas shapely pyshp matplotlib --break-system-packages

依赖

系统需安装中文字体(matplotlib 使用的字体名为 Noto Sans CJK JP,来自 NotoSansCJK-Regular.ttc)。

Python 依赖:

coord_convert, geopandas, shapely, pyshp, matplotlib, rasterio, scipy, pykdtree

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Vnsh Skill

Securely share files using encrypted, expiring vnsh.dev links with the vnsh CLI for uploading and decrypting shared content.

Registry SourceRecently Updated
Coding

Notion

Notion API for creating and managing pages, databases, blocks, relations, rollups, and multi-workspace profiles via the notioncli CLI tool.

Registry SourceRecently Updated
Coding

Lybic Sandbox

Lybic Sandbox is a cloud sandbox built for agents and automation workflows. Think of it as a disposable cloud computer you can spin up on demand. Agents can perform GUI actions like seeing the screen, clicking, typing, and handling pop ups, which makes it a great fit for legacy apps and complex flows where APIs are missing or incomplete. It is designed for control and observability. You can monitor execution in real time, stop it when needed, and use logs and replay to debug, reproduce runs, and evaluate reliability. For long running tasks, iterative experimentation, or sensitive environments, sandboxed execution helps reduce risk and operational overhead.

Registry SourceRecently Updated
1.2K0aenjoy
Coding

Homeassistant Skill

Control Home Assistant devices and automations via REST API. 25 entity domains including lights, climate, locks, presence, weather, calendars, notifications, scripts, and more. Use when the user asks about their smart home, devices, or automations.

Registry SourceRecently Updated
5.1K7anotb