Re: [gdal-dev] Strange behavior opening CSVs

2021-11-09 Thread Simon Eves
That makes sense. Thanks. Our plan is to trap CSV files before invoking the
GDAL identification.

The second part does seem like a bug, though.

On Mon, Nov 8, 2021 at 11:47 PM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> The trial with gdalinfo makes GDAL to try XYZ
> https://gdal.org/drivers/raster/xyz.html?highlight=xyz. It is not a bad
> guess at all. Ogrinfo tries CSV and finds the x, y, and val fields. I can’t
> say anything about the second part.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* gdal-dev  *Puolesta *Simon
> Eves
> *Lähetetty:* tiistai 9. marraskuuta 2021 2.21
> *Vastaanottaja:* gdal dev 
> *Aihe:* [gdal-dev] Strange behavior opening CSVs
>
>
>
> I am currently implementing a better file identifier, and during the
> course of development, I unintentionally let GDAL try to GDALOpenEx() the
> attached trivial CSV file.
>
>
>
> First, it reported "Ungridded dataset: At line 3, change of Y direction"
> (as a warning to the registered error-handler) and the returned
> OGRDataSource* was null.
>
>
>
> When I tried again, it then claimed that I was trying to open the same
> file recursively. implying that it had, in fact, opened it, even though it
> never returned a valid handle, so I wouldn't have been able to close it
> again even if I'd wanted to.
>
>
>
> I can reproduce the first part with gdalinfo.
>
>
>
> This is with GDAL 3.2.2 on Ubuntu 20.04 with GCC 9.
>
>
>
> I'll poke at the GDAL code myself when I have a bit more time.
>
>
>
> --
>
> <http://www.omnisci.com/>
>
> *Simon Eves*
>
> Senior Graphics Engineer, Rendering Group
> 100 Montgomery St (5th Floor), San Francisco, CA 94104, USA
>
> Email: simon.e...@omnisci.com | Cell:
>
> +1 (415) 902-1996
>
>
>


-- 
<http://www.omnisci.com/>
Simon Eves
Senior Graphics Engineer, Rendering Group
100 Montgomery St (5th Floor), San Francisco, CA 94104, USA


Email: simon.e...@omnisci.com | Cell:  +1 (415) 902-1996
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Strange behavior opening CSVs

2021-11-08 Thread Rahkonen Jukka (MML)
Hi,

The trial with gdalinfo makes GDAL to try XYZ 
https://gdal.org/drivers/raster/xyz.html?highlight=xyz. It is not a bad guess 
at all. Ogrinfo tries CSV and finds the x, y, and val fields. I can’t say 
anything about the second part.

-Jukka Rahkonen-

Lähettäjä: gdal-dev  Puolesta Simon Eves
Lähetetty: tiistai 9. marraskuuta 2021 2.21
Vastaanottaja: gdal dev 
Aihe: [gdal-dev] Strange behavior opening CSVs

I am currently implementing a better file identifier, and during the course of 
development, I unintentionally let GDAL try to GDALOpenEx() the attached 
trivial CSV file.

First, it reported "Ungridded dataset: At line 3, change of Y direction" (as a 
warning to the registered error-handler) and the returned OGRDataSource* was 
null.

When I tried again, it then claimed that I was trying to open the same file 
recursively. implying that it had, in fact, opened it, even though it never 
returned a valid handle, so I wouldn't have been able to close it again even if 
I'd wanted to.

I can reproduce the first part with gdalinfo.

This is with GDAL 3.2.2 on Ubuntu 20.04 with GCC 9.

I'll poke at the GDAL code myself when I have a bit more time.

--
[http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png]<http://www.omnisci.com/>

Simon Eves

Senior Graphics Engineer, Rendering Group
100 Montgomery St (5th Floor), San Francisco, CA 94104, USA



Email: simon.e...@omnisci.com<mailto:simon.e...@omnisci.com> | Cell:

+1 (415) 902-1996





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


[gdal-dev] Strange behavior opening CSVs

2021-11-08 Thread Simon Eves
I am currently implementing a better file identifier, and during the course
of development, I unintentionally let GDAL try to GDALOpenEx() the attached
trivial CSV file.

First, it reported "Ungridded dataset: At line 3, change of Y direction"
(as a warning to the registered error-handler) and the returned
OGRDataSource* was null.

When I tried again, it then claimed that I was trying to open the same file
recursively. implying that it had, in fact, opened it, even though it never
returned a valid handle, so I wouldn't have been able to close it again
even if I'd wanted to.

I can reproduce the first part with gdalinfo.

This is with GDAL 3.2.2 on Ubuntu 20.04 with GCC 9.

I'll poke at the GDAL code myself when I have a bit more time.

-- 

Simon Eves
Senior Graphics Engineer, Rendering Group
100 Montgomery St (5th Floor), San Francisco, CA 94104, USA


Email: simon.e...@omnisci.com | Cell:  +1 (415) 902-1996
x,y,val
1.0,28.0,0.01
2.0,55.0,0.1
3.0,43.0,0.2
4.0,91.0,0.3
5.0,81.0,0.4
6.0,53.0,0.5
7.0,19.0,0.6
8.0,87.0,0.7
9.0,52.0,0.8
10.0,48.0,0.9
11.0,24.0,0.99
12.0,49.0,0.9
13.0,87.0,0.8
14.0,66.0,0.7
15.0,17.0,0.6
16.0,27.0,0.5
17.0,68.0,0.4
18.0,16.0,0.3
19.0,49.0,0.2
20.0,15.0,0.1
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev