Re: [gdal-dev] Can't open postgrest service with ogr2ogr (via QGIS)

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

I wonder if there could be something in the Accept headers that orginfo is 
using.  Ogrinfo seems to set headers “Accept: text/plain, application/json” but 
GeoJSON is now officially “application/geo+json”. I do not know the hierarchy 
of the MIME types and if “json” should include also the subtype “geo+json”.

I made a test with ogrinfo and  --config GDAL_HTTP_HEADER_FILE my_headers.txt. 
After this I could see from the logs this

Accept: application/geo+json
Accept: text/plain, application/json

By https://datatracker.ietf.org/doc/html/rfc2616/ I suppose this is correct and 
http server should concatenate Accept headers. However, the test was not 
successful so maybe there is something else going wrong.

-Jukka Rahkonen-


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


Re: [gdal-dev] Can't open postgrest service with ogr2ogr (via QGIS)

2022-02-14 Thread SIGéal

Thanks for your answer.

The url works fine in a browser.

Here is what "ogrinfo --debug on" returns :
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\gdal_ECW_JP2ECW.dll using GDALRegister_ECW_JP2ECW.
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\gdal_GEOR.dll using GDALRegister_GEOR.
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\gdal_HDF5.dll using GDALRegister_HDF5.
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\gdal_MG4Lidar.dll using GDALRegister_MG4Lidar.
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\gdal_MrSID.dll using GDALRegister_MrSID.
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\ogr_OCI.dll using RegisterOGROCI.
GDAL: Auto register C:\Program Files\QGIS 
3.16.16\bin\gdalplugins\ogr_SOSI.dll using RegisterOGRSOSI.

HTTP: Fetch(http://mydomain:3000/rpc/wod_geojson.json)
HTTP: libcurl/7.75.0 OpenSSL/1.1.1l zlib/1.2.11 WinIDN
HTTP: These HTTP headers were set: Accept: text/plain, application/json
ERROR 1: HTTP error code : 404
HTTP: Fetch(http://mydomain:3000/rpc/wod_geojson.json)
HTTP: These HTTP headers were set: Accept: text/plain, application/json
ERROR 1: HTTP error code : 404
FAILURE:
Unable to open datasource 
`http://sigeal.net:3000/rpc/wod_geojson.json' with the following 
drivers...


Weird

--
Christophe Damour

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


Hi,

Does http://mydomain:3000/rpc/wod_geojson.json return data if you send 
it with browser?  Re-run the ogrinfo command with “--debug on” and see 
if you can capture the http requests that ogrinfo sends.


-Jukka Rahkonen-

*Lähettäjä:*gdal-dev  *Puolesta *SIGéal
*Lähetetty:* maanantai 14. helmikuuta 2022 20.54
*Vastaanottaja:* gdal-dev@lists.osgeo.org
*Aihe:* [gdal-dev] Can't open postgrest service with ogr2ogr (via QGIS)

Hi list,

I have a PostgreSql stored procedure which returns a geojson feature 
collection created with json_build_object function. This web service 
opens fine in OpenLayers, however, when I try to open it in QGIS, with 
data source manager -> vector -> protocol -> geojson.


A similar REST service served with pg_featureserv, works well...


  Here are tests realised with curl and ogrinfo for failing
  postgrest service and working pg_featureserv services :


PostGrest


  curl answer :

|StatusCode    : 200|
|StatusDescription : OK|
|Content   : {123, 34, 116, 121...}|
|RawContent    : HTTP/1.1 200 OK|
|    Transfer-Encoding: chunked|
|    Content-Range: 0-0/*|
|    Vary: Accept-Encoding|
|    Content-Type: application/geo+json|
|    Date: Sun, 13 Feb 2022 07:35:55 GMT|
|    Server: postgrest/9.0.0|
||
|{"type" : ...|
|Headers   : {[Transfer-Encoding, chunked], [Content-Range, 
0-0/*], [Vary, Accept-Encoding], [Content-Type, |

|application/geo+json]...}|
|RawContentLength  : 430979|


  ogrinfo answer :

|ERROR 1: HTTP error code : 404|
|ERROR 1: HTTP error code : 404|
|FAILURE:|
|Unable to open datasource `http://mydomain:3000/rpc/wod_geojson.json' 
with the following drivers...|



pg_featureserv


  curl answer :

|StatusCode    : 200|
|StatusDescription : OK|
|Content   : {123, 34, 116, 121...}|
|RawContent    : HTTP/1.1 200 OK|
|    Transfer-Encoding: chunked|
|    Content-Type: application/geo+json|
|    Date: Sun, 13 Feb 2022 07:33:51 GMT|
||
|
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Po...|
|Headers   : {[Transfer-Encoding, chunked], [Content-Type, 
application/geo+json], [Date, Sun, 13 Feb 2022 |

|07:33:51 GMT]}|
|RawContentLength  : 4474|


  ogrinfo answer :

|INFO: Open of 
`http://mydomain:9000/functions/webmapod_mdarret/items.json'|

|  using driver `GeoJSON' successful.|
|1: items (Point)|

What could explain that 404 error for posgrest geojson web service ?

Thanks for any hint,

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


Re: [gdal-dev] Error InvalidTile when download a WMS

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

Have you tried to use the URL without =TRUE?  That vendor option is meant 
for clients like OpenLayers so that they can get cacheable tiles from standard 
GeoServer WMS 
https://geoserver-pdf.readthedocs.io/en/latest/services/wms/vendor.html

That such tiling and metatiling can work the requests must have a certain width 
and height. For regular WMS clients it is better not to use =TRUE.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: gdal-dev  Puolesta Elena Ruiz
Lähetetty: maanantai 14. helmikuuta 2022 17.42
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] Error InvalidTile when download a WMS

Hello, I'm trying to download a WMS image using gdla_translate from a server in 
Sweden: 
http://kartor.stockholm.se/bios/wms/app/baggis/web/WMS_STHLM_ORTOFOTO_2020, 
with EPSG:3011 (attached xml ) , but it returns me this error, I've searched 
the internet, but I can't find any entry that refers to it, could someone tell 
me what this error means and how I could solve it, thanks

>gdal_translate -of JPEG "C:\Users\elena\AppData\Local\Temp\tmpnuevo.xml" 
>"C:\Users\elena\AppData\Local\Temp\prueba.jpg"
Input file size is 766, 577
0ERROR 1: GDALWMS: The server returned exception code 'InvalidTile': Width(254) 
differs from tile width(256) ERROR 1: 
C:\Users\elena\AppData\Local\Temp\tmpnuevo.xml, band 1: IReadBlock failed at X 
offset 0, Y offset 0: GDALWMS: The server returned exception code 
'InvalidTile': Width(254) differs from tile width(256)

Regards,

-Mensaje original-
De: gdal-dev  En nombre de 
gdal-dev-requ...@lists.osgeo.org Enviado el: domingo, 12 de septiembre de 2021 
18:24
Para: gdal-dev@lists.osgeo.org
Asunto: gdal-dev Digest, Vol 208, Issue 17

Send gdal-dev mailing list submissions to
gdal-dev@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osgeo.org/mailman/listinfo/gdal-dev
or, via email, send a message with subject or body 'help' to
gdal-dev-requ...@lists.osgeo.org

You can reach the person managing the list at
gdal-dev-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of gdal-dev digest..."


Today's Topics:

   1. Get error handler user data when removing CPL Error Handler
  (Rajsekar Manokaran)
   2. Re: Get error handler user data when removing CPL Error
  Handler (Even Rouault)
   3. Re: Get error handler user data when removing CPL Error
  Handler (Rajsekar Manokaran)
   4. Re: Get error handler user data when removing CPL Error
  Handler (Sean Gillies)


--

Message: 1
Date: Sun, 12 Sep 2021 19:33:10 +0530
From: Rajsekar Manokaran 
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] Get error handler user data when removing CPL
Error Handler
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hi,

In the gdal rust bindings (https://github.com/georust/gdal), we're trying to 
facilitate the use of CPLSetErrorHandlerEx and related APIs.  While setting a 
handler, we may pass a heap allocated data pointer to the second argument, 
which is then read via the CPLGetErrorHandlerUserData in the handler and passed 
to the user.

However, while removing or setting another handler, we're unable to find a 
race-free method to get the associated user data of the previous handler.
This is needed to properly deallocate the memory.

Is there an atomic way to get both the previous handler (as returned by 
CPLSetErrorHandler), along with the associated user data?  The issue with 
making two calls, is that another thread might make changes in between the two 
calls.

We could synchronize in our API, but it still has the same issue if the user 
parallely used the C APIs directly or via a different interface.

Relevant PR in rust gdal bindings: https://github.com/georust/gdal/pull/215

-
Regards
-- next part --
An HTML attachment was scrubbed...
URL: 


--

Message: 2
Date: Sun, 12 Sep 2021 16:12:19 +0200
From: Even Rouault 
To: Rajsekar Manokaran , gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] Get error handler user data when removing CPL
Error Handler
Message-ID: <0637288e-2945-443c-5f02-39f318003...@spatialys.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi,

no there's no thread safe API to do what you want. You'd need a new function

CPLErrorHandler CPLSetErrorHandlerEx2( CPLErrorHandler pfnErrorHandlerNew, 
void* pUserData, void** ppOldUserData )

to do that.

But as you mention threads that might compete to set an error handler, using 
CPLSetErrorHandlerEx() is probably not the best strategy. You'd be better with 
CPLPushErrorHandler() / CPLPopErrorHandler() that only affects the current 
thread.

Even

Le 12/09/2021 ? 16:03, Rajsekar Manokaran a ?crit?:
> Hi,
>
> In 

Re: [gdal-dev] Error InvalidTile when download a WMS

2022-02-14 Thread Andrew C Aitchison

On Mon, 14 Feb 2022, Elena Ruiz wrote:


Hello, I'm trying to download a WMS image using gdla_translate from a server in 
Sweden: 
http://kartor.stockholm.se/bios/wms/app/baggis/web/WMS_STHLM_ORTOFOTO_2020, 
with EPSG:3011 (attached xml ) , but it returns me this error, I've searched 
the internet, but I can't find any entry that refers to it, could someone tell 
me what this error means and how I could solve it, thanks


gdal_translate -of JPEG "C:\Users\elena\AppData\Local\Temp\tmpnuevo.xml" 
"C:\Users\elena\AppData\Local\Temp\prueba.jpg"

Input file size is 766, 577
0ERROR 1: GDALWMS: The server returned exception code 'InvalidTile': Width(254) 
differs from tile width(256)
ERROR 1: C:\Users\elena\AppData\Local\Temp\tmpnuevo.xml, band 1: IReadBlock 
failed at X offset 0, Y offset 0: GDALWMS: The server returned exception code 
'InvalidTile': Width(254) differs from tile width(256)


If I change SizeX and SizeY to be multiples of 256 (BlockSizeX/Y)
< 766.5
< 577.5
---

768
512

then I get a picture.
However this probably changes the scale in ways you don't want, so the 
Uppper/LowerLeft/Right will need adjusting.


--
Andrew C. Aitchison Kendal, UK
and...@aitchison.me.uk
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Can't open postgrest service with ogr2ogr (via QGIS)

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

Does http://mydomain:3000/rpc/wod_geojson.json return data if you send it with 
browser?  Re-run the ogrinfo command with “--debug on” and see if you can 
capture the http requests that ogrinfo sends.

-Jukka Rahkonen-

Lähettäjä: gdal-dev  Puolesta SIGéal
Lähetetty: maanantai 14. helmikuuta 2022 20.54
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] Can't open postgrest service with ogr2ogr (via QGIS)

Hi list,

I have a PostgreSql stored procedure which returns a geojson feature collection 
created with json_build_object function. This web service opens fine in 
OpenLayers, however, when I try to open it in QGIS, with data source manager -> 
vector -> protocol -> geojson.

A similar REST service served with pg_featureserv, works well...
Here are tests realised with curl and ogrinfo for failing postgrest service and 
working pg_featureserv services :
PostGrest
curl answer :

StatusCode: 200

StatusDescription : OK

Content   : {123, 34, 116, 121...}

RawContent: HTTP/1.1 200 OK

Transfer-Encoding: chunked

Content-Range: 0-0/*

Vary: Accept-Encoding

Content-Type: application/geo+json

Date: Sun, 13 Feb 2022 07:35:55 GMT

Server: postgrest/9.0.0



{"type" : ...

Headers   : {[Transfer-Encoding, chunked], [Content-Range, 0-0/*], 
[Vary, Accept-Encoding], [Content-Type,

application/geo+json]...}

RawContentLength  : 430979

ogrinfo answer :

ERROR 1: HTTP error code : 404

ERROR 1: HTTP error code : 404

FAILURE:

Unable to open datasource `http://mydomain:3000/rpc/wod_geojson.json' with the 
following drivers...

pg_featureserv
curl answer :

StatusCode: 200

StatusDescription : OK

Content   : {123, 34, 116, 121...}

RawContent: HTTP/1.1 200 OK

Transfer-Encoding: chunked

Content-Type: application/geo+json

Date: Sun, 13 Feb 2022 07:33:51 GMT




{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Po...

Headers   : {[Transfer-Encoding, chunked], [Content-Type, 
application/geo+json], [Date, Sun, 13 Feb 2022

07:33:51 GMT]}

RawContentLength  : 4474

ogrinfo answer :

INFO: Open of `http://mydomain:9000/functions/webmapod_mdarret/items.json'

  using driver `GeoJSON' successful.

1: items (Point)

What could explain that 404 error for posgrest geojson web service ?

Thanks for any hint,

--

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


[gdal-dev] Can't open postgrest service with ogr2ogr (via QGIS)

2022-02-14 Thread SIGéal

Hi list,

I have a PostgreSql stored procedure which returns a geojson feature 
collection created with json_build_object function. This web service 
opens fine in OpenLayers, however, when I try to open it in QGIS, with 
data source manager -> vector -> protocol -> geojson.


A similar REST service served with pg_featureserv, works well...


 Here are tests realised with curl and ogrinfo for failing
 postgrest service and working pg_featureserv services :


   PostGrest


 curl answer :

|StatusCode : 200 StatusDescription : OK Content : {123, 34, 116, 
121...} RawContent : HTTP/1.1 200 OK Transfer-Encoding: chunked 
Content-Range: 0-0/* Vary: Accept-Encoding Content-Type: 
application/geo+json Date: Sun, 13 Feb 2022 07:35:55 GMT Server: 
postgrest/9.0.0 {"type" : ... Headers : {[Transfer-Encoding, chunked], 
[Content-Range, 0-0/*], [Vary, Accept-Encoding], [Content-Type, 
application/geo+json]...} RawContentLength : 430979 |



 ogrinfo answer :

|ERROR 1: HTTP error code : 404 ERROR 1: HTTP error code : 404 FAILURE: 
Unable to open datasource `http://mydomain:3000/rpc/wod_geojson.json' 
with the following drivers... |



   pg_featureserv


 curl answer :

|StatusCode : 200 StatusDescription : OK Content : {123, 34, 116, 
121...} RawContent : HTTP/1.1 200 OK Transfer-Encoding: chunked 
Content-Type: application/geo+json Date: Sun, 13 Feb 2022 07:33:51 GMT 
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Po... 
Headers : {[Transfer-Encoding, chunked], [Content-Type, 
application/geo+json], [Date, Sun, 13 Feb 2022 07:33:51 GMT]} 
RawContentLength : 4474 |



 ogrinfo answer :

|INFO: Open of 
`http://mydomain:9000/functions/webmapod_mdarret/items.json' using 
driver `GeoJSON' successful. 1: items (Point) |


What could explain that 404 error for posgrest geojson web service ?

Thanks for any hint,

--
Christophe Damour
___
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


[gdal-dev] Error InvalidTile when download a WMS

2022-02-14 Thread Elena Ruiz
Hello, I'm trying to download a WMS image using gdla_translate from a server in 
Sweden: 
http://kartor.stockholm.se/bios/wms/app/baggis/web/WMS_STHLM_ORTOFOTO_2020, 
with EPSG:3011 (attached xml ) , but it returns me this error, I've searched 
the internet, but I can't find any entry that refers to it, could someone tell 
me what this error means and how I could solve it, thanks

>gdal_translate -of JPEG "C:\Users\elena\AppData\Local\Temp\tmpnuevo.xml" 
>"C:\Users\elena\AppData\Local\Temp\prueba.jpg"
Input file size is 766, 577
0ERROR 1: GDALWMS: The server returned exception code 'InvalidTile': Width(254) 
differs from tile width(256)
ERROR 1: C:\Users\elena\AppData\Local\Temp\tmpnuevo.xml, band 1: IReadBlock 
failed at X offset 0, Y offset 0: GDALWMS: The server returned exception code 
'InvalidTile': Width(254) differs from tile width(256)

Regards,

-Mensaje original-
De: gdal-dev  En nombre de 
gdal-dev-requ...@lists.osgeo.org
Enviado el: domingo, 12 de septiembre de 2021 18:24
Para: gdal-dev@lists.osgeo.org
Asunto: gdal-dev Digest, Vol 208, Issue 17

Send gdal-dev mailing list submissions to
gdal-dev@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osgeo.org/mailman/listinfo/gdal-dev
or, via email, send a message with subject or body 'help' to
gdal-dev-requ...@lists.osgeo.org

You can reach the person managing the list at
gdal-dev-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of gdal-dev digest..."


Today's Topics:

   1. Get error handler user data when removing CPL Error Handler
  (Rajsekar Manokaran)
   2. Re: Get error handler user data when removing CPL Error
  Handler (Even Rouault)
   3. Re: Get error handler user data when removing CPL Error
  Handler (Rajsekar Manokaran)
   4. Re: Get error handler user data when removing CPL Error
  Handler (Sean Gillies)


--

Message: 1
Date: Sun, 12 Sep 2021 19:33:10 +0530
From: Rajsekar Manokaran 
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] Get error handler user data when removing CPL
Error Handler
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hi,

In the gdal rust bindings (https://github.com/georust/gdal), we're trying to 
facilitate the use of CPLSetErrorHandlerEx and related APIs.  While setting a 
handler, we may pass a heap allocated data pointer to the second argument, 
which is then read via the CPLGetErrorHandlerUserData in the handler and passed 
to the user.

However, while removing or setting another handler, we're unable to find a 
race-free method to get the associated user data of the previous handler.
This is needed to properly deallocate the memory.

Is there an atomic way to get both the previous handler (as returned by 
CPLSetErrorHandler), along with the associated user data?  The issue with 
making two calls, is that another thread might make changes in between the two 
calls.

We could synchronize in our API, but it still has the same issue if the user 
parallely used the C APIs directly or via a different interface.

Relevant PR in rust gdal bindings: https://github.com/georust/gdal/pull/215

-
Regards
-- next part --
An HTML attachment was scrubbed...
URL: 


--

Message: 2
Date: Sun, 12 Sep 2021 16:12:19 +0200
From: Even Rouault 
To: Rajsekar Manokaran , gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] Get error handler user data when removing CPL
Error Handler
Message-ID: <0637288e-2945-443c-5f02-39f318003...@spatialys.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi,

no there's no thread safe API to do what you want. You'd need a new function

CPLErrorHandler CPLSetErrorHandlerEx2( CPLErrorHandler pfnErrorHandlerNew, 
void* pUserData, void** ppOldUserData )

to do that.

But as you mention threads that might compete to set an error handler, using 
CPLSetErrorHandlerEx() is probably not the best strategy. You'd be better with 
CPLPushErrorHandler() / CPLPopErrorHandler() that only affects the current 
thread.

Even

Le 12/09/2021 ? 16:03, Rajsekar Manokaran a ?crit?:
> Hi,
>
> In the gdal rust bindings (https://github.com/georust/gdal 
> ), we're trying to facilitate the use 
> of CPLSetErrorHandlerEx and related APIs.? While setting a handler, we 
> may pass a heap allocated data pointer to the second argument, which 
> is then read via the CPLGetErrorHandlerUserData in the handler and 
> passed to the user.
>
> However, while removing or setting another handler, we're unable to 
> find a race-free method to get the associated user data of the 
> previous handler.?? This is needed to properly deallocate the memory.
>
> Is there an atomic way to get both the 

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


 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
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
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 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
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 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] I'd like to unsubscribe

2022-02-14 Thread Alexandre Neto
Hi,

If you follow the link at the bottom of you message, you will find
instructions on how to unsubscribe.

Alexandre Neto

A segunda, 14/02/2022, 08:29, Ulrich Egger via gdal-dev <
gdal-dev@lists.osgeo.org> escreveu:

> Dear maintainer of this E-Mail list,
>
>
>
> I would like to unsubscribe. I subscribed because I thought it is
> necessary to ask a question.
>
>
>
> Best regards,
>
> Ulrich Egger
>
>
>
>
>
> Dipl. Hydrol. Ulrich Egger
>
> Institut für technisch-wissenschaftliche Hydrologie GmbH
>
> Engelbosteler Damm 22
>
> D-30167 Hannover
>
> Tel. +49-761-48087174
>
> E-Mail: u.eg...@itwh.de
>
>
>
> Institut für technisch-wissenschaftliche Hydrologie GmbH, Hannover,
>
> HRB Hannover 51869, Geschäftsführer: Thomas Beeneken, Martin Lindenberg,
> Dr. Stefan Schneider
>
>
> ___
> 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


[gdal-dev] I'd like to unsubscribe

2022-02-14 Thread Ulrich Egger via gdal-dev
Dear maintainer of this E-Mail list,

I would like to unsubscribe. I subscribed because I thought it is necessary to 
ask a question.

Best regards,
Ulrich Egger


Dipl. Hydrol. Ulrich Egger
Institut für technisch-wissenschaftliche Hydrologie GmbH
Engelbosteler Damm 22
D-30167 Hannover
Tel. +49-761-48087174
E-Mail: u.eg...@itwh.de

Institut für technisch-wissenschaftliche Hydrologie GmbH, Hannover,
HRB Hannover 51869, Geschäftsführer: Thomas Beeneken, Martin Lindenberg, Dr. 
Stefan Schneider

___
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

___
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