ogr2ogr
Convert geospatial vector data between file formats. More information: https://gdal.org/en/stable/programs/ogr2ogr.html.
- Convert a Shapefile into a GeoPackage:
ogr2ogr -f GPKG
- Reduce a GeoJSON to features matching a condition:
ogr2ogr -where '' -f
- Change coordinate reference system of a GeoPackage from
EPSG:4326toEPSG:3857:
ogr2ogr -s_srs -t_srs -f GPKG
- Convert a CSV file into a GeoPackage, specifying the names of the coordinate columns and assigning a coordinate reference system:
ogr2ogr -f GPKG -oo X_POSSIBLE_NAMES= -oo Y_POSSIBLE_NAMES= -a_srs
- Load a GeoPackage into a PostGIS database:
ogr2ogr -f PostgreSQL PG:dbname=""
- Clip layers of a GeoPackage file to the given bounding box:
ogr2ogr -spat -f GPKG
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
