[gdal-dev] Corrupted geopackage

Isabel Kiefer isabel at opengis.ch
Mon Feb 14 03:07:42 PST 2022


Hi Jukka,

Yes, exactly, there are only 78 entries in a dump to text file.

In the original .gpkg-file, the rtree_XX_geom table is completely empty (no
columns, no entries) - this must be where the problem comes from..

On Mon, Feb 14, 2022 at 11:59 AM Rahkonen Jukka (MML) <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> And when you .dump https://www.sqlitetutorial.net/sqlite-dump/ the
> damaged table into a text file, do you only get 78 insert entries into it?
>
>
>
> -Jukka-
>
>
>
> *Lähettäjä:* Isabel Kiefer <isabel at opengis.ch>
> *Lähetetty:* maanantai 14. helmikuuta 2022 12.53
> *Vastaanottaja:* Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi
> >
> *Kopio:* gdal-dev at lists.osgeo.org
> *Aihe:* Re: [gdal-dev] Corrupted geopackage
>
>
>
> Thanks for your suggestion, Jukka! I tried all the advice from
> stackoverflow. I can do ".recover", but get only the features that have
> been visible all along.
>
> In the original .gpkg, I cannot DROP the affected RTree-Index. It gives me
> the same disk malformed error. But that would also have been my initial
> idea...
>
>
>
> On Mon, Feb 14, 2022 at 9:26 AM Rahkonen Jukka (MML) <
> jukka.rahkonen at maanmittauslaitos.fi> wrote:
>
> Hi,
>
>
>
> Without being able to see your database it is hard to give more advice
> that
> https://stackoverflow.com/questions/18259692/how-to-recover-a-corrupt-sqlite3-database/18260642
> gives. Did you try all of them? Because the problem has something to do
> with the spatial index I would have a try be dropping it and repeating the
> suggested tricks.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* gdal-dev <gdal-dev-bounces at lists.osgeo.org> *Puolesta *Isabel
> Kiefer
> *Lähetetty:* maanantai 14. helmikuuta 2022 10.17
> *Vastaanottaja:* gdal-dev at lists.osgeo.org
> *Aihe:* [gdal-dev] Corrupted geopackage
>
>
>
> Hi everyone,
>
>
>
> I've a problem with a corrupted geopackage.
>
> It should contain a table with 694 entries, but only 78 are visible when
> opening the file with DB Browser for SQLite or QGIS. The table
> gpkg_ogr_contents says 694 though. When opening the .gpkg with a Notepad or
> similar, I can see that there are more than 78 entries.
>
>
>
> The error message in DB Browser is "database disk image is malformed in
> "PRAGMA "main".TABLE_INFO("rtree_XXX");" So it seems that there is a
> problem with the index of the concerned table.
>
>
>
> Does anyone know how to fix this? I tried
> https://stackoverflow.com/questions/18259692/how-to-recover-a-corrupt-sqlite3-database/18260642 but
> without success.
>
>
>
> Thanks in advance for your help!
>
> Isabel
>
>
>
> --
>
> Isabel Kiefer
>
> OPENGIS.ch
>
>
>
> isabel at opengis.ch
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220214/f9f88687/attachment.html>


More information about the gdal-dev mailing list