Re: [gdal-dev] Gdal/Proj builds on iOS

2022-09-19 Thread Peter Petrik
Hi Philippe,

iOS links all the stuff statically, so there are sometimes clashes of
symbols. You can look at how we build it for Mergin Maps here:
https://github.com/MerginMaps/input-sdk/tree/master/ios/recipes

Kind Regards,
Peter Petrík
CPO of Mergin Maps
LI , Mergin Maps






On Tue, Sep 20, 2022 at 8:31 AM Philippe Lelong 
wrote:

> Hi,
>
>
> We have a strange issue with our GDAL build for iOS (GDAL 3.4.1, PROJ6).
> Everything is fine when running on iOS 15 or 16, but when the same app is
> run on iOS 14 or 12 the app will not load at all (does not even reach
> main) and the only thing I can see in a console is this:
>
>
> dyld: Symbol not found:
> __ZTTNSt3__114basic_ifstreamIcNS_11char_traitsIc
>
>
> If I remove completely GDAL libs from the app it works, so I know this is
> a dependency coming for GDAL, and a grep "char_traits" in all our libs
> returns libgdal.a and libproj.a only.
>
>
> I can join more logs from configure or build if needed.
>
>
> Any idea what is wrong here ?
>
>
> Thanks
>
> Philippe.
> ___
> 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] Gdal/Proj builds on iOS

2022-09-19 Thread Philippe Lelong
Hi,


We have a strange issue with our GDAL build for iOS (GDAL 3.4.1, PROJ6). 
Everything is fine when running on iOS 15 or 16, but when the same app is run 
on iOS 14 or 12 the app will not load at all (does not even reach main) and the 
only thing I can see in a console is this:


dyld: Symbol not found: __ZTTNSt3__114basic_ifstreamIcNS_11char_traitsIc


If I remove completely GDAL libs from the app it works, so I know this is a 
dependency coming for GDAL, and a grep "char_traits" in all our libs returns 
libgdal.a and libproj.a only.


I can join more logs from configure or build if needed.


Any idea what is wrong here ?


Thanks

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


Re: [gdal-dev] (no subject)

2022-09-19 Thread Rahkonen Jukka
I have, it does not help if the journal mode is WAL. 

ogrinfo 
/vsicurl/"http://localhost:8060/SuomenHallinnollisetKuntajakopohjaisetAluejaot_2022_10k.gpkg";
 -ro
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.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: gdal-dev  Puolesta Andrew C 
Aitchison
Lähetetty: maanantai 19. syyskuuta 2022 17.18
Vastaanottaja: Moises Calzado 
Kopio: gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] (no subject)

On Mon, 19 Sep 2022, Moises Calzado via gdal-dev wrote:

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

'man ogrinfo' includes the option:
-roOpen the data source in read-only mode.

So, have you tried
ogrinfo -ro /vsicurl/MY_FILE_URL
?


-- 
Andrew C. Aitchison  Kendal, UK
and...@aitchison.me.uk 
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C19520984e6db45c9348708da9a4b1be2%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C637991944628587871%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vUEpaIT8yFEr%2Bc77371qb2NVR1K1YQNGbBcTBHU70P8%3D&reserved=0
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] (no subject)

2022-09-19 Thread Andrew C Aitchison

On Mon, 19 Sep 2022, Moises Calzado via gdal-dev wrote:


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?


'man ogrinfo' includes the option:
   -roOpen the data source in read-only mode.

So, have you tried
ogrinfo -ro /vsicurl/MY_FILE_URL
?


--
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] (no subject)

2022-09-19 Thread Rahkonen Jukka
Could you write a server side script that runs the ogrinfo command with r/w 
rights to the upload directory?

-Jukka Rahkonen-

Lähettäjä: Moises Calzado 
Lähetetty: maanantai 19. syyskuuta 2022 16.00
Vastaanottaja: Rahkonen Jukka 
Aihe: Re: [gdal-dev] (no subject)

Oh no! We use ogrinfo to check the file type, as these files are uploaded by 
other users into a GCS bucket.
We don't apply any change to these files, as we just check them with ogrinfo to 
perform other operations afterwards, so that's why we can't change the journal 
mode before executing the ogrinfo command.
If there's no way that we can complete this without modifying it, we'll think 
about an alternative solution!

Thanks so much for your help!

El lun, 19 sept 2022 a las 14:07, Rahkonen Jukka 
(mailto:jukka.rahko...@maanmittauslaitos.fi>>)
 escribió:
Hi,

What do you mean by processing? Http users cannot edit anything in any case. Do 
you edit the GPKG file locally at the same time? "Immutable" could be a 
solution if GDAL can support it somehow, but if the database is edited at the 
same it does not feel right. Taken from the SQLite documentation:
"immutable: The immutable parameter is a boolean query parameter that indicates 
that the database file is stored on read-only media. When immutable is set, 
SQLite assumes that the database file cannot be changed, even by a process with 
higher privilege, and so the database is opened read-only and all locking and 
change detection is disabled. Caution: Setting the immutable property on a 
database file that does in fact change can result in incorrect query results 
and/or SQLITE_CORRUPT errors. See also: SQLITE_IOCAP_IMMUTABLE."

Do you have some good reason not to change the pragma?

-Jukka Rahkonen-

Lähettäjä: Moises Calzado mailto:mcalz...@carto.com>>
Lähetetty: maanantai 19. syyskuuta 2022 14.46
Vastaanottaja: Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Aihe: Re: [gdal-dev] (no subject)

Hi Jukka,

Thanks so much for taking a look at this! We already tried to change the 
journal mode, and it works as expected, but we would like to know if there is 
any way of processing this files without changing anything on the file.

El lun, 19 sept 2022 a las 13:25, Rahkonen Jukka 
(mailto:jukka.rahko...@maanmittauslaitos.fi>>)
 escribió:
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 
mailto: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
[https://storage.googleapis.com/carto-it-files/signature/SDSC-2022-NY_Signature-mini.jpg]

Re: [gdal-dev] (no subject)

2022-09-19 Thread Rahkonen Jukka
Hi,

What do you mean by processing? Http users cannot edit anything in any case. Do 
you edit the GPKG file locally at the same time? "Immutable" could be a 
solution if GDAL can support it somehow, but if the database is edited at the 
same it does not feel right. Taken from the SQLite documentation:
"immutable: The immutable parameter is a boolean query parameter that indicates 
that the database file is stored on read-only media. When immutable is set, 
SQLite assumes that the database file cannot be changed, even by a process with 
higher privilege, and so the database is opened read-only and all locking and 
change detection is disabled. Caution: Setting the immutable property on a 
database file that does in fact change can result in incorrect query results 
and/or SQLITE_CORRUPT errors. See also: SQLITE_IOCAP_IMMUTABLE."

Do you have some good reason not to change the pragma?

-Jukka Rahkonen-

Lähettäjä: Moises Calzado 
Lähetetty: maanantai 19. syyskuuta 2022 14.46
Vastaanottaja: Rahkonen Jukka 
Aihe: Re: [gdal-dev] (no subject)

Hi Jukka,

Thanks so much for taking a look at this! We already tried to change the 
journal mode, and it works as expected, but we would like to know if there is 
any way of processing this files without changing anything on the file.

El lun, 19 sept 2022 a las 13:25, Rahkonen Jukka 
(mailto:jukka.rahko...@maanmittauslaitos.fi>>)
 escribió:
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 
mailto: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
[https://storage.googleapis.com/carto-it-files/signature/SDSC-2022-NY_Signature-mini.jpg]


--
Moises Calzado

Support Engineer

(US) +1 917 463 3232 | (ES) +34 911 165 823 | 
mcalz...@carto.com
[https://storage.googleapis.com/carto-it-files/signature/SDSC-2022-NY_Signature-mini.jpg]
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] (no subject)

2022-09-19 Thread Rahkonen Jukka
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  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
[https://storage.googleapis.com/carto-it-files/signature/SDSC-2022-NY_Signature-mini.jpg]
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] (no subject)

2022-09-19 Thread Moises Calzado via gdal-dev
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

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