Last active
March 4, 2020 09:15
-
-
Save allixender/84620233cc02e2cf8e2a12d221c797af to your computer and use it in GitHub Desktop.
GDAL/OGR local GeoPackage to cloud Postgresql/PostGIS with schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for direct psql access via ssl cert auth | |
# psql "sslmode=verify-ca sslrootcert=server-ca.pem sslcert=client-cert.pem sslkey=client-key.pem hostaddr=x.x.x.x user=postgres dbname=postgres" | |
./cloud_sql_proxy_x64.exe -instances=glomodat:europe-west:mybatabase=tcp:5432 & | |
ogr2ogr -s_srs EPSG:3301 -t_srs EPSG:4326 -f "PostgreSQL" PG:"host=localhost user=postgres dbname=postgres password=xxxxxx" -nln "estonia_soil_4326" -lco SCHEMA=geodata -lco GEOMETRY_NAME=geom -lco FID=fid -nlt PROMOTE_TO_MULTI -overwrite estonia_soil_v1.1.gpkg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment