I have multiple PostGIS tables I want to export to a single gpkg file. The tables have identical schema, and identical geometries -- the numerical attributes differ. How do I create a gpkg file, using ogr2ogr with these multiple tables, without duplicating the identical geometries? I need to use ogr2ogr because this needs to be scripted.
My question is related to this existing question Saving duplicate geometry layers into a geopackage? but I don't see a solution using ogr2ogr.
I am using the
-update flag per the accepted answer here: Saving duplicate geometry layers into a geopackage?
Is there a way to tell ogr2ogr / gpkg to not duplicate the geometries? Or are the only solutions to either have all attributes in a single feature table (many many columns), or have 1 feature table and many attribute tables, and then perform joins in an application when opening the gpkg?