[gdal-dev] ogr2ogr - exclude table option?
Andreas Neumann
a.neumann at carto.net
Wed Nov 30 12:45:51 PST 2016
Thanks Even!
The VACUUM command worked and indeed the file is now much smaller.
Thank you for adding this information to the Geopackage documentation!
I wasn't aware that I could run any SQL command through ogrinfo. Nice!
Greetings,
Andreas
Am 30.11.2016 um 21:24 schrieb Even Rouault:
>
> On mercredi 30 novembre 2016 21:11:14 CET Andreas Neumann wrote:
>
> > 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?
>
> You actually mentionned the appropriate SQL command: VACUUM :-)
>
> I've just added this new paragraph to http://gdal.org/drv_geopackage.html:
>
> """When dropping a table, or removing records from tables, the space they
>
> occupied is not immediately released and kept in the pool of file
> pages that
>
> SQLite may reuse later. If you need to shrink the file to its minimum
> size,
>
> you need to issue an explicit "VACUUM" SQL request. Note that this will
>
> result in a full rewrite of the file."""
>
> Even
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161130/a05eb41f/attachment.html>
More information about the gdal-dev
mailing list