Geoskill: GeoTIFF Info

Reads and displays GeoTIFF metadata including CRS, resolution, image size, bands, NoData, corner coordinates, and supports batch scanning using only Python s...

ruiduobao

@ruiduobao

Install

$ openclaw skills install @ruiduobao/geoskill-geotiff-info

GeoTIFF Metadata Viewer

A zero-dependency Python tool for reading GeoTIFF file metadata without opening GIS software. Parses TIFF IFD (Image File Directory) manually using only Python standard library.

Features

  • CRS Information: EPSG code, CRS name, WKT
  • Resolution: Pixel scale (X/Y resolution)
  • Image Dimensions: Width, height, band count
  • Data Types: Bits per sample, sample format (integer/float)
  • NoData Value: GDAL nodata tag
  • Band Statistics: Min, max, mean, std per band (when available)
  • File Information: File size, BigTIFF detection
  • Corner Coordinates: UL, UR, LL, LR in geographic/projected coordinates
  • Affine Transform: 6-parameter affine transformation matrix
  • GeoTIFF Keys: All GeoKey directory entries
  • Output Formats: Text table or JSON
  • Batch Processing: Scan entire directories for GeoTIFF files

Installation

No installation required! This tool uses only Python standard library.

# Just run the script directly
python geotiff-info.py <input_file>

Usage

Single File

# Text output
python geotiff-info.py image.tif

# JSON output
python geotiff-info.py image.tif --json

Batch Directory Scan

# Scan directory for all GeoTIFF files
python geotiff-info.py /path/to/directory --batch

# Export all metadata to JSON
python geotiff-info.py /path/to/directory --batch --json > metadata.json

Example Output

============================================================
GeoTIFF Metadata: dem.tif
============================================================

                    FILE INFORMATION                    
------------------------------------------------------------
  File Size:          12.45 MB
  BigTIFF:            No

                   IMAGE DIMENSIONS                     
------------------------------------------------------------
  Width:              1024 pixels
  Height:             1024 pixels
  Bands:              1

                       DATA TYPE                         
------------------------------------------------------------
  Bits per Sample:    32
  Sample Format:      floating point
  Compression:        LZW
  Photometric:        MinIsBlack
  Planar Config:      Chunky

                    NODATA VALUE                        
------------------------------------------------------------
  NoData:             -9999

              COORDINATE REFERENCE SYSTEM               
------------------------------------------------------------
  EPSG Code:          4326
  CRS Name:           WGS 84

                   PIXEL RESOLUTION                     
------------------------------------------------------------
  Scale X:            0.000277777777778
  Scale Y:            0.000277777777778

                  AFFINE TRANSFORM                      
------------------------------------------------------------
  [      0.000278,       0.000000,     115.000000]
  [      0.000000,      -0.000278,      40.000000]
  [          0.0,           0.0,           1.0]

                  CORNER COORDINATES                    
------------------------------------------------------------
  Upper Left         (    115.000000,      40.000000)
  Upper Right        (    115.285714,      40.000000)
  Lower Left         (    115.000000,      39.714286)
  Lower Right        (    115.285714,      39.714286)

============================================================

Supported GeoTIFF Tags

Tag IDNameDescription
256ImageWidthImage width in pixels
257ImageLengthImage height in pixels
258BitsPerSampleBits per sample
259CompressionCompression method
262PhotometricInterpretationColor space
277SamplesPerPixelNumber of bands
284PlanarConfigurationChunky or planar
339SampleFormatInteger/float format
33550ModelPixelScaleTagPixel scale (x, y, z)
33922ModelTiepointTagTiepoint (i, j, k, x, y, z)
34735GeoKeyDirectoryTagGeoTIFF key directory
34736GeoDoubleParamsTagDouble precision parameters
34737GeoAsciiParamsTagASCII parameters
42113GDAL_NODATANoData value

Supported Formats

  • Classic TIFF (magic number 42)
  • BigTIFF (magic number 43)
  • Little-endian and big-endian byte order
  • All standard TIFF data types (BYTE, SHORT, LONG, FLOAT, DOUBLE, etc.)

Limitations

  • Band statistics (min/max/mean/std) are placeholders for large files
  • Does not read actual pixel data (metadata only)
  • Limited CRS WKT support (relies on GeoKeys)
  • No support for GeoTIFF 1.1 new model (yet)

License

MIT-0 (No Attribution)

Author

OpenCode AI Assistant


中文说明

零依赖的 GeoTIFF 元数据读取工具。仅使用 Python 标准库,手动解析 TIFF IFD。

特性

  • CRS 信息:EPSG 编码、CRS 名称、WKT
  • 分辨率:X/Y 方向像元大小
  • 图像尺寸:宽度、高度、波段数
  • 数据类型:位深度、采样格式(整型/浮点)
  • NoData:GDAL nodata 标签
  • 角点坐标:左上、右上、左下、右下
  • 仿射变换:6 参数仿射变换矩阵
  • 批量处理:扫描整个目录的 GeoTIFF 文件
  • 输出格式:文本表格或 JSON

使用方法

# 单文件
python geotiff-info.py image.tif
python geotiff-info.py image.tif --json

# 批量扫描目录
python geotiff-info.py /path/to/directory --batch
python geotiff-info.py /path/to/directory --batch --json > metadata.json

无需安装任何依赖,直接运行即可。

Top skills in this category

novel-generator 是一个中文爽文小说生成技能。用户只需提供一句话方向(如"写个都市重生爽文"),AI 代理即可自动完善提示词、规划大纲、逐章创作并输出为独立 Markdown 文件。 核心特性: 智能提示词生成:从一句话方向自动补全世界观、人设、冲突、爽点设计 分章节创作:每章 2000-3000 字,层层递进,章章有爽点 记忆系统:通过 .learnings/ 记录角色、地点、情节、世界观,确保故事前后一致 情节图解:关键战斗、人物关系、势力分布自动生成 Mermaid 图 失败记录:穿帮、矛盾、崩塌等问题自动记录,持续优化 多题材支持:都市、修仙、玄幻、重生、系统流、末世、科幻、游戏 兼容 Claude Code、Cursor、OpenAI Codex、GitHub Copilot 等所有支持 Agent Skills 的工具。

@ityhg

根据用户提供的内容方向自动生成提示词并创作爽文小说。适用场景:(1) 用户提供小说方向/题材/关键词,(2) 需要生成章节连贯的长篇爽文,(3) 需要维护角色、地点、情节的连续性,(4) 需要为关键情节生成图解,(5) 需要记录生成失败场景以优化后续创作。支持都市、修仙、玄幻、重生、系统流等多种题材。Use wh...

7110k

Video Agent (Deprecated)

@michaelwang11394

[DEPRECATED — uses outdated v1/v2 endpoints] Use `create-video` for prompt-based video generation (v3 Video Agent) or `avatar-video` for precise avatar/scene...

76.3k

Skill Vetter

@spclaudehome

Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.

1.3k271k

Clawdhub

@steipete

Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.

25338k

SuperDesign

@mpociot

Expert frontend design guidelines for creating beautiful, modern UIs. Use when building landing pages, dashboards, or any user interface.

19341k