Skip to content

Instantly share code, notes, and snippets.

@invisiblefunnel
Created July 3, 2018 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save invisiblefunnel/bf74c1890bb1182efdf7987a2c7f3582 to your computer and use it in GitHub Desktop.
Save invisiblefunnel/bf74c1890bb1182efdf7987a2c7f3582 to your computer and use it in GitHub Desktop.
Geopackage to PostGIS via ogr2ogr
ogr2ogr -nlt PROMOTE_TO_MULTI \
        -t_srs 'EPSG:4326' \
        -overwrite \
        -lco SCHEMA=public \
        -lco PRECISION=NO \
        --config PG_USE_COPY YES \
        -f PostgreSQL PG:$(heroku config:get DATABASE_URL -a myapp) \
        ~/Downloads/natural_earth_vector.gpkg/packages/natural_earth_vector.gpkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment