I am having an issue when trying to append shapefile data to an existing table in my PostGIS database using ogr2ogr. The existing table has multiple geometry fields. When I append the shapefile the attribute data uploads fine but the geometry fields are all NULL. I have tested out the upload appending to a new table with only one geometry field and it works fine, but when there are multiple fields it just fails to input any geometry information.
My command looks something like:
ogr2ogr.exe -update -append \
-f PostgreSQL "PG:host=xxxx port=5432 dbname=yyyy password=***** user=zzz" "C:\xxx.shp" \
-nlt PROMOTE_TO_MULTI \
-lco GEOMETRY_NAME=geom \
-nln schema.tablename \
-a_srs EPSG:3857
How do I make sure my geometry information is also appended?
I have tried using the sql argument to select columns and rename the geometry column to match the one I want the data in, but nothing has worked so far. Any layer creation options are ignored as it is an append.