-
-
Notifications
You must be signed in to change notification settings - Fork 198
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.shp
shp2pgsql -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
shp2pgsql
command by using the-W
flag. i.e.-W "latin1"