Hi Even,
Thanks. I will use the 'ogrinfo your.gpkg -sql "DROP TABLE table_name"'
trick for now.
One thing though: I noticed that the filesize doesn't really shrink. Is
there a way to compact/vacuum the geopackage after removal of the table?
The table I remove is rather big - so it would have quite an effect on
the filesize.
----------
On the blacklist / exclude table options for table transfer from Postgis
to GPKG - can you please send me an estimate/quote offlist? Depending on
how much this costs, I would be interested in paying for that.
Thanks a lot,
Andreas
Am 30.11.2016 um 18:05 schrieb Even Rouault:
On mercredi 30 novembre 2016 16:21:42 CET Neumann, Andreas wrote:
> Hi,
>
> I want to convert a whole Postgis schema to a geopackage. This works
> fine with
>
> ogr2ogr -f GPKG av_1700.gpkg PG:'dbname=dbname host=localhost
> schemas=schemaname'
>
> Now - my problem is that the schema contains 64 tables and I want to
> convert all tables except one table.
>
> Is there a trick with an exclude option? I know that I can list all
> tables that I want to convert in the sense of a white list with
> 'tables=tab1,tab2,tab3', etc. - but this is complicated for this many
> tables.
>
> I hope that there is / could be some black list option - or the
> possibility of specifying a pattern for selection the tables to be
> converted.
Andreas,
There's no such option (there's no real technical hurdle if one would
want to add one, but one can wonder how common this use case is)
The easiest way currently would be to drop the unwished tables after
the import : ogrinfo your.gpkg -sql "DROP TABLE table_name". Since
GDAL 2.1.2, this not only drops the table but also all references to
it in GPKG system tables.
You could also do a tiny script to list the tables and remove the
one(s) you don't want from the list before calling ogr2ogr /
gdal.VectorTranslate()
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev