[GRASS-user] GeoPackage and multiple tables

Markus Metz markus.metz.giswork at gmail.com
Sun Mar 17 11:13:33 PDT 2019


On Sun, Mar 17, 2019 at 6:31 PM Saber Razmjooei <
saber.razmjooei at lutraconsulting.co.uk> wrote:
>
> You might need to run VACUUM from gdal tools:
>
> ogrinfo -sql "VACUUM" pal.gpkg

VACUUM might help a bit, but GeoPackage file sizes are indeed confusing. In
my experience, compressing GeoPackage files can usually reduce file size
substantially.

Markus M
>
> Regards
> Saber
>
> On Sun, 17 Mar 2019 at 17:16, Ken Mankoff <mankoff at gmail.com> wrote:
>>
>>
>> On 2019-03-17 at 10:03 -0700, Ken Mankoff <mankoff at gmail.com> wrote...
>> > After learning from Markus & Moritz I see that the GPKG files are as
>> > they should be - vector features are not in triplicate. I think there
>> > are some strange QGIS import issues where it imports everything 3x but
>> > this is not a GRASS issue.
>>
>> Actually, I am still confused about something with the file sizes. The
data/metadata all appear correct. But if I export a three-layer vector w/
three tables 1x, the GPGK file is 12 MB and contains 1 table. It is missing
two tables. If I then export each of the databases associated with each of
the layers, they are 0.2 MB. If export the vector 3x, once per layer, with
update, as advised earlier in this thread, the resulting GPKG is ~34 MB, or
~3x as large as I would expect it to be.
>>
>> v.out.ogr -c input=pal output=pal_all.gpkg --o # 12 MB, but only layer1
table
>> db.out.ogr input=pal output=l1.csv layer=1 # 7.5k
>> db.out.ogr input=pal output=l2.csv layer=2 # 124K
>> db.out.ogr input=pal output=l3.csv layer=3 # 85k
>>
>> v.out.ogr -c input=pal output_layer=tbl2_points output=pal.gpkg layer=1
--o
>> v.out.ogr -c input=pal output_layer=tbl2_areas output=pal.gpkg layer=2
-u --o
>> v.out.ogr -c input=pal output_layer=tbl2_lines output=pal.gpkg layer=3
-u --o
>> # pal.gpg is 34 MB, with 3 tables.
>>
>> Why does adding two additional (small) tables increase the size of the
resulting geopackage by 100s of times the size of the tables?
>>
>>   -k.
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
> --
> Saber Razmjooei
> www.lutraconsulting.co.uk
> +44 (0)7568 129733
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190317/2aef4f30/attachment.html>


More information about the grass-user mailing list