Hi Andreas, > > I am, for the first time trying to append additional tables with ogr2ogr > to an existing Geopackage file and have questions: > > ogr2ogr -progress -lco SPATIAL_INDEX=YES -f GPKG av_1700_lv03.gpkg > PG:'dbname=publikation host=localhost schemas=av_1700' -sql "SELECT > t_id, t_ili_tid, geom_03, bfs_nr, gemeinde, bodenbedeckungsart, > bodenbedeckungs_flaeche, gebaeudenummer, gwr_egid, objekt_name FROM > av_1700.bb_bodenbedeckung" > > ogr2ogr -progress -append -f GPKG av_1700_lv03.gpkg > PG:'dbname=publikation host=localhost schemas=av_1700' -sql "SELECT > t_id, t_ili_tid, geom_03, bfs_nr, gemeinde, linienart, bobeart_links, > bobeart_rechts FROM av_1700.bb_bodenbedeckung_kanten" > > ----------------- > > First question: > > is the -append option enough or do I also need the -update option?
Yes -append is enough. It implies -update. But -append is for appending features to an existing table. If you need to create a new table, you just need -update. In your above case, you must be careful. The name of a SQL result layer depends on the driver. I nthe GPKG driver, it is always "sql_statement". You might want to rename it to something more useful with -nln new_layer_name, > > ----------------- > > Second question: > > I get warnings: > > Warning 1: Layer sql_statement relies on the 'gpkg_geom_COMPOUNDCURVE' > (GeoPackage 1.0 Specification Annex J) extension that should be > implemented for safe write-support, but is not currently. Update of that > layer are strongly discouraged to avoid corruption. > Warning 1: Layer sql_statement relies on the 'gpkg_geom_CURVEPOLYGON' > (GeoPackage 1.0 Specification Annex J) extension that should be > implemented for safe write-support, but is not currently. Update of that > layer are strongly discouraged to avoid corruption. > > Can I safely ignore these messages? Or is there a creation option for > the first table that enables this extension? Which GDAL version is this ? It looks like the issue of https://trac.osgeo.org/gdal/ticket/6402 So this should be fixed in GDAL 2.0.3 or GDAL >= 2.1.0 (the warning can be ignored, but you should upgrade to a more recent version so that the extension is properly registered as read-write) Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
