GeoD CLI
在终端独立规划、下载和校验地理数据,按需接入自己的脚本与工作流。
INSTALL / WINDOWS X64
0.3.0 · Windows x64安装 GeoD CLI
选择内置图源或注册自己的授权图源,在本机下载多级影像,输出 GeoTIFF、PNG/JPEG、原始瓦片、MBTiles 或 GeoPackage;支持叠加、裁剪、金字塔、辅助文件和断点续传。 安装程序或便携包无需 Node.js;通过 npm 安装发布包需要 Node.js 18+。
PowerShell · npm 安装
npm install -g geod-cli@0.3.0
geod --versionSOURCES / LOCAL
选择与注册图源
内置目录可直接选择;自定义图源注册在当前用户电脑上,不依赖桌面端,也不会上传到 GeoD。 注册时提供图源许可、URL 模板和署名,探测命令只请求一张瓦片。标准 OSM 公共瓦片不能用于离线批量下载。
PowerShell · 图源管理
geod sources list
geod sources default --id nasa_gibs_blue_marble
geod sources register --id my_tiles --name 我的图源 --url 'https://example.com/{z}/{x}/{y}.png' --attribution 数据提供方 --max-zoom 18
geod sources probe --id my_tiles --zoom 5 --x 26 --y 12CLI / QUICK START
独立运行下载任务
将下面的请求保存为 imagery.json,依次规划、下载和检查成果。 示例从 NASA GIBS 获取两个级别的影像;请按数据源授权和服务限制使用。输出目录必须是新目录,缓存目录可在重试时复用。
imagery.json
{
"schemaVersion": "1.0",
"name": "Blue Marble 多级影像示例",
"bounds": [116.3, 39.8, 116.5, 40.0],
"imagery": {
"sourceId": "nasa_gibs_blue_marble",
"zoom": 5,
"zoomLevels": [5, 6],
"format": "geotiff",
"compression": "deflate",
"buildPyramid": true,
"generateSidecars": true,
"concurrency": 4
}
}PowerShell · 下载与校验
geod plan --request .\imagery.json
if ($LASTEXITCODE -ne 0) { throw '请求校验失败' }
$bundle = Join-Path (Get-Location) ('imagery-' + (Get-Date -Format 'yyyyMMdd-HHmmss'))
geod fetch --request .\imagery.json --out $bundle --work-dir .\imagery-cache
if ($LASTEXITCODE -ne 0) { throw '下载失败' }
geod inspect --bundle $bundle
if ($LASTEXITCODE -ne 0) { throw '成果校验失败' }下载成功后,目录中会生成数据文件和 manifest.json。请检查其中的来源、范围、质量及警告;plan 的估算结果不能证明数据源当前可用。