diff --git a/raster/r.buffer/Makefile b/raster/r.buffer/Makefile index 6b073b8a024..028bf782e66 100644 --- a/raster/r.buffer/Makefile +++ b/raster/r.buffer/Makefile @@ -1,6 +1,6 @@ MODULE_TOPDIR = ../.. -PGM = r.buffer2 +PGM = r.buffer LIBES = $(RASTERLIB) $(GISLIB) DEPENDENCIES = $(RASTERDEP) $(GISDEP) diff --git a/scripts/r.buffer/r.buffer.html b/raster/r.buffer/r.buffer.html similarity index 90% rename from scripts/r.buffer/r.buffer.html rename to raster/r.buffer/r.buffer.html index 8cff03e8431..e2e6e291127 100644 --- a/scripts/r.buffer/r.buffer.html +++ b/raster/r.buffer/r.buffer.html @@ -29,6 +29,7 @@

DESCRIPTION


+

NOTES

The user has the option of identifying up to 250 continuous zones. @@ -67,6 +68,14 @@

NOTES

The -z flag can be used to ignore raster values of zero instead of NULL values in the input raster map.

+When working with massive raster regions consider the r.buffer.lowmem +module if RAM use becomes a problem. The lowmem version can be > 40x slower, +but will work with minimal memory requirements. The classic r.buffer +should be able to deal with raster maps of 32000x32000 size on a system with +1 GB RAM, and rasters of 90000x90000 on a system with 8 GB RAM without going +into swap. + +

EXAMPLE

In the following example, the buffer zones would be (in the default units @@ -89,10 +98,12 @@

EXAMPLE

6 400-500 meters +

SEE ALSO

g.region
+r.buffer.lowmem
r.cost
r.mapcalc
r.reclass
diff --git a/scripts/Makefile b/scripts/Makefile index 06ec279e2fa..e747fb89ca4 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -25,7 +25,7 @@ SUBDIRS = \ i.tasscap \ m.proj \ r.blend \ - r.buffer \ + r.buffer.lowmem \ r.colors.stddev \ r.fillnulls \ r.grow \ diff --git a/scripts/r.buffer/Makefile b/scripts/r.buffer.lowmem/Makefile similarity index 80% rename from scripts/r.buffer/Makefile rename to scripts/r.buffer.lowmem/Makefile index e0c418591d3..c16e621956e 100644 --- a/scripts/r.buffer/Makefile +++ b/scripts/r.buffer.lowmem/Makefile @@ -1,6 +1,6 @@ MODULE_TOPDIR = ../.. -PGM = r.buffer +PGM = r.buffer.lowmem include $(MODULE_TOPDIR)/include/Make/Script.make diff --git a/raster/r.buffer/r.buffer2.html b/scripts/r.buffer.lowmem/r.buffer.lowmem.html similarity index 85% rename from raster/r.buffer/r.buffer2.html rename to scripts/r.buffer.lowmem/r.buffer.lowmem.html index 8cff03e8431..ac057589b50 100644 --- a/raster/r.buffer/r.buffer2.html +++ b/scripts/r.buffer.lowmem/r.buffer.lowmem.html @@ -1,10 +1,21 @@

DESCRIPTION

-r.buffer creates a new raster map layer showing +r.buffer.lowmem creates a new raster map layer showing buffer (a.k.a. "distance" or "proximity") zones around all cells that contain non-NULL category values in an existing raster map layer. The distances of buffer zones from cells -with non-zero category values are user-chosen. Suppose, +with non-zero category values are user-chosen. + +

+This is the low-memory alternative to the classic r.buffer +module. It is much slower than the classic version, but will +run on massive raster maps without using a lot of RAM. If your +raster map is larger than 32000x32000 cells on a system with +1 GB of RAM, or larger than 90000x90000 cells on a system with +8 GB of RAM, consider using this module. + +

+Suppose, for example, that you want to place buffer zones around roads. This program could create the raster map layer shown below on the right based on road information @@ -93,7 +104,9 @@

SEE ALSO

g.region
+r.buffer
r.cost
+r.grow.distance
r.mapcalc
r.reclass
v.buffer @@ -107,5 +120,8 @@

AUTHORS


James Westervelt, U.S. Army Construction Engineering Research Laboratory +
+Low-memory Python version by Glynn Clements -

Last changed: $Date$ +

+Last changed: $Date$ diff --git a/scripts/r.buffer/r.buffer.py b/scripts/r.buffer.lowmem/r.buffer.lowmem.py similarity index 97% rename from scripts/r.buffer/r.buffer.py rename to scripts/r.buffer.lowmem/r.buffer.lowmem.py index a2983fb49ac..ee24d707b94 100755 --- a/scripts/r.buffer/r.buffer.py +++ b/scripts/r.buffer.lowmem/r.buffer.lowmem.py @@ -2,9 +2,9 @@ # ############################################################################ # -# MODULE: r.buffer +# MODULE: r.buffer.lowmem # AUTHOR(S): Glynn Clements -# PURPOSE: Replacement for r.buffer using r.grow.distance +# PURPOSE: Low-memory replacement for r.buffer using r.grow.distance # # COPYRIGHT: (C) 2008, 2010 by Glynn Clements #