[GRASS-SVN] r62819 - grass/branches/releasebranch_7_0/raster grass/trunk/raster grass-addons/grass7/raster grass-addons/grass7/raster/r.grow.shrink

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 19 15:02:46 PST 2014


Author: wenzeslaus
Date: 2014-11-19 15:02:46 -0800 (Wed, 19 Nov 2014)
New Revision: 62819

Added:
   grass-addons/grass7/raster/r.grow.shrink/
   grass-addons/grass7/raster/r.grow.shrink/r.grow.shrink.html
Removed:
   grass-addons/grass7/raster/r.grow.shrink/r.grow.html
   grass/branches/releasebranch_7_0/raster/r.grow/
   grass/trunk/raster/r.grow/
Modified:
   grass-addons/grass7/raster/r.grow.shrink/DEPRECATED
   grass-addons/grass7/raster/r.grow.shrink/Makefile
   grass-addons/grass7/raster/r.grow.shrink/main.c
Log:
r.grow: move the C version of r.grow to addons as r.grow.shrink since it supports shrinking

 * remove C version of r.grow in release branch 7.0
 * see also #2368 and #1024
 * note: trunk and 7.0 now contains Python version of r.grow which is using r.grow.distance and does not support shrinking


Modified: grass-addons/grass7/raster/r.grow.shrink/DEPRECATED
===================================================================
--- grass/trunk/raster/r.grow/DEPRECATED	2014-11-19 14:25:52 UTC (rev 62813)
+++ grass-addons/grass7/raster/r.grow.shrink/DEPRECATED	2014-11-19 23:02:46 UTC (rev 62819)
@@ -1,2 +1,2 @@
-no longer maintained.
-Continued in ../r.grow.distance/
+This module is no longer maintained.
+Development continues in r.grow.distance and its Python r.grow wrapper.

Modified: grass-addons/grass7/raster/r.grow.shrink/Makefile
===================================================================
--- grass/trunk/raster/r.grow/Makefile	2014-11-19 14:25:52 UTC (rev 62813)
+++ grass-addons/grass7/raster/r.grow.shrink/Makefile	2014-11-19 23:02:46 UTC (rev 62819)
@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = r.grow
+PGM = r.grow.shrink
 
 LIBES = $(GISLIB) $(RASTERLIB)
 DEPENDENCIES = $(GISDEP) $(RASTERDEP)

Modified: grass-addons/grass7/raster/r.grow.shrink/main.c
===================================================================
--- grass/trunk/raster/r.grow/main.c	2014-11-19 14:25:52 UTC (rev 62813)
+++ grass-addons/grass7/raster/r.grow.shrink/main.c	2014-11-19 23:02:46 UTC (rev 62819)
@@ -1,7 +1,7 @@
 
 /****************************************************************************
  *
- * MODULE:       r.grow2
+ * MODULE:       r.grow.shrink
  *
  * AUTHOR(S):    Marjorie Larson - CERL
  *               Glynn Clements

Deleted: grass-addons/grass7/raster/r.grow.shrink/r.grow.html
===================================================================
--- grass/trunk/raster/r.grow/r.grow.html	2014-11-19 14:25:52 UTC (rev 62813)
+++ grass-addons/grass7/raster/r.grow.shrink/r.grow.html	2014-11-19 23:02:46 UTC (rev 62819)
@@ -1,97 +0,0 @@
-<h2>DESCRIPTION</h2>
-
-<em>r.grow</em> adds cells around the perimeters of all areas
-in a user-specified raster map layer and stores the output in
-a new raster map layer. The user can use it to grow by one or
-more than one cell (by varying the size of the <b>radius</b>
-parameter), or like <em>r.buffer</em>, but with the
-option of preserving the original cells (similar to combining
-<em>r.buffer</em> and <em>r.patch</em>).
-<p>
-A negative <b>radius</b> shrinks inwards instead of growing outwards.
-
-
-<h2>NOTES</h2>
-The user has the option of specifying three different metrics which
-control the geometry in which grown cells are created, (controlled by
-the <b>metric</b> parameter): <i>Euclidean</i>, <i>Manhattan</i>, and 
-<i>Maximum</i>. 
-
-<p>
-The <i>Euclidean distance</i> or <i>Euclidean metric</i> is the "ordinary" distance 
-between two points that one would measure with a ruler, which can be 
-proven by repeated application of the Pythagorean theorem. 
-The formula is given by: 
-
-<div class="code"><pre>d(dx,dy) = sqrt(dx^2 + dy^2)</pre></div>
-
-Cells grown using this metric would form isolines of distance that are
-circular from a given point, with the distance given by the <b>radius</b>.
-
-<p>
-The <i>Manhattan metric</i>, or <i>Taxicab geometry</i>, is a form of geometry in 
-which the usual metric of Euclidean geometry is replaced by a new 
-metric in which the distance between two points is the sum of the (absolute) 
-differences of their coordinates. The name alludes to the grid layout of 
-most streets on the island of Manhattan, which causes the shortest path a 
-car could take between two points in the city to have length equal to the
-points' distance in taxicab geometry.
-The formula is given by:
-
-<div class="code"><pre>d(dx,dy) = abs(dx) + abs(dy)</pre></div>
-
-where cells grown using this metric would form isolines of distance that are
-rhombus-shaped from a given point. 
-
-<p>
-The <i>Maximum metric</i> is given by the formula
-
-<div class="code"><pre>d(dx,dy) = max(abs(dx),abs(dy))</pre></div>
-
-where the isolines of distance from a point are squares.
-
-<p>
-If there are two cells which are equal candidates to grow into an empty space, 
-<em>r.grow</em> will choose the northernmost candidate; if there are multiple 
-candidates with the same northing, the westernmost is chosen. 
-
-
-<h2>EXAMPLE</h2>
-
-You can shrink inwards by using a negative radius. For example:
-<div class="code"><pre>
-# North Carolina sample dataset
-
-g.region rast=lakes
-r.grow in=lakes out=lakes.shrunken radius=-2.01
-r.colors lakes.shrunken rast=lakes
-</pre></div>
-
-
-<h2>SEE ALSO</h2>
-
-<em>
-<a href="r.buffer.html">r.buffer</a>,
-<a href="r.grow.distance.html">r.grow.distance</a>
-</em>
-
-<p>
-<em>
-<a href="r.distance.html">r.distance</a>,
-<a href="r.patch.html">r.patch</a>
-</em>
-
-<p>
-<em><a href="http://en.wikipedia.org/wiki/Euclidean_metric">Wikipedia Entry: Euclidean Metric</a></em><br>
-<em><a href="http://en.wikipedia.org/wiki/Manhattan_metric">Wikipedia Entry: Manhattan Metric</a></em>
-
-
-<h2>AUTHORS</h2>
-
-Marjorie Larson, 
-U.S. Army Construction Engineering Research Laboratory
-<p>
-Glynn Clements
-
-<p>
-<i>Last changed: $Date$</i>

Copied: grass-addons/grass7/raster/r.grow.shrink/r.grow.shrink.html (from rev 62813, grass/trunk/raster/r.grow/r.grow.html)
===================================================================
--- grass-addons/grass7/raster/r.grow.shrink/r.grow.shrink.html	                        (rev 0)
+++ grass-addons/grass7/raster/r.grow.shrink/r.grow.shrink.html	2014-11-19 23:02:46 UTC (rev 62819)
@@ -0,0 +1,98 @@
+<h2>DESCRIPTION</h2>
+
+<em>r.grow.shrink</em> adds cells around the perimeters of all areas
+in a user-specified raster map layer and stores the output in
+a new raster map layer. The user can use it to grow by one or
+more than one cell (by varying the size of the <b>radius</b>
+parameter), or like <em>r.buffer</em>, but with the
+option of preserving the original cells (similar to combining
+<em>r.buffer</em> and <em>r.patch</em>).
+<p>
+A negative <b>radius</b> shrinks inwards instead of growing outwards.
+
+
+<h2>NOTES</h2>
+The user has the option of specifying three different metrics which
+control the geometry in which grown cells are created, (controlled by
+the <b>metric</b> parameter): <i>Euclidean</i>, <i>Manhattan</i>, and 
+<i>Maximum</i>. 
+
+<p>
+The <i>Euclidean distance</i> or <i>Euclidean metric</i> is the "ordinary" distance 
+between two points that one would measure with a ruler, which can be 
+proven by repeated application of the Pythagorean theorem. 
+The formula is given by: 
+
+<div class="code"><pre>d(dx,dy) = sqrt(dx^2 + dy^2)</pre></div>
+
+Cells grown using this metric would form isolines of distance that are
+circular from a given point, with the distance given by the <b>radius</b>.
+
+<p>
+The <i>Manhattan metric</i>, or <i>Taxicab geometry</i>, is a form of geometry in 
+which the usual metric of Euclidean geometry is replaced by a new 
+metric in which the distance between two points is the sum of the (absolute) 
+differences of their coordinates. The name alludes to the grid layout of 
+most streets on the island of Manhattan, which causes the shortest path a 
+car could take between two points in the city to have length equal to the
+points' distance in taxicab geometry.
+The formula is given by:
+
+<div class="code"><pre>d(dx,dy) = abs(dx) + abs(dy)</pre></div>
+
+where cells grown using this metric would form isolines of distance that are
+rhombus-shaped from a given point. 
+
+<p>
+The <i>Maximum metric</i> is given by the formula
+
+<div class="code"><pre>d(dx,dy) = max(abs(dx),abs(dy))</pre></div>
+
+where the isolines of distance from a point are squares.
+
+<p>
+If there are two cells which are equal candidates to grow into an empty space, 
+<em>r.grow</em> will choose the northernmost candidate; if there are multiple 
+candidates with the same northing, the westernmost is chosen. 
+
+
+<h2>EXAMPLE</h2>
+
+You can shrink inwards by using a negative radius. For example:
+<div class="code"><pre>
+# North Carolina sample dataset
+
+g.region rast=lakes
+r.grow.shrink in=lakes out=lakes.shrunken radius=-2.01
+r.colors lakes.shrunken rast=lakes
+</pre></div>
+
+
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="r.buffer.html">r.buffer</a>,
+<a href="r.grow.html">r.grow</a>,
+<a href="r.grow.distance.html">r.grow.distance</a>
+</em>
+
+<p>
+<em>
+<a href="r.distance.html">r.distance</a>,
+<a href="r.patch.html">r.patch</a>
+</em>
+
+<p>
+<em><a href="http://en.wikipedia.org/wiki/Euclidean_metric">Wikipedia Entry: Euclidean Metric</a></em><br>
+<em><a href="http://en.wikipedia.org/wiki/Manhattan_metric">Wikipedia Entry: Manhattan Metric</a></em>
+
+
+<h2>AUTHORS</h2>
+
+Marjorie Larson, 
+U.S. Army Construction Engineering Research Laboratory
+<p>
+Glynn Clements
+
+<p>
+<i>Last changed: $Date$</i>



More information about the grass-commit mailing list