Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Even Rouault via gdal-dev
Hi, I don't know anything about Julia but I'd suspect that there must be something particularly slow in the way it interacts with C. For comparison,  "time python3 swig/python/gdal-utils/osgeo_utils/samples/ogrinfo.py /vsigzip//vsicurl/https://bulk.meteostat.net/v2/hourly/2022/08554.csv.gz -

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Joaquim Manuel Freire Luís via gdal-dev
To complement what Eric said, here’s the ‘getfield’ function (This code was taken from ArchGDAL so we are talking of the same thing) https://github.com/GenericMappingTools/GMT.jl/blob/master/src/gdal.jl#L2161 From: gdal-dev On Behalf Of Erik Schnetter via gdal-dev Sent: Tuesday, June 24, 2025

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Joaquim Manuel Freire Luís via gdal-dev
Good to see other Julia users around 😊 From: Erik Schnetter Sent: Tuesday, June 24, 2025 9:32 PM To: Joaquim Manuel Freire Luís Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once Joaquim Thanks for the notice. I was getting very worried that the many smal

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Erik Schnetter via gdal-dev
Joaquim Thanks for the notice. I was getting very worried that the many small allocations (a few per value) and finalizers were somehow incredibly expensive. Apparently they do have a cost, but just a reasonable one. -erik > On Jun 24, 2025, at 16:28, Joaquim Manuel Freire Luís wrote: > > To

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Joaquim Manuel Freire Luís via gdal-dev
To finish this. The problem was in the GMT.jl wrapper. Short history. 1. Julia 1.9 started to crash with some GMT.jl tests 2. Opened an issue (https://github.com/JuliaLang/julia/issues/47003) but got little-to-none help 3. Found a patch for the situation (that seemed innocuous) https://

[gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Joaquim Manuel Freire Luís via gdal-dev
Hi, Im trying to read files like https://bulk.meteostat.net/v2/hourly/2022/08554.csv.gz in my Julia wrapper. The point is that, although I'm kind off succeeding, the hole operation is very slow. What I'm doing (code not committed yet so can't post a link) is to read like this layer = getlayer(

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Joaquim Manuel Freire Luís via gdal-dev
Erik, BINGO. Since, in this case, I know that the field type is string, if I replace the calls to getfield(…) to OGR_F_GetFieldAsString(f.ptr, k) I get these timings (on a local file) julia> @time gdalread("/vsigzip/C:/TMP/.meteostat/cache/hourly/2025/08554.csv.gz"); 0.046272 seconds (56.04

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Joaquim Manuel Freire Luís via gdal-dev
Even In case you are spending any time on this, please do not. It this time I’m persuaded that this is a Juia wrapper(s) issue but have no time to investigating it much more right now. From: Joaquim Manuel Freire Luís Sent: Tuesday, June 24, 2025 5:52 PM To: Joaquim Manuel Freire Luís ; Erik S

Re: [gdal-dev] Read a /vsigzip/ csv.gz all at once

2025-06-24 Thread Erik Schnetter via gdal-dev
The Julia wrapper (ArchGDAL.jl) for `getfield` calls `OGR_FD_GetFieldDefn` and several related function (to get the type of the field etc.). Are these possibly expensive operations in GDAL? Any C function in GDAL can easily be called from Julia. Which C function would get all fields at once? I

[gdal-dev] GDAL 3.11.1 release candidate available

2025-06-24 Thread Even Rouault via gdal-dev
Hi, I have prepared a GDAL/OGR 3.11.1 release candidate. Pick up an archive among the following ones (by ascending size):   https://download.osgeo.org/gdal/3.11.1/gdal-3.11.1rc1.tar.xz   https://download.osgeo.org/gdal/3.11.1/gdal-3.11.1rc1.tar.gz   https://download.osgeo.org/gdal/3.11.1/gdal31