PostgreSQL – Uploading File Geodatabase to Database Schema

file-geodatabaseogr2ogrpostgresql

I'm attempting to load a file gdb to an alternate postgresql database schema.
The process works OK with the following but uploads to the public schema.

ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=GIS user=postgres password=xxxxxx" "C:\test.gdb

Can anyone assist?

Best Answer

You can add into your connection string the option ACTIVE_SCHEMA=your_schema

ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=GIS user=postgres password=xxxxxx ACTIVE_SCHEMA=your_schema" "C:\test.gdb

All other options can be found in the driver documentation: http://www.gdal.org/drv_pg.html

Related Question