type
Post
status
Published
date
Jan 26, 2026
slug
shape2postgis
summary
使用轻量级 GDAL 容器运行
ogr2ogr 工具,将 .shp 文件导入数据库。tags
Docker
Postgis
category
速查
icon
fas fa-globe-stand
password
-nln public.shape: New Layer Name,指定导入后数据库中的 Schema 和表名 (即public模式下的shape表)。
-lco GEOMETRY_NAME=geom: 重要,PostGIS 默认习惯使用geom作为几何列名,而 GDAL 默认可能是wkb_geometry,这里强制指定为geom以符合习惯