-
-
Notifications
You must be signed in to change notification settings - Fork 224
gdal cheatsheet
Alexander Rolek edited this page Sep 7, 2016
·
8 revisions
ogr2ogr -t_srs EPSG:3857 /path/to/data/out.shp /path/to/data/in.shpshp2pgsql -D -I -s 3857 in.shp schema.table_name | psql "host={host} port={port} dbname={db_name} user={user}"Command line explination:
-
-D: use the dump format instead of INSERT. Much faster for large datasets. -
-I: create geospatial index on the geometry column -
-s: SRID to reproject the data
Additional Notes
- encoding can be adjusted from
shp2pgsqlcommand by using the-Wflag. i.e.-W "latin1"