Warning: Declaration of syntax_plugin_nbsp::handle($aMatch, $aState, $aPos, &$aHandler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/capooti/webapps/spatialecology_wiki/lib/plugins/nbsp/syntax.php on line 40

Warning: Declaration of syntax_plugin_nbsp::render($aFormat, &$aRenderer, $aData) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/capooti/webapps/spatialecology_wiki/lib/plugins/nbsp/syntax.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /home/capooti/webapps/spatialecology_wiki/lib/plugins/nbsp/syntax.php:40) in /home/capooti/webapps/spatialecology_wiki/inc/actions.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /home/capooti/webapps/spatialecology_wiki/lib/plugins/nbsp/syntax.php:40) in /home/capooti/webapps/spatialecology_wiki/lib/tpl/dokuwiki/main.php on line 12
wiki:geotools_zonal_stat []

User Tools

Site Tools


wiki:geotools_zonal_stat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:geotools_zonal_stat [2019/07/07 08:04] (current)
Line 1: Line 1:
 +===== NAME =====
 +**ost4sem_zonal_stats.py**
 +
 +===== DESCRIPTION =====
 +This command line zonal statistic calculator is built for gdal supported files.\\
 +It calculates mean min max and stdev values of a continuos raster (e.g. dem) based on a different categorized raster.\\
 +The output is a txt file with the statistical value of each category.\\
 +
 +===== SYNOPSIS =====
 +
 +ost4sem\_zonal\_stats.py ​ [-category\_no\_data nodata\_value] ​ [-raster\_no\_data nodata\_value]\\
 +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [-mean] [-mode] [-median] [-stddev] [-min] [-max] [-sum]\\
 +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ src\_category ​  ​src\_raster ​  ​dst\_file\\
 +
 +-category\_no\_data nodata\_value : no data value in the category raster. \\
 +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ No data value can be identify by the user or directly take in tif\\
 +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ but the "​NoData Value=?"​ must be present in the tif.
 +\\
 +-raster\_no\_data nodata\_value : no data value in the continuos raster. \\
 +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ No data value can be identify by the user or directly take in tif\\
 +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ but the "​NoData Value=?"​ must be present in the tif.\\
 +src\_category : category raster ; layer used to group values for computing statisctics \\
 +src\_raster :   ​continues raster ; layer used to perform statisctics \\
 +dst\_file : destination file in txt format.
 +\\
 +\\
 +[OPTIONS]\\
 +\\
 +If no option are reported the category value and counted pixel for each category will be reported in the destination file.\\
 +\\
 +-max : calculate maximum value of the continues raster in each grouped category \\
 +-min : calculate min value of the continues raster in each grouped category \\
 +-stddev : calculate standard deviation value of the continues raster in each grouped category \\
 +-mean  : calculate mean value of the continues raster in each grouped category \\
 +\\
 +
 +<code bash>
 +wget www.spatial-ecology.net/​ost4sem/​geo_tools/​ost4sem_zonal_stats.py.zip
 +mv ./​ost4sem_zonal_stats.py.zip ./​ost4sem_zonal_stats.py
 +chmod 777 ./​ost4sem_zonal_stats.py
 +./​ost4sem_zonal_stats.py -max -min -stddev -mean   ​category.tif dem.tif stat.txt
 +</​code>​
  
wiki/geotools_zonal_stat.txt ยท Last modified: 2019/07/07 08:04 (external edit)