<div dir="auto">I wonder if GDAL shouldn't suggest sorting as a means of fixing the issue, possibly with Mark's command? </div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 11, 2017 7:32 AM, "Andreas Neumann" <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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: <a href="http://dtmav_sorted.xyz" target="_blank">dtmav_sorted.xyz</a><br>
Size is 5000, 5000<br>
Coordinate System is `'<br>
Origin = (2708000.000000000000000,<wbr>1210000.000000000000000)<br>
Pixel Size = (2.000000000000000,2.<wbr>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="m_-3135462035736381642moz-cite-prefix">On 11.09.2017 16:12, Mark Johnson
wrote:<br>
</div>
<blockquote type="cite">
<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" target="_blank">392_5810.xyz</a> -o <a href="http://392_5810.sort.xyz" target="_blank">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="m_-3135462035736381642mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
gdal-dev mailing list
<a class="m_-3135462035736381642moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a class="m_-3135462035736381642moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</div>
<br>______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a><br></blockquote></div></div>