不是所有 GIS 分析都需要昂贵的商业软件。开源 GIS 工具链——以 GDAL 为核心——提供了强大的空间数据处理能力。
GDAL 是什么?
GDAL(Geospatial Data Abstraction Library)是开源地理空间数据转换库,支持超过 200 种栅格和矢量格式的读写。
常用命令
# 格式转换
ogr2ogr -f GeoJSON output.geojson input.shp
# 裁剪栅格
gdalwarp -te xmin ymin xmax ymax input.tif output.tif
# 投影转换
ogr2ogr -t_srs EPSG:4326 output.shp input.shp
Python 集成
通过 Fiona、Rasterio、GeoPandas 等 Python 库,可以在脚本中方便地调用 GDAL 功能,构建自动化处理流水线。