[gdal-dev] Opening gridded xyz data that is out of order

Kurt Schwehr schwehr at gmail.com
Mon Sep 11 06:52:58 PDT 2017


Can you transform the file and swap the y & x when they are in an
alternative order with your choice of python/perl/awk?

On Mon, Sep 11, 2017 at 6:51 AM, Andreas Neumann <a.neumann at carto.net>
wrote:

> Hi,
>
> Forgot to mention the link to the file, just in case you have time testing
> - see https://services.geo.zg.ch/temp/dtmav.zip (138 MB zipped file).
>
> Thanks,
>
> Andreas
>
>
>
> On 11.09.2017 15:43, Andreas Neumann wrote:
>
>> Hi,
>>
>> I received a DTM from a Swiss province (OpenData) which is of the
>> following format:
>>
>> One coordinate per line, already gridded. See f.e.
>>
>> 2708001.00 1218001.00 1541.52
>> 2708003.00 1218001.00 1542.35
>> 2708005.00 1218001.00 1542.98
>> 2708007.00 1218001.00 1543.58
>> 2708009.00 1218001.00 1544.20
>> 2708011.00 1218001.00 1545.13
>> 2708013.00 1218001.00 1545.88
>>
>> The issue is that further down the file there seems to be an issue of
>> ordering the coordinates. gdalinfo produces the following error:
>>
>> ERROR 1: Ungridded dataset: At line 4125001, change of Y direction
>> gdalinfo failed - unable to open 'DTM_swissALTI3D_XYZ.txt'.
>>
>> If GDAL could open the data - it would open as ungridded data - right?
>> Issue is, this data is already gridded as you can see above. I actually
>> want to save this is a gridded GeoTIFF file for later usage in QGIS.
>>
>> Is there still a chance that GDAL can open this data set, even if
>> coordinates are out of order?
>>
>> How about the gridded vs ungridded aspect of xyz files?
>>
>> Thanks,
>>
>> Andreas
>>
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
--
http://schwehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170911/b7f23d2b/attachment.html>


More information about the gdal-dev mailing list