← Back to Skills Marketplace
ggyybb

baidu-mapbox-isochrone

by ggyybb · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ⚠ suspicious
124
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install baidu-mapbox-isochrone
Description
生成等时圈(isochrone)。通过百度地理编码API将地址转为BD-09坐标,转换为WGS84后,调用Mapbox Isochrone API生成等时圈SHP文件和Python预览图。当用户需要:给定地址生成等时圈地图、百度坐标转WGS84后做等时圈分析、生成等时圈shapefile并提供预览图时使用此技能。
README (SKILL.md)

等时圈生成器

通过百度地理编码 + 坐标转换 + 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 \x3Coutput_dir>
zip \x3C名称>.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: 📍 \x3C地址> · \x3CN>分钟\x3C出行模式>等时圈\
\
🗺️ WGS84坐标:\x3Clng>, \x3Clat>\
覆盖范围:\x3C描述>
media: \x3Cpreview_jpg路径>

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

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

参数(按顺序)

序号 参数 说明 示例
1 地址 任意百度地图可识别的地址 天津市南楼煎饼
2 百度 AK 百度地图开放平台 AK MEMORY.md 中已存储
3 Mapbox AK Mapbox 访问令牌 MEMORY.md 中已存储
4 出行模式 driving / walking / cycling walking
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.tif WGS84 重投影底图(EPSG:4326 GeoTIFF) EPSG:4326

使用示例

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

Agent 应执行:

python3 /root/.openclaw/workspace/skills/baidu-mapbox-isochrone/scripts/generate_isochrone.py "天津市南楼煎饼" "\x3C百度AK>" "\x3CMapboxAK>" "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
Usage Guidance
This skill appears to do what it says (convert Baidu coords, call Mapbox, save shapefiles and preview images), but there are several red flags you should consider before installing or running it: - Secrets handling: SKILL.md expects Baidu and Mapbox API keys stored in MEMORY.md but the skill metadata does not declare required credentials. Confirm where these keys will be read from and that you are comfortable storing them there. - Automatic outbound sends: The instructions require zipping outputs and sending both the preview image and the ZIP to a Feishu channel via the message tool. If you do not expect files (or credentials) to be transmitted to that channel, do not run the skill until this behavior is removed or clarified. Ensure the message tool/channel is one you control and trust. - Verify produced bundle: The ZIP will include shapefiles and the TIFF. Make sure no other sensitive files are placed in the output directory (default /root/.openclaw/workspace/isochrone_output) before running. - Review the script: Although the visible portion looks legitimate (calls Baidu, Mapbox, and ESRI/Mapbox tiles), the shipped Python script should be fully reviewed (the snippet is truncated in the manifest) to ensure it does not exfiltrate extra data or read unexpected local files. If you lack the ability to review code, run it in an isolated sandbox with test API keys. - Documentation mismatch: Ask the author to declare required credentials in the skill metadata (and to make automatic sending optional). Prefer skills that declare needed env vars and do not auto-push outputs to external channels without explicit user consent. Given these inconsistencies (undocumented secrets + mandatory automatic sending), treat the skill as suspicious until the above concerns are addressed or you run it in a safe, controlled environment.
Capability Analysis
Type: OpenClaw Skill Name: baidu-mapbox-isochrone Version: 1.0.3 The skill bundle is a legitimate tool for generating isochrone (travel time) maps. It uses the Baidu Geocoding API and Mapbox Isochrone API to process location data, perform coordinate conversions, and generate Shapefiles and preview images. The Python script (scripts/generate_isochrone.py) uses standard GIS libraries like geopandas and rasterio, and fetches map tiles from official ESRI and Mapbox endpoints. The instructions in SKILL.md are consistent with the tool's purpose, directing the agent to package the output and send it to the user via a messaging tool.
Capability Assessment
Purpose & Capability
The skill claims to convert Baidu BD-09 → WGS84 and call Mapbox isochrone — that matches the included script. However, SKILL.md tells the agent to read Baidu AK and Mapbox AK from MEMORY.md but the skill declares no required env vars or credentials. The skill also mandates sending outputs via a 'feishu' message channel even though no Feishu credentials or channel setup are declared. These mismatches mean required capabilities/credentials are not documented in the metadata.
Instruction Scope
SKILL.md instructs the agent to run scripts, zip all generated artifacts and then automatically send a preview image and the ZIP package to a Feishu channel via the message tool (the doc marks this as 'must execute'). That is broader than simply producing files: it causes automatic outbound transfer of generated files (and potentially any other files placed in the output dir). The instructions also reference MEMORY.md as the source of API keys, giving the skill implicit access to stored secrets. The 'automatic send' requirement is an operational decision that may be undesirable/unexpected for users.
Install Mechanism
No install spec is provided (instruction-only with a bundled Python script). That minimizes additional install-time risk; the Python script will run when invoked and pulls remote tiles/APIs at runtime. No off-repo downloads or installers are specified in skill metadata.
Credentials
The skill needs two API keys (Baidu AK and Mapbox AK) according to SKILL.md, but it does not declare required environment variables or primary credentials. Instead it expects those keys in MEMORY.md (agent memory). This is an inconsistency: the skill requires secrets but does not document them as required env vars. Also the automatic sending to Feishu implies the agent must have messaging/channel credentials configured — again not declared. The lack of declared credentials makes it hard to reason about what the skill will access/send.
Persistence & Privilege
always is false and the skill is user-invocable (normal). There is no installer or configuration that attempts to persistently modify other skills or elevate privileges. Note: autonomous invocation is allowed by platform default — combined with the automatic-send instructions this increases the impact surface, but the skill itself does not request persistent 'always' inclusion.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install baidu-mapbox-isochrone
  3. After installation, invoke the skill by name or use /baidu-mapbox-isochrone
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
Version 1.0.3 - 更新底图方案,预览图底图由 Mapbox 静态底图 PNG 替换为 ESRI 卫星瓦片并重投影为 WGS84 GeoTIFF。 - 预览图输出格式由 PNG 改为高质量 JPG,改善渲染效果。 - 补充 agent 自动操作流程,包括 ZIP 打包全套文件并通过 Feishu 发送,明确消息内容与发送方式。 - 优化参数说明,支持从 MEMORY.md 自动读取 API 密钥,无需每次手动输入。 - 简化使用示例及输出文件描述,默认输出路径更加规范。 - 旧有部分步骤和文件如 PNG 底图及部分参数表述已移除或替换。
v1.0.2
- Updated isochrone workflow to use Mapbox static street basemap PNG (EPSG:3857) instead of ESRI World Imagery; falls back to a plain grid if download fails. - Preview image now uses matplotlib to draw a WGS84 grid with semi-transparent overlay (alpha=0.38) and coordinate axis labels. - Output directory may now lack a WGS84 GeoTIFF if map image download fails; generated basemap is in PNG (EPSG:3857) when present. - Documentation updated to reflect these workflow and output changes.
v1.0.1
等时圈绘制工具,数据源来自百度地图开放平台、mapbox等时圈api,使用方法:请帮我生成等时圈,地址是XXX,百度AK是xxx,Mapbox AK是yyy,出行方式是driving,时间30分钟
v1.0.0
baidu-mapbox-isochrone v1.0.0 - Initial release with end-to-end isochrone generation: input address, Baidu AK, Mapbox AK, mode, and duration to generate isochrone shapefiles and a preview image. - Full workflow: Baidu geocoding → coordinate conversion (BD-09 to WGS84) → Mapbox Isochrone API → shapefile output → satellite basemap download and reprojection → rendered preview image. - Outputs include point.shp, isochrone.shp, base_map_wgs84.tif, and isochrone_preview.png, all in WGS84. - Includes error handling for geocoding, authentication, API region limits, and missing dependencies. - Instructions and examples provided for installation, usage, and troubleshooting.
Metadata
Slug baidu-mapbox-isochrone
Version 1.0.3
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is baidu-mapbox-isochrone?

生成等时圈(isochrone)。通过百度地理编码API将地址转为BD-09坐标,转换为WGS84后,调用Mapbox Isochrone API生成等时圈SHP文件和Python预览图。当用户需要:给定地址生成等时圈地图、百度坐标转WGS84后做等时圈分析、生成等时圈shapefile并提供预览图时使用此技能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 124 downloads so far.

How do I install baidu-mapbox-isochrone?

Run "/install baidu-mapbox-isochrone" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is baidu-mapbox-isochrone free?

Yes, baidu-mapbox-isochrone is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does baidu-mapbox-isochrone support?

baidu-mapbox-isochrone is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created baidu-mapbox-isochrone?

It is built and maintained by ggyybb (@ggyybb); the current version is v1.0.3.

💬 Comments