China Administrative Divisions Downloader for Openclaw

Openclaw Skills for downloading and exporting Chinese administrative-division vector data with search, metadata lookup, bbox calculation, and batch GIS output.

ruiduobao
v1.0.0
Aug 1, 2026
0
251
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install geoskill-china-admin-divisions

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install geoskill-china-admin-divisions using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is China Administrative Divisions Downloader?

This Openclaw Skills package provides a command-line workflow for discovering and exporting Chinese administrative divisions from the public map.ruiduobao.com API without credentials. It supports province, city, county, town, and village-level data, making it useful for GIS pipelines, cartography, and data analysis.

With Openclaw Skills, you can search by name or code, drill down through the administrative tree, inspect metadata with optional 1 km bbox expansion, and download single or batched results in GeoJSON, Shapefile, KML, GeoPackage, SVG, or pure-shape PNG formats.

China Administrative Divisions Downloader Use Cases

  • Search Chinese administrative divisions by keyword, code, province, or level.
  • Drill down from province to city, county, town, and village in a tree-style workflow.
  • Generate bbox and area metadata for spatial analysis and mapping.
  • Export single administrative areas to GeoJSON, Shapefile, KML, GeoPackage, SVG, or PNG.
  • Batch download all child divisions for a province or other parent region.
  • Prepare GIS-ready datasets for QGIS, ArcGIS, GeoPandas, and other spatial tools.
  • Create vector-based web map assets or clean report illustrations from division boundaries.
  • Handle village-level cases where boundary vectors may be unavailable while still returning metadata.

How China Administrative Divisions Downloader Works

  1. Start by searching for an administrative division using a name, code, or filter such as province and level.
  2. Use tree-style commands to list children at the city, county, town, or village level and narrow down the exact target region.
  3. Query info or bbox to retrieve metadata, WGS84 bounding boxes, area calculations, and vector availability status.
  4. Run download to export one division in the desired format, or use download-children to batch export descendants at scale.
  5. Consume the generated files in GIS software, web applications, notebooks, or reporting workflows.
  6. For village-level or edge cases without boundary geometry, fall back to metadata-only output with --no-geojson when needed.

China Administrative Divisions Downloader Setup

  1. Ensure Python is available in your environment.
  2. Clone or place the skill repository so the script path is available.
  3. Run the CLI from the project root using the provided script path.
  4. If your network environment requires a proxy, enable it with RUIDUOBAO_USE_PROXY=1.
  5. Install Pillow if you plan to export shape-only PNG images.
# Example: search administrative divisions
python scripts/china_admin_divisions.py search 锦江

# Example: inspect metadata with bbox expansion
python scripts/china_admin_divisions.py info --code 510104 --expand-km 1

# Example: export one division as GeoJSON
python scripts/china_admin_divisions.py download --code 510104 --format geojson

# Example: force proxy usage if needed
export RUIDUOBAO_USE_PROXY=1
python scripts/china_admin_divisions.py search 四川省

No credentials are required because the skill uses the public map.ruiduobao.com API.

China Administrative Divisions Downloader Data Schema & Taxonomy

The skill returns and writes structured administrative-division metadata and geometry-oriented exports.

Core metadata fields

Field Meaning
name Division name, such as a district or county
code Official administrative code
level Hierarchy level, such as sheng, shi, xian, xiang, or cun
province Parent province name
city Parent city name, when applicable
year Source year for the boundary dataset
source Data source identifier, ruiduobao
bbox_wgs84 Original WGS84 bounding box
bbox_wgs84_expanded Bounding box expanded by the requested buffer
area_km2 Estimated area in square kilometers
area_km2_expanded Buffered area estimate
vector_available Whether a boundary vector could be retrieved
vector_error Error details when vector retrieval is unavailable

Generated file types

  • geojson -> .geojson single-file GeoJSON output.
  • shp -> .zip archive containing .shp, .shx, .dbf, and .prj.
  • kml -> .kml for Earth and map viewers.
  • gpkg -> .gpkg GeoPackage.
  • svg -> .svg vector graphic output.
  • png -> .png pure shape-only image without text labels.

Metadata taxonomy

  • Hierarchy: province -> city -> county -> town -> village.
  • Query modes: search, list-children, info, bbox, single download, batch download.
  • Compatibility aliases: gson remains accepted as a historical alias for geojson.
  • Edge-case handling: village-level codes may return metadata without geometry, with vector_available: false and null bbox/area fields.

China Administrative Divisions Downloader Advanced Features

  • Supports tree-style drill-down across all five administrative levels.
  • Provides both single-division and batch child downloads for scalable GIS workflows.
  • Calculates bbox and area with an optional 1 km buffer for spatial context.
  • Exports to multiple GIS and visualization formats, including GeoJSON, Shapefile, KML, GeoPackage, SVG, and PNG.
  • Includes metadata-only fallback mode for village-level divisions without available geometry.
  • Allows proxy control through the RUIDUOBAO_USE_PROXY environment variable for network-flexible deployments.
  • Preserves backward compatibility with the historical gson format alias.
  • Designed for direct use in scripts, automation pipelines, and data extraction workflows powered by Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*