Re: [gdal-dev] substitute pixel values

2013-01-09 Thread Brian Case
hey Michael i have done this with a vrt. you can use a The ComplexSource supports adding a custom lookup table to transform the source values to the destination. The LUT can be specified using the following form: [src value 1]:[dest value 1],[src value 2]:[dest value 2],... http://www.gd

Re: [gdal-dev] substitute pixel values

2013-01-09 Thread Hare, Trent
Micheal, Check out repl_val.py in the GDAL/python samples. http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ Changing it slightly you can do what you want. original replace single value: scanline = numpy.choose( numpy.equal( scanline, inNoData),

Re: [gdal-dev] substitute pixel values

2013-01-09 Thread Joaquim Luis
Sorry to come out so often with GMT solutions in this GDAL list but somethings are so trivial there. If you can trust that all your negative values are (mean)seawater, this will do the job grdclip yourGrid -Sb0/0 -Gclipped_grid.nc Note, one need the dev

Re: [gdal-dev] substitute pixel values

2013-01-09 Thread Travis Kirstine
Michael, 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 - http://www.gdal.org/gdal_vrttut.html, but I have not attempted this. An alternative is to do this using the API and something l

Re: [gdal-dev] substitute pixel values

2013-01-09 Thread Ivan Lucena
e--- From: Smith, Michael To: gdal-dev@lists.osgeo.org Subject: [gdal-dev] substitute pixel values Sent: Jan 09 '13 11:33 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 s

[gdal-dev] substitute pixel values

2013-01-09 Thread Smith, Michael
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. I