<div dir="ltr"><div><div>Michael,<br><br></div>I'm not sure if you can do this using one of the existing utilities, you may be able to do this my creating a virtual file (gdalbuildvrt) and modifying it see - <a href="http://www.gdal.org/gdal_vrttut.html">http://www.gdal.org/gdal_vrttut.html</a>, but I have not attempted this.  An alternative is to do this using the API and something like numpy to choose and rewrite pixel values.<br>
</div>See the following for a example in python <a href="http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/val_repl.py">http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/val_repl.py</a><br><br><div>   <br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 January 2013 11:33, Smith, Michael <span dir="ltr"><<a href="mailto:Michael.Smith@maine.gov" target="_blank">Michael.Smith@maine.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal">I have some DEMs that are created from lidar.  For reasons related to seeing currents and wind effect, we did not ask for the water to be flattened, but rather it shows waves.  This is cool, and what we wanted.  BUT of course now we want
 to create a second set of DEMs with a  nice flat ocean.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have numerous pixels out in the ocean which are slightly less than 0.  So how does one select out all pixels < 0 and substitute them with 0 with GDAL? 
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">===============================<br>
</span><b><span style="font-size:10.0pt">Michael Smith MS GISP</span></b><span style="font-size:10.0pt"><br>
State GIS Manager, Maine Office of GIS<br>
State of Maine, Office of Information Technology<br>
michael.smith _at_ <a href="http://maine.gov" target="_blank">maine.gov</a><br>
<a href="tel:207-215-5530" value="+12072155530" target="_blank">207-215-5530</a><br>
<br>
Board Member, Maine GeoLibrary<br>
Education Chair, Maine GIS Users Group<br>
State Rep, National States Geographic Information Council<br>
</span><u></u><span style="margin-left:0px;margin-top:0px;width:298px;min-height:67px"><img src="cid:image001.png@01CDEE5D.23EB12F0" height="67" width="298"></span><u></u><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><img src="cid:image002.jpg@01CDEE5D.23EB12F0" alt="icons" height="68" width="299"></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>

<br>
</span><span style="font-size:10.0pt">***NOTE NEW ADDRESS***<br>
<br>
</span><span style="font-size:8.0pt">State House Station 145<br>
51 Commerce Drive<br>
Augusta, ME 04333-0145<br>
69<sup>o</sup> 47' 58.9"W  44<sup>o</sup> 21' 54.8"N</span><u></u><u></u></p>
</div>
</div>

<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">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></blockquote></div><br></div>