<div dir="ltr">Micheal,<div style>   Check out repl_val.py in the GDAL/python samples.</div><div style><a href="http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/">http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/</a><br>

</div><div style><br></div><div style>Changing it slightly you can do what you want.</div><div style><br></div><div style>original replace single value:</div><div style>        scanline = numpy.choose( numpy.equal( scanline, inNoData),<br>

</div><div style><div>                                      (scanline, outNoData) )</div><div><br></div><div><div>"Greater"</div></div><div><div>        scanline = numpy.choose( numpy.<b>greater</b>( scanline, inNoData),</div>

<div>                                       (scanline, outNoData) )</div><div><br></div><div>"Less"</div><div>        scanline = numpy.choose( numpy.<b>less</b>( scanline, inNoData),</div><div>                                       (scanline, outNoData) )</div>

</div><div><br></div><div><br></div><div style>Does that help?</div><div style><br></div><div style>-Trent</div><div><br></div></div><div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><br>
</pre>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 9, 2013 at 9:33 AM, 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 lang="EN-US" link="blue" vlink="purple">
<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>
207-215-5530<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 width="298" height="67" src="cid:image001.png@01CDEE5D.23EB12F0"></span><u></u><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><img width="299" height="68" src="cid:image002.jpg@01CDEE5D.23EB12F0" alt="icons"></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>