Install
openclaw skills install @ruiduobao/geotiff-infoZero-dependency Python tool for reading GeoTIFF file metadata. Parses TIFF IFD manually using only Python standard library. Supports CRS, resolution, bands, corner coordinates, and batch scanning.
openclaw skills install @ruiduobao/geotiff-infoA 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.
No installation required! This tool uses only Python standard library.
# Just run the script directly
python geotiff-info.py <input_file>
# Text output
python geotiff-info.py image.tif
# JSON output
python geotiff-info.py image.tif --json
# 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
============================================================
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)
============================================================
| Tag ID | Name | Description |
|---|---|---|
| 256 | ImageWidth | Image width in pixels |
| 257 | ImageLength | Image height in pixels |
| 258 | BitsPerSample | Bits per sample |
| 259 | Compression | Compression method |
| 262 | PhotometricInterpretation | Color space |
| 277 | SamplesPerPixel | Number of bands |
| 284 | PlanarConfiguration | Chunky or planar |
| 339 | SampleFormat | Integer/float format |
| 33550 | ModelPixelScaleTag | Pixel scale (x, y, z) |
| 33922 | ModelTiepointTag | Tiepoint (i, j, k, x, y, z) |
| 34735 | GeoKeyDirectoryTag | GeoTIFF key directory |
| 34736 | GeoDoubleParamsTag | Double precision parameters |
| 34737 | GeoAsciiParamsTag | ASCII parameters |
| 42113 | GDAL_NODATA | NoData value |
MIT-0 (No Attribution)
OpenCode AI Assistant
零依赖的 GeoTIFF 元数据读取工具。仅使用 Python 标准库,手动解析 TIFF IFD。
# 单文件
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
无需安装任何依赖,直接运行即可。