I am trying to upload a .gdb data into my postgres database using og2ogr. If I upload whole database by command
ogr2ogr -f "PostgreSQL" PG:"" "test.gdb" -nln gdb_test -nlt PROMOTE_TO_MULTI it creates a single table gdb_test,
it imports first layer into that and then gives errors
Warning 1: Geometry to be inserted is of type Multi Line String, whereas the layer geometry type is Multi Polygon. Insertion is likely to fail ERROR 1: COPY statement failed. ERROR: Geometry type (MultiLineString) does not match column type (MultiPolygon) .
I guess it is because other layers are of different geometry types. Is there a way to upload whole .gdb with multiple layers, each different geometry type to a postgres into separate tables?
ogrinfo on my .gdb is following:
1: Ned (Multi Polygon)
2: Str (Multi Line String)
3: Vod (Multi Line String)
4: Kan (Multi Line String)
5: Red (Multi Line String)
6: Uch (Multi Polygon)
Update: I'll leave the question unanswered, if anyone knows how to upload whole package automatically.