[GRASS-SVN] r45875 - in grass-addons/raster/r.pi: . r.pi.index
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 8 14:34:07 EDT 2011
Author: neteler
Date: 2011-04-08 11:34:07 -0700 (Fri, 08 Apr 2011)
New Revision: 45875
Added:
grass-addons/raster/r.pi/description.html
Removed:
grass-addons/raster/r.pi/rpi_overview.html
Modified:
grass-addons/raster/r.pi/Makefile
grass-addons/raster/r.pi/r.pi.index/local_proto.h
grass-addons/raster/r.pi/r.pi.index/main.c
Log:
minor manual fixes
Modified: grass-addons/raster/r.pi/Makefile
===================================================================
--- grass-addons/raster/r.pi/Makefile 2011-04-08 08:45:35 UTC (rev 45874)
+++ grass-addons/raster/r.pi/Makefile 2011-04-08 18:34:07 UTC (rev 45875)
@@ -9,8 +9,7 @@
include $(MODULE_TOPDIR)/include/Make/Dir.make
-default: htmldir
+default: parsubdirs
+ $(INSTALL_DATA) description.html $(GISBASE)/docs/html/r.pi.html
-htmldir: subdirs
-
clean: cleansubdirs
Copied: grass-addons/raster/r.pi/description.html (from rev 45823, grass-addons/raster/r.pi/rpi_overview.html)
===================================================================
--- grass-addons/raster/r.pi/description.html (rev 0)
+++ grass-addons/raster/r.pi/description.html 2011-04-08 18:34:07 UTC (rev 45875)
@@ -0,0 +1,148 @@
+<h2>DESCRIPTION</h2>
+
+<em>r.pi</em> (raster patch index) provides various functions to analyse
+spatial attributes of a landscape. It has a focus on patch-based indices
+but delivers class-based indices as well. <em>r.le</em> and its successor
+<em>r.li</em> provide landscape indices.
+
+<p>
+A list with a short description of the <em>r.pi</em> modules can be found
+below. More in depth description of a certain module (commands, flags,
+options) can be found in the respective folder (like
+<em><A HREF="r.pi.graph.html">r.pi.graph</A></em>). The functions/algorithms
+of the modules are not yet very extensive but will be expanded in the
+future. Please submit any bug/feature you might encounter to improve the
+functionality.
+<p>
+The program will interactively query the user for input, output and
+options (GUI). However the module can be also run from the terminal
+prompt (CLI) and might be implemented in e.g. a bash-script.
+<p>
+It is highly recommended to read the help pages or e.g the overview
+documents of <A HREF="http://www.umass.edu/landeco/research/fragstats/documents/fragstats_documents.html">Fragstats</A>
+to get a better impression of problems, possibilities and caveats.
+
+
+<h2>OVERVIEW</h2>
+
+<h3>General and Connectivity Indices</h3>
+
+ <ul>
+ <li><b>r.pi.index</b>: Calculations of basic indices (area, SHAPE etc.) </li>
+ <li><b>r.pi.enn</b>: Area, SHAPE and distance to n-th Euclidean Nearest Neighbor</li>
+ <li><b>r.pi.fnn</b>: Area, SHAPE and distance to n-th Functional Nearest Neighbor</li>
+ <li><b>r.pi.odc</b>: Area and distance to omnidirectional n-th Nearest Neighbors</li>
+ <li><b>r.pi.neigh</b>: Extraction of values of patches in defined buffer region</li>
+ <li><b>r.pi.prox</b>: Calculation of Proximity and Modified Proximity Index for patches in buffer region</li>
+ <li><b>r.pi.graph</b>: Various connectivity indices within the Graph Theory </li>
+ </ul>
+
+
+<h3>Individual-based migration models</h3>
+ <ul>
+ <li><b>r.pi.searchtime</b>:Searchtime and Immigration rate</li>
+ <li><b>r.pi.energy</b>: Immigration, Migration and successfull emigration rate</li>
+ </ul>
+
+<h3>Patch-Relevance</h3>
+ <ul>
+ <li><b>r.pi.enn.iter</b>:Relevance of patches for maintenance of distance to first Nearest Neighbor</li>
+ <li><b>r.pi.searchtime.iter</b>:Relevance of patches for maintenance of searchtime</li>
+ <li><b>r.pi.energy.iter</b>:Relevance of patches for maintenance of immigration rate</li>
+ <li><b>r.pi.graph.red</b>:Relevance of patches ....</li>
+ <li><b>r.pi.graph.dec</b>:Relevance of patches ....</li>
+ </ul>
+
+<h3>Neutral Landscape Model</h3>
+ <ul>
+ <li><b>r.pi.nlm</b>: Generation of a neutral landscape</li>
+ <li><b>r.pi.nlm.stats</b>:Statistical analysis of landscapes based on permutation of neutral landscapes</li>
+ </ul>
+
+<h3>various modules</h3>
+ <ul>
+ <li><b>r.pi.corearea</b>:Calculation of core area based on costmatrix</li>
+ <li><b>r.pi.searchtime.mw</b>:Related to <em>r.pi.searchtime</em> but using a Moving Windows approach</li>
+ <li><b>r.pi.prob.mw</b>:Probability of two random points being in the same patch</li>
+ <li><b>r.pi.rectangle</b>: Generation of rectangles based on coordinate points</li>
+ <li><b>r.pi.import</b>:Import of values to corresponding patches</li>
+ <li><b>r.pi.export</b>:Export of values from patches</li>
+ <li><b>r.pi.lm</b>:Residuals of a Linear Regression between 2 rasters are provided as raster</li>
+ <li><b>r.pi.corrwin</b>:A correlation between the pixels of two raster
+files inside a moving analysis is calculated</li>
+ </ul>
+
+
+
+
+<h2>Disclaimer</h2>
+
+This software is released under the GPL license, hence also the limitation
+of liability. This software was designed for a certain project and its research
+questions. Its nomenclature might not be concordant with other software packages.
+Moreover its capabilities are yet limited and can not be compared to such of e.g.
+Fragstats, however every user is invited to extend, modify or fix the
+functionality of <em>r.pi</em> as long as the new code comply with the GPL.
+
+
+<h2>REFERENCES</h2>
+
+Wegmann, M., E. Shirinov, M. Schmidt and XXXX, S. Dech (2011) " Titel ...."
+<em>Journal</em> pages
+
+
+<h2>EXAMPLES</h2>
+
+<h4>Calculation of the SHAPE-Index</h4>
+
+Input can be generated by <em>r.pi.nlm</em>, for example:
+
+<div class="code"><pre>
+# generate random landscape with 50% cover
+r.pi.nlm output=NLM_in landcover=50 sharpness=0.5
+
+# use the class 1 of the above generated landscape for computation of SHAPE-Index
+r.pi.index input=NLM_in keyval=1 output=NLM_in.shape method=shape
+</pre></div>
+
+
+<h4>Calculation of the distance to the first and 10th Nearest Neighbor</h4>
+
+Input generated by <em>r.pi.nlm</em>, for example:
+
+<div class="code"><pre>
+# generate random landscape with 50% cover
+r.pi.nlm output=NLM_in landcover=50 sharpness=0.5
+
+# first NN
+r.pi.index input=NLM_in keyval=1 output=NLM_in.enn1 method=ENN
+
+# 10th NN
+r.pi.enn input=NLM_in output=NLM_in.enn10 method=distance number=10
+
+# 1-10th NN
+r.pi.enn input=NLM_in output=NLM_in.enn10 method=distance number=1-10
+</pre></div>
+
+
+<h2>NOTE</h2>
+
+The maximum number of patches that can be queried at one time depend on
+the module and might also be influenced by the resolution.
+
+<h2>SEE ALSO</h2>
+
+<em>
+<A HREF="r.le.html">r.le</A>,
+<A HREF="r.li.html">r.li</A>
+</em>
+
+<h2>AUTHORS</h2>
+Programming: Elshad Shirinov<br>
+Scientific concept: Martin Wegmann <br>
+<b>Department of Remote Sensing <br>
+<em>Remote Sensing and Biodiversity Unit</em><br>
+University of Wuerzburg, Germany</b>
+
+<p>
+<i>Last changed: $Date$</i>
Modified: grass-addons/raster/r.pi/r.pi.index/local_proto.h
===================================================================
--- grass-addons/raster/r.pi/r.pi.index/local_proto.h 2011-04-08 08:45:35 UTC (rev 45874)
+++ grass-addons/raster/r.pi/r.pi.index/local_proto.h 2011-04-08 18:34:07 UTC (rev 45875)
@@ -1,6 +1,12 @@
#ifndef LOCAL_PROTO_H
#define LOCAL_PROTO_H
+#ifdef MAIN
+#define GLOBAL
+#else
+#define GLOBAL extern
+#endif
+
#define MAX_DOUBLE 1000000.0
typedef struct
@@ -30,14 +36,11 @@
extern int f_nearest_dist(DCELL *, Coords **, int);
/* global variables */
-int nrows, ncols;
+GLOBAL int nrows, ncols;
+GLOBAL Coords **fragments;
+GLOBAL int *flagbuf;
-Coords **fragments;
+GLOBAL Coords *actpos;
+GLOBAL int verbose;
-int *flagbuf;
-
-Coords *actpos;
-
-int verbose;
-
#endif /* LOCAL_PROTO_H */
Modified: grass-addons/raster/r.pi/r.pi.index/main.c
===================================================================
--- grass-addons/raster/r.pi/r.pi.index/main.c 2011-04-08 08:45:35 UTC (rev 45874)
+++ grass-addons/raster/r.pi/r.pi.index/main.c 2011-04-08 18:34:07 UTC (rev 45875)
@@ -1,10 +1,11 @@
+#define MAIN
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <math.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/stats.h>
-#include <math.h>
#include "local_proto.h"
/*
Deleted: grass-addons/raster/r.pi/rpi_overview.html
===================================================================
--- grass-addons/raster/r.pi/rpi_overview.html 2011-04-08 08:45:35 UTC (rev 45874)
+++ grass-addons/raster/r.pi/rpi_overview.html 2011-04-08 18:34:07 UTC (rev 45875)
@@ -1,140 +0,0 @@
-<H2>DESCRIPTION</H2>
-
-<EM>r.pi</EM> (raster patch index) provides various functions to analyse spatial attributes of a landscape. It has a focus on patch-based indices but delivers class-based indices as well. <EM>r.le</EM> and its successor <EM>r.li</EM> provide landscape indices.
-
-<P>
-A list with a short description of the <EM>r.pi</EM> modules can be found below. More in depth description of a certain module (commands, flags, options) can be found in the respective folder (like <EM><A HREF="r.pi.graph/description.html">r.pi.graph</A></EM>). The functions/algorithms of the modules are not yet very extensive but will be expanded in the future. Please submit any bug/feature you might encounter to improve the functionality.
-<P>
-The program will interactively query the user for input, output and options (GUI). However the module can be also run from the terminal prompt (CLI) and might be implemented in e.g. a bash-script.
-<P>
-It is highly recommended to read the help pages or e.g the overview documents of <A HREF="http://www.umass.edu/landeco/research/fragstats/documents/fragstats_documents.html">Fragstats</A> to get a better impression of problems, possibilities and caveats.
-
-<!-- "<tt>end</tt>" -->
-<P>
-
-
-
-
-<H2>OVERVIEW</H2>
-
-<H3>General and Connectivity Indices</H3>
-
- <ul>
- <li><b><A HREF="r.pi.index/description.html">r.pi.index</A></b>: Calculations of basic indices (area, SHAPE etc.) </li>
- <li><b>r.pi.ENN</b>: Area, SHAPE and distance to n-th Euclidean Nearest Neighbor</li>
- <li><b>r.pi.FNN</b>: Area, SHAPE and distance to n-th Functional Nearest Neighbor</li>
- <li><b>r.pi.odc</b>: Area and distance to omnidirectional n-th Nearest Neighbors</li>
- <li><b>r.pi.neigh</b>: Extraction of values of patches in defined buffer region</li>
- <li><b>r.pi.prox</b>: Calculation of Proximity and Modified Proximity Index for patches in buffer region</li>
- <li><b>r.pi.graph</b>: Various connectivity indices within the Graph Theory </li>
- </ul>
-
-
-<H3>Individual-based migration models</H3>
- <ul>
- <li><b>r.pi.searchtime</b>:Searchtime and Immigration rate</li>
- <li><b>r.pi.energy</b>: Immigration, Migration and successfull emigration rate</li>
- </ul>
-
-<H3>Patch-Relevance</H3>
- <ul>
- <li><b>r.pi.ENN.iter</b>:Relevance of patches for maintenance of distance to first Nearest Neighbor</li>
- <li><b>r.pi.searchtime.iter</b>:Relevance of patches for maintenance of searchtime</li>
- <li><b>r.pi.energy.iter</b>:Relevance of patches for maintenance of immigration rate</li>
- <li><b>r.pi.graph.red</b>:Relevance of patches by removing patches iteratively</li>
- <li><b>r.pi.graph.dec</b>:Relevance of patches when threshold distance decreases</li>
- </ul>
-
-<H3>Neutral Landscape Model</H3>
- <ul>
- <li><b>r.pi.nlm</b>: Generation of a neutral landscape</li>
- <li><b>r.pi.nlm.stats</b>:Statistical analysis of landscapes based on permutation of neutral landscapes</li>
- <li><b>r.pi.nlm.circle</b>:Similar to r.pi.nlm but generates circular rather fractal landscapes</li>
- </ul>
-
-<H3>various modules</H3>
- <ul>
- <li><b>r.pi.corearea</b>:Calculation of core area based on costmatrix</li>
- <li><b>r.pi.searchtime.mw</b>:Related to <EM>r.pi.searchtime</EM> but using a Moving Windows approach</li>
- <li><b>r.pi.prob.mw</b>:Probability of two random points being in the same patch</li>
- <li><b><A HREF="r.pi.rectangle/description.html">r.pi.rectangle</A></b>: Generation of rectangles based on coordinate points</li>
- <li><b><A HREF="r.pi.import/description.html">r.pi.import</A></b>:Import of values to corresponding patches</li>
- <li><b><A HREF="r.pi.export/description.html">r.pi.export</A></b>:Export of values from patches</li>
- <li><b>r.pi.lm</b>:Residuals of a Linear Regression between 2 rasters are provided as raster</li>
- <li><b><A HREF="r.pi.corrwin/description.html">r.pi.corrwin</A></b>:Correlation of pixels within a moving window of two raster files</li>
-
- </ul>
-
-
-
-
-<H2>Disclaimer</H2>
-
-This software is released under the GPL license, hence also the limitation of liability.
-This software was designed for a certain project and its research questions. Its nomenclature might not be concordant with other software packages.
-Moreover its capabilities are yet limited and can not be compared to such of e.g. Fragstats, however every user is invited to extend, modify or fix the functionality of <EM>r.pi</EM> as long as the new code comply with the GPL.
-
-
-<H2>REFERENCES</H2>
-
-
-Wegmann, M., E. Shirinov, M. Schmidt and S. Dech (in prep.)
-
-
-
-
-<H2>EXAMPLES</H2>
-
-
-<h4>Calculation of the SHAPE-Index</h4>
-
-Input can be generated by <EM>r.pi.nlm</EM>, for example:
-
-<div class="code"><pre>
-r.pi.nlm output=NLM_in landcover=50 sharpness=0.5 #generate random landscape with 50% cover
-
-r.pi.index input=NLM_in keyval=1 output=NLM_in.shape method=shape #use the class 1 of the above generated landscape for computation of SHAPE-Index
-
-r.pi.export input=NLM_in.shape output=patch_statistics_export_shape values=patch_value_export_shape stats=average,variance #export of patch statistics and values to ascii file
-
-</pre></div>
-
-
-<h4>Calculation of the distance to the first and 10th Nearest Neighbor</h4>
-
-Input generated by <EM>r.pi.nlm</EM>, for example:
-
-<div class="code"><pre>
-r.pi.nlm output=NLM_in landcover=50 sharpness=0.5
-
-r.pi.index input=NLM_in keyval=1 output=NLM_in.enn1 method=ENN #first NN
-
-r.pi.ENN input=NLM_in output=NLM_in.enn10 method=distance number=10 #10th NN
-
-r.pi.ENN input=NLM_in output=NLM_in.enn10 method=distance number=1-10 #1-10th NN
-
-
-</pre></div>
-
-
-
-
-<H2>NOTE</H2>
-
-The maximum number of patches that can be queried at one time differs between modules.
-
-
-<H2>SEE ALSO</H2>
-
-<EM>
-<A HREF="r.li.html">r.li</A>,
-<A HREF="r.le.html">r.le</A>,
-
-
-</EM>
-
-<H2>AUTHOR</H2>
-Programming: Elshad Shirinov<br>
-Scientific concept: Dr. Martin Wegmann <br>
-Department of Remote Sensing <br>Remote Sensing and Biodiversity Unit<br> University of Wuerzburg, Germany
-
More information about the grass-commit
mailing list