[gdal-dev] Using GDAL with gridded XYZ that has no 'nodata' values?

Even Rouault even.rouault at mines-paris.org
Mon May 26 13:18:58 PDT 2014


Le dimanche 25 mai 2014 08:20:13, Sam Franklin a écrit :
> Hey Even - well that's embarrassing, it looks like gdal 1.11.0 solves the
> problem for those three xyz files that I sent through! Great work, thanks!
> 
> However, I've found an example that fails to open here
> https://dl.dropboxusercontent.com/u/4086367/gdal_translate_xyz_data04-02.zi
> p
> 
> Using gdal 1.11.0 on osx 10.9.3, I receive the following error:
> 
> $ gdalinfo data04-02.xyz
> ERROR 1: Ungridded dataset: At line 18, X is 516085.000000, where as
> 516100.000000 was expected (1)
> gdalinfo failed - unable to open 'data04-02.xyz'.
> I doubt you remember - I chatted to you about this problem at FOSS4G, sorry
> it's taken about 9 months to contact you!

Hi Sam,

Hum, I didn't really recall that, but quite a lof of people talked to me about 
various subjects ;-)

ok, I've looked at your file and it has some weirdness that would require much 
more work to deal with, namely the fact of having lines in non strictly 
ascending or descending lines.
But if you do :
sort -nk 2 data04-02.xyz > data04-02-sorted.xyz

You should be able to open it with trunk now (I've done a few extra fixes to 
better deal with holes within lines).

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list