Re: [gdal-dev] Corrupted geopackage

2022-02-16 Thread Jonathan Moules

Hi Isabel,

If you don't get an answer here, you may want to try the SQLite forum: 
https://sqlite.org/forum/forum - If anyone knows, it'll be someone there.


Maybe also of interest: https://sqlite.org/howtocorrupt.html#cfgerr

Cheers,

Jonathan

On 2022-02-14 08:17, Isabel Kiefer wrote:

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

isa...@opengis.ch


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Mark Johnson via gdal-dev
On Mon, 14 Feb 2022, 14:11 Mark Johnson,  wrote:

> You should try rebuild the SpatialIndex.
>
> Spatialite offers gpkgAddSpatialIndex for a new Index.
>
> For its own format there are repair functions.
>

>SQL functions reference list
>- spatialite-sql-latest.html
> - will always lead to the released latest version
>
>- https://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.html
> - SQL functions for Spatial-MetaData and Spatial-Index handling
> - https://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.html#p16
> - CreateSpatialIndex
> - DisableSpatialIndex
> - CheckSpatialIndex
> - RecoverSpatialIndex
> - SQL functions implementing OGC GeoPackage compatibility
> - https://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.html#p16gpkg
> - gpkgAddSpatialIndex
>
>- The 'Syntax' column: the command syntax
> - gpkgAddSpatialIndex(table_name String, geometry_column_name String) :
void
>- The 'Summary' column: further information
>

>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Mark Johnson via gdal-dev
You should try rebuild the SpatialIndex.

Spatialite offers gpkgAddSpatialIndex for a new Index.

For its own format there are repair functions.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Isabel Kiefer
Thanks a lot for your help Jukka and Even. While I can drop the related
triggers, I cannot drop the index table and its shadow tables - it always
gives the database disk image malformed message.
ogr2ogr had worked - as you said - for the visible data. I guess the other
data is lost for good...

On Mon, Feb 14, 2022 at 1:25 PM Even Rouault 
wrote:

> I would just suggest using ogr2ogr to generate a new 'clean' GPKG file
> from the corrupted one. This will not recover lost data, but at least
> you'll get something sane. Well I should say "structurally" sane. depending
> on how the corruption happened you could get also get corrupted content in
> the data that tools can't detect (there's no checksum mechanism at the row
> level in sqlite)
> Le 14/02/2022 à 12:51, Rahkonen Jukka (MML) a écrit :
>
> Hi,
>
>
>
> Maybe you can drop the rtree tables if you first drop the rtree_xxx
> triggers that belong to the data table. There are probably 6 of them. I
> don’t know if it helps, though. rtreecheck() https://sqlite.org/rtree.html
> is probably useless because you know already that the index is corrupted.
>
>
>
> -Jukka-
>
>
>
> *Lähettäjä:* Isabel Kiefer  
> *Lähetetty:* maanantai 14. helmikuuta 2022 13.08
> *Vastaanottaja:* Rahkonen Jukka (MML)
> 
> ; gdal-dev@lists.osgeo.org
> *Aihe:* Re: [gdal-dev] Corrupted geopackage
>
>
>
> 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.rahko...@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 
> *Lähetetty:* maanantai 14. helmikuuta 2022 12.53
> *Vastaanottaja:* Rahkonen Jukka (MML)  >
> *Kopio:* gdal-dev@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.rahko...@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  *Puolesta *Isabel
> Kiefer
> *Lähetetty:* maanantai 14. helmikuuta 2022 10.17
> *Vastaanottaja:* gdal-dev@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
>
>
>
> isa...@opengis.ch
>
>
>
>
> ___
> gdal-dev mailing 
> listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Even Rouault
I would just suggest using ogr2ogr to generate a new 'clean' GPKG file 
from the corrupted one. This will not recover lost data, but at least 
you'll get something sane. Well I should say "structurally" sane. 
depending on how the corruption happened you could get also get 
corrupted content in the data that tools can't detect (there's no 
checksum mechanism at the row level in sqlite)


Le 14/02/2022 à 12:51, Rahkonen Jukka (MML) a écrit :


Hi,

Maybe you can drop the rtree tables if you first drop the rtree_xxx 
triggers that belong to the data table. There are probably 6 of them. 
I don’t know if it helps, though. rtreecheck() 
https://sqlite.org/rtree.html is probably useless because you know 
already that the index is corrupted.


-Jukka-

*Lähettäjä:* Isabel Kiefer 
*Lähetetty:* maanantai 14. helmikuuta 2022 13.08
*Vastaanottaja:* Rahkonen Jukka (MML) 
; gdal-dev@lists.osgeo.org

*Aihe:* Re: [gdal-dev] Corrupted geopackage

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) 
 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 
*Lähetetty:* maanantai 14. helmikuuta 2022 12.53
*Vastaanottaja:* Rahkonen Jukka (MML)

*Kopio:* gdal-dev@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)
 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 
*Puolesta *Isabel Kiefer
*Lähetetty:* maanantai 14. helmikuuta 2022 10.17
*Vastaanottaja:* gdal-dev@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

<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

isa...@opengis.ch


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Rahkonen Jukka (MML)
Hi,

Maybe you can drop the rtree tables if you first drop the rtree_xxx triggers 
that belong to the data table. There are probably 6 of them. I don’t know if it 
helps, though. rtreecheck() https://sqlite.org/rtree.html is probably useless 
because you know already that the index is corrupted.

-Jukka-

Lähettäjä: Isabel Kiefer 
Lähetetty: maanantai 14. helmikuuta 2022 13.08
Vastaanottaja: Rahkonen Jukka (MML) ; 
gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] Corrupted geopackage

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) 
mailto:jukka.rahko...@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 mailto:isa...@opengis.ch>>
Lähetetty: maanantai 14. helmikuuta 2022 12.53
Vastaanottaja: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Kopio: gdal-dev@lists.osgeo.org<mailto:gdal-dev@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) 
mailto:jukka.rahko...@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 
mailto:gdal-dev-boun...@lists.osgeo.org>> 
Puolesta Isabel Kiefer
Lähetetty: maanantai 14. helmikuuta 2022 10.17
Vastaanottaja: gdal-dev@lists.osgeo.org<mailto:gdal-dev@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

isa...@opengis.ch<mailto:isa...@opengis.ch>

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Isabel Kiefer
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.rahko...@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 
> *Lähetetty:* maanantai 14. helmikuuta 2022 12.53
> *Vastaanottaja:* Rahkonen Jukka (MML)  >
> *Kopio:* gdal-dev@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.rahko...@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  *Puolesta *Isabel
> Kiefer
> *Lähetetty:* maanantai 14. helmikuuta 2022 10.17
> *Vastaanottaja:* gdal-dev@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
>
>
>
> isa...@opengis.ch
>
>
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Rahkonen Jukka (MML)
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 
Lähetetty: maanantai 14. helmikuuta 2022 12.53
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: gdal-dev@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) 
mailto:jukka.rahko...@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 
mailto:gdal-dev-boun...@lists.osgeo.org>> 
Puolesta Isabel Kiefer
Lähetetty: maanantai 14. helmikuuta 2022 10.17
Vastaanottaja: gdal-dev@lists.osgeo.org<mailto:gdal-dev@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

isa...@opengis.ch<mailto:isa...@opengis.ch>

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Isabel Kiefer
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.rahko...@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  *Puolesta *Isabel
> Kiefer
> *Lähetetty:* maanantai 14. helmikuuta 2022 10.17
> *Vastaanottaja:* gdal-dev@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
>
>
>
> isa...@opengis.ch
>
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Corrupted geopackage

2022-02-14 Thread Rahkonen Jukka (MML)
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  Puolesta Isabel Kiefer
Lähetetty: maanantai 14. helmikuuta 2022 10.17
Vastaanottaja: gdal-dev@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

isa...@opengis.ch<mailto:isa...@opengis.ch>

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Corrupted geopackage

2022-02-14 Thread Isabel Kiefer
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

isa...@opengis.ch
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev