Geographic Information Systems Asked by Rihab Bouallagui on January 21, 2021
I am trying to convert Esri file gdb to PostGIS
I created a new database : ‘newkelibia’ with pgAdmin 4
using OSGeo4W shell I executed this :
ogr2ogr, -f "PostgreSQL" PG:"host=localhost port=5432 user='postgres' password='1234' dbname='newkelibia'" C:UsersonsDocumentsCityEngineDefault Workspacenew_projectmodelsKlibiaBD.gdb" -overwrite -progress --config PG_USE_COPY YES
and I got this :
ERROR 1: PostgreSQL driver doesn't currently support database creation.
Please create database with the `createdb' command.
ERROR 1: PostgreSQL driver failed to create
Did I mess any steps ?
Running ogr2ogr so that the program name is followed by a comma "," gives rather similar error message for me on Windows.
ogr2ogr, -f "PostgreSQL" PG:"host=localhost port=5432 user='user' password='password' dbname='test'" -overwrite test.gpkg --config PG_USE_COPY YES
ERROR 1: PostgreSQL driver doesn't currently support database creation.
Please create database with the `createdb' command.
ERROR 1: PostgreSQL driver failed to create ,
Syntax ogr2ogr -f "PostgreSQL" ...
works fine.
I am not sure if this is some sort of bug. It seems that comma can follow the native Windows commands and then it means a separator between the command and the first parameter.
So this dir,/s,c:temp
does the same job than dir /s c:temp
.
See also https://stackoverflow.com/questions/47222968/what-does-the-comma-after-a-command-do. Anyway, commas do not work as parameter separators for gdal command line utilities. Use spaces.
Answered by user30184 on January 21, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP