<div dir="ltr"><div>Hey Brent - Oh boy. I really appreciate the info.</div><div><br></div>GMT's xyz2grd looks very promising indeed | <a href="http://gmt.soest.hawaii.edu/doc/latest/xyz2grd.html">http://gmt.soest.hawaii.edu/doc/latest/xyz2grd.html</a><div>
<br></div><div>I'll check out the other links too.</div><div><br></div><div>Embarrassingly, I've been banging my head against this brick wall for years :-)</div><div><br></div><div>Many thanks Brent - total life saver!</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 May 2014 22:25, Brent Wood <span dir="ltr"><<a href="mailto:pcreso@pcreso.com" target="_blank">pcreso@pcreso.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt">
<div><span><span style="font-family:arial,helvetica,sans-serif">Hi <br></span></span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal">
<span><span style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><span><span style="font-family:arial,helvetica,sans-serif">Any reason for requiring a GDAL only system?</span></span></div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><br><span></span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal">
<span>GMT & MB (MultiBeam) System (<a href="http://gmt.soest.hawaii.edu/" target="_blank"> http://gmt.soest.hawaii.edu/</a> & <a href="http://www.ldeo.columbia.edu/res/pi/MB-System/" target="_blank">http://www.ldeo.columbia.edu/res/pi/MB-System/</a> ) are Open Source tools built specifically for working with seabed & multibeam data.</span></div>
<div style="color:rgb(0,0,0);font-size:13.3333px;background-color:transparent;font-style:normal"><br><span></span></div><div><span style="font-family:arial,helvetica,sans-serif"><span>GMT netCDF grids are supported by GDAL, & GMT can also create the greyscale geotiffs</span><span> directly from the grid data</span>, the combination of GMT & GDAL is extremely powerful and effective.</span></div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><br><span style="font-family:arial,helvetica,sans-serif"></span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal">
<span style="font-family:arial,helvetica,sans-serif">The other Open Source tools I'd look at in this context, for a fully functional suite for such work, is Postgis, where the new pgraster functionality allows you to manage the gridded data (including large sets of geotiff imagery.</span></div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><br><span style="font-family:arial,helvetica,sans-serif"></span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal">
<span style="font-family:arial,helvetica,sans-serif">Of course, in the FOSS arena, there is also GRASS, which has some very powerful raster/DEM tools, but I find of limited value in the maritime arena, as well as OSSIM, both include command line tools you can script along with GDAL. And there are others, but in the maritime & multibeam Open Source space I suggest that GMT & MB System (ideally with GDAL) reign supreme :-)</span></div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><br><span style="font-family:arial,helvetica,sans-serif"></span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal">
<span style="font-family:arial,helvetica,sans-serif">Cheers,</span></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><br><span style="font-family:arial,helvetica,sans-serif"></span></div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:arial,helvetica,sans-serif;background-color:transparent;font-style:normal"><span style="font-family:arial,helvetica,sans-serif">   Brent Wood<br></span></div><span style="font-family:arial,helvetica,sans-serif">  </span><div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt">
<span style="font-family:arial,helvetica,sans-serif"> </span><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><span style="font-family:arial,helvetica,sans-serif"> </span><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif"> </span><hr size="1">
  <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Sam Franklin
 <<a href="mailto:mailinglist.samfranklin@gmail.com" target="_blank">mailinglist.samfranklin@gmail.com</a>><br> <b><span style="font-weight:bold">To:</span></b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a> <br>
 <b><span style="font-weight:bold">Sent:</span></b> Sunday, May 25, 2014 7:45 AM<br> <b><span style="font-weight:bold">Subject:</span></b> [gdal-dev] Using GDAL with gridded XYZ that has no 'nodata' values?<br> </font> </div>
 <div><div><div class="h5"><br><div><div dir="ltr">Greetings. This is my first post to this mailing list, so apologies if I commit a mailing-list faux-pas :)<div><br></div><div>I wonder if anyone can offer a suggestion, as I'm hoping I've missed something obvious.</div>

<div><br></div><div>I regularly receive bathymetric DEMs, acquired by acoustic multibeam echosounders (MBES) from offshore geophysical surveys that take the form of narrow corridors of survey or irregularly shaped areas.</div>

<div><br></div><div>My goal is to have a end-to-end open source/GDAL workflow that converts the bathymetric DEM to greyscale GEOTIFF which I can then use for further processing/analysis using GDAL/OGR.</div><div><br></div>

<div>The convention in the offshore sector is to deliver bathymetric data as single 'gridded' .XYZ ASCII file, where XY coordinate pairs are evenly spaced to form a grid and the textfile row order is spatially sequential.</div>

<div><br></div><div>However, crucially 'nodata' values are omitted from the XYZ.  I can only assume the reasoning was to reduce the file size on disc. This is an industry convention that will not change anytime soon.</div>

<div><br></div><div>gdal_translate obviously does not read these XYZ files as gdal throws an error due to the lack of true rectangular grid.  I've read the XYZ info <a rel="nofollow" href="http://www.gdal.org/frmt_xyz.html" target="_blank">http://www.gdal.org/frmt_xyz.html</a> which is clear to me, no problem there.<br>

</div><div><br></div><div>I do not want to use gdal_grid on the XYZ as this will introduce a further interpolation step. The XYZs I receive are already cleansed and gridded by the surveyor which I don't wish to edit further.<br>

</div><div><br></div><div>So, I currently use a proprietary marine geophysical package which can directly read the gridded XYZ without nodata values.  Using this package, I can export to ESRI ASCII grid (.ASC) which I then use gdal_translate without issue for my further processing steps.</div>

<div><br></div><div>I'd like the freedom of a non-proprietary solution and the only thing I can think of is to write a python script to pre-process my XYZ into a format that gdal will accept.  I was thinking of calculating the XY bounding box of the data and output an XYZ that blends the original values and nodata values in the correct row order.</div>

<div><br></div><div>If anyone is interested, see below link to a zip of three separate examples, containing:</div><div>-- 'gridded' XYZ (without nodata values)</div><div>-- processed greyscale GEOTIFF (using proprietary package)</div>

<div>-- processed color-relief RGB GEOTIFF (using proprietary package)</div><div><a rel="nofollow" href="https://dl.dropboxusercontent.com/u/4086367/gdal_translate_xyz_examples.zip" target="_blank">https://dl.dropboxusercontent.com/u/4086367/gdal_translate_xyz_examples.zip</a></div>

<div>All data in these examples are referenced to SRS EPSG:27700.</div><div><br></div><div>If I've missed anything obvious, or if anyone has any thoughts of how I can achieve my goal using GDAL or other, or comment on my proposed solution, that would be greatly appreciated.</div>

<div><br></div><div>Thanks in advance.</div><div>Sam</div></div></div><br></div></div>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br><br></div> </div> </div>  </div></div></blockquote></div><br></div>