Hi,

Read https://www.sqlite.org/wal.html. I suggest to change the journal mode into 
the default mode before inserting the GPKG file into server. How to: Execute 
"PRAGMA journal_mode=DELETE". I tested that it will now work:

INFO: Open of 
`/vsicurl/http://localhost:8060/SuomenHallinnollisetKuntajakopohjaisetAluejaot_2022_10k.gpkg'
      using driver `GPKG' successful.
1: Aluehallintovirasto
2: Valtakunta
3: Maakunta
4: Kunta

If the GPKG file in WAL mode is already placed on the server it might be 
possible to open it somehow as "immutable". I do not know how to do that with 
GDAL.

-Jukka Rahkonen-


Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Moises Calzado 
via gdal-dev
Lähetetty: maanantai 19. syyskuuta 2022 14.08
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] (no subject)


Hello everyone,

We're performing some tests with ogrinfo trying to read GPKG files, and we're 
facing some issues executing the command with remote GPKG files in WAL mode. As 
can be checked in the following command output, ogr fails while reading the 
file content:

ERROR: Error: Command failed: ogrinfo /vsicurl/MY_FILE_URL has GPKG 
application_id, but non conformant file extension ERROR 1: unable to open 
database file: this file is a WAL-enabled database. It cannot be opened because 
it is presumably read-only or in a read-only directory. ERROR 1: Only read-only 
mode is supported for /vsicurl

What is strange here is that the same file works correctly if we execute the 
command using the downloaded file.

Is there any way we can execute the command using a remote file?

Thanks so much in advance,
Kind regards!
--
Moises Calzado

Support Engineer

(US) +1 917 463 3232 | (ES) +34 911 165 823 | 
mcalz...@carto.com<mailto:mcalz...@carto.com>
[https://storage.googleapis.com/carto-it-files/signature/SDSC-2022-NY_Signature-mini.jpg]<https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fspatial-data-science-conference.com%2F2022%2Fnewyork%2F&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C59c27b74927549e7612f08da9a2f47d9%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C637991825108785824%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hAhLefsE2N2%2ByrpGgP%2F%2FH1Hwqi9WeTUK6Onk10RkbsM%3D&reserved=0>
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to