<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Mark (and others),</p>
<p>Your sort command worked like a charm. It was also very fast!</p>
<p>Now gdalinfo produces this nice information output:</p>
<p>Driver: XYZ/ASCII Gridded XYZ<br>
Files: dtmav_sorted.xyz<br>
Size is 5000, 5000<br>
Coordinate System is `'<br>
Origin = (2708000.000000000000000,1210000.000000000000000)<br>
Pixel Size = (2.000000000000000,2.000000000000000)<br>
Corner Coordinates:<br>
Upper Left ( 2708000.000, 1210000.000) <br>
Lower Left ( 2708000.000, 1220000.000) <br>
Upper Right ( 2718000.000, 1210000.000) <br>
Lower Right ( 2718000.000, 1220000.000) <br>
Center ( 2713000.000, 1215000.000) <br>
Band 1 Block=5000x1 Type=Float32, ColorInterp=Undefined<br>
Min=728.210 Max=2294.290 <br>
NoData Value=0<br>
</p>
<p>Now I can open this in QGIS as a normal data source and simply
safe as a GeoTIFF file.</p>
<p>Thanks a lot to all who answered so quickly!</p>
<p>Glad that a simple sort command on the command line helped to
solve the issue! I will contact the data provider and ask them if
they could deliver this data in an already sorted form so that
GDAL recognizes it as gridded data.<br>
</p>
<p>Andreas<br>
</p>
<br>
<div class="moz-cite-prefix">On 11.09.2017 16:12, Mark Johnson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEEbjBgFHm4H3u6NH2+YwUcX-oxxKb7_QHiWagp1srMy6bxVow@mail.gmail.com">
<div dir="ltr">You must sort the data beforehand
<div>- the y position must be sorted properly (ASC or DESC)</div>
<div><br>
</div>
<div>Standard linux sort program:</div>
<div><br>
</div>
<div>sort -k2 -n -k1 <a href="http://392_5810.xyz"
moz-do-not-send="true">392_5810.xyz</a> -o <a
href="http://392_5810.sort.xyz" moz-do-not-send="true">392_5810.sort.xyz</a><br>
</div>
<div><br>
</div>
<div>(2nd column (y) as numeric, then first column (x) -o =
output file</div>
<div><br>
</div>
<div>As a zip file you can also do:</div>
<div><br>
</div>
<div>unzip -p 390_5820.zip | sort -k2 -n -k1 -o
../xyz/390_5820.dhhn92.txt<br>
</div>
<div><br>
</div>
<div>that would deal with problem in 1 step.</div>
<div><br>
</div>
<div>ogr needs to know the range/area to build (minx,miny,maxx,
maxy), so when the y switches it assumes a new column.</div>
<div><br>
</div>
<div>Mark</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</body>
</html>