gdal-api

gdal-api is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 56 tokens per session (4,438 once invoked), scanned A, original, MIT.

A programming interface for GDAL, a library that reads and writes many geographic raster and vector data formats and converts between coordinate systems.

In plain words
What is it for?
Use it from C, C++, Python, Java, or C# to read, write, transform, analyze, filter, or edit geographic data.
Why use it?
It avoids writing separate file-format and map-projection handling for each geospatial application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it from C, C++, Python, Java, or C# to read, write, transform, analyze, filter, or edit geographic data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/gdal-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill gdal-api
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gdal-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/gdal-api/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/gdal-api)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/gdal-api"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/gdal-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gdal-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/gdal-api"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/gdal-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.04438
Opus 5 $0.00028 $0.02219
Sonnet 5 $0.00011 $0.00888
Haiku 4.5 $0.00006 $0.00444

Measured 7d ago against content hash bf88685f101a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

gdal-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

gis/gdal-api/SKILL.md · 351 lines

How it starts

The opening of the file, as written. The whole thing — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/OSGeo/gdal

API 总览文档: https://gdal.org/en/stable/api/index.html

C/C++ API 参考: https://gdal.org/en/stable/api/index.html#c-api

Python API 参考: https://gdal.org/en/stable/api/python/index.html

Java API 参考: https://gdal.org/en/stable/api/java/index.html

C# API 参考: https://gdal.org/en/stable/api/csharp/index.html

许可证: MIT

概述

GDAL 是地理空间数据处理的事实标准库,由 OSGeo 基金会维护。它提供:

  • 200+ 栅格驱动:GeoTIFF、NetCDF、HDF5、COG、JPEG2000 等
  • 100+ 矢量驱动:Shapefile、GeoJSON、GeoPackage、PostGIS、FlatGeobuf 等
  • 坐标参考系统:基于 PROJ 的坐标变换与投影转换
  • 栅格分析:重采样、镶嵌、裁剪、波段运算、DEM 分析等
  • 矢量操作:空间过滤、属性查询、要素创建与编辑等

GDAL 核心以 C++ 实现,同时通过 SWIG 提供 PythonJavaC# 三种语言绑定,各语言 API 与 C++ 保持一致的类与方法命名。


环境准备

C++ 环境

# Linux (Debian/Ubuntu)
apt-get install libgdal-dev

# macOS (Homebrew)
brew install gdal

# CMake 项目中链接 GDAL
# CMakeLists.txt
find_package(GDAL REQUIRED)
target_link_libraries(myapp PRIVATE GDAL::GDAL)

Python 环境

# pip 安装(需系统已安装 GDAL 库)
pip install GDAL

# Conda 安装(推荐,自动处理 C 库依赖)
conda install -c conda-forge gdal

# 验证
python -c "from osgeo import gdal; print(gdal.VersionInfo())"

Java 环境

<!-- Maven 依赖 -->
<dependency>
    <groupId>org.gdal</groupId>
    <artifactId>gdal</artifactId>
    <version><!-- 请查看 Maven Central 获取最新版:https://central.sonatype.com/artifact/org.gdal/gdal --></version>
</dependency>
// Gradle
implementation 'org.gdal:gdal:3.13.1'

注意: Java 绑定需要在系统 PATH(Windows)或 LD_LIBRARY_PATH(Linux)中找到 gdalalljni 本地库。

C# 环境

# .NET Core / .NET 5+ 项目
dotnet add package MaxRev.Gdal.Core
dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal   # Linux
dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal  # Windows

注意: 官方 SWIG 绑定命名空间为 OSGeo.GDALOSGeo.OGROSGeo.OSR。NuGet 包 MaxRev.Gdal.Core 是社区维护的跨平台封装。


核心类一览

GDAL API 在四种语言中保持一致的类结构,下表列出核心类及其作用:

栅格 API 核心类

C++ 头文件 / 模块 用途
GDALDriver gdal_priv.h / osgeo.gdal 栅格驱动——注册格式、创建数据集
GDALDataset gdal_priv.h / osgeo.gdal ★ 栅格数据集——打开、读写、获取元数据
GDALRasterBand gdal_priv.h / osgeo.gdal 栅格波段——读写像素、获取统计信息
GDALColorTable gdal_priv.h / osgeo.gdal 颜色表——索引颜色映射
GDALRasterAttributeTable gdal_priv.h / osgeo.gdal 栅格属性表

Read the full file on GitHub · 351 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · -1,128 lines bf88685f101a
  2. 11d ago First seen · 1,479 lines · 56 tokens per session scan A 52538c4a1348

Subscribe to this mod's changes

gdal-api is a skill published in the GitHub repository znlgis/opengis-skills (60 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 4,438 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agent-framework-azure-ai-py

Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.

ranbot-ai/awesome-skills · 24 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

notebooklm

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…

teng-lin/notebooklm-py · 79 tokens

polyrepo-boundaries

Decide which xberg-io repository owns a cross-repository fix or API, and coordinate compatible changes across Xberg, Alef, enterprise, crawler, LLM, and OCR repositories. Load when work spans sibling repos; do not use for a self-contained Xberg edit.

xberg-io/xberg · 62 tokens

dstack-prototyping

Use with the dstack skill for model-serving work when the image, serving command, resources, backend/fleet choice, or service behavior is not proven. Guides task-first prototyping on real hardware, choosing fleets/backends that can reuse idle instances and caches, checking vLLM/SGLang sources, and verifying the final…

dstackai/dstack · 80 tokens

fastapi-guard

Production-ready security middleware for FastAPI. Use when adding IP filtering, rate limiting, per-route security decorators, route-resolution strict mode, global behavior rules, passive/log-only mode, or Guard Agent SaaS telemetry to a FastAPI app. Covers SecurityMiddleware setup, SecurityConfig tuning, and the…

rennf93/fastapi-guard · 72 tokens