[gdal-dev] dem values bigger than 0

Hare, Trent thare at usgs.gov
Wed Jul 10 16:08:32 PDT 2013


Ahmet,
   Have you looked at gdal_calc.py?
http://svn.osgeo.org/gdal/trunk/gdal/swig/python/scripts/gdal_calc.py

Also in the python *samples *directory there is a val_repl.py (value
replace) script. By switching the line below you can make it greater
or less than a certain value.
original val_repl.py: http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples

"val_repl_greater.py" is simply the sample "val_repl.py" (from
link above) with one line changed


replace
      scanline =
numpy.choose(numpy.equal(scanline,inNoData),(scanline,outNoData))
with
      scanline =
numpy.choose(numpy.greater(scanline,inNoData),(scanline,outNoData))



good luck,
Trent




On Wed, Jul 10, 2013 at 12:20 PM, Ahmet Temiz <ahmettemiz88 at gmail.com>wrote:

>
> hello
>
> In a DEM file(tif) , how can I extract values bigger than 0 ?
>
> regards
> --
> Ahmet Temiz
> Jeoloji Müh.
> Afet ve Acil Durum Yönetimi Başkanlığı
> Planlama ve Zarar Azaltma Dairesi Başkanlığı
>
>
> ________________________
>
> Ahmet Temiz
> Geological Eng.
> Information Systems - GIS Group
> Disaster and Emergency Management
> of Presidency
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130710/73e25de3/attachment.html>


More information about the gdal-dev mailing list