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 su

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.

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 &TILED=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

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

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 2

[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 servi

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 relea

[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 t

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

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

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. -

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...@maanmitt

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

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 i

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 s

[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

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 dr

[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