[GRASS-SVN] r57198 - grass-addons/grass7/vector/v.surf.mass

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 17 08:56:10 PDT 2013


Author: neteler
Date: 2013-07-17 08:56:10 -0700 (Wed, 17 Jul 2013)
New Revision: 57198

Added:
   grass-addons/grass7/vector/v.surf.mass/v_surf_mass_pycno.png
   grass-addons/grass7/vector/v.surf.mass/v_surf_mass_voronoi.png
Modified:
   grass-addons/grass7/vector/v.surf.mass/
   grass-addons/grass7/vector/v.surf.mass/main.c
   grass-addons/grass7/vector/v.surf.mass/v.surf.mass.html
Log:
v.surf.mass: screenshots added in example; manual cosmetics


Property changes on: grass-addons/grass7/vector/v.surf.mass
___________________________________________________________________
Added: svn:ignore
   + OBJ.*
*.tmp.html


Modified: grass-addons/grass7/vector/v.surf.mass/main.c
===================================================================
--- grass-addons/grass7/vector/v.surf.mass/main.c	2013-07-17 15:32:19 UTC (rev 57197)
+++ grass-addons/grass7/vector/v.surf.mass/main.c	2013-07-17 15:56:10 UTC (rev 57198)
@@ -6,6 +6,7 @@
  * AUTHOR(S):    Markus Metz
  *
  * PURPOSE:      Mass-preserving area interpolation
+ *               (Smooth Pycnophylactic Interpolation after Tobler 1979)
  *
  * COPYRIGHT:    (C) 2013 by by the GRASS Development Team
  *
@@ -76,6 +77,7 @@
     G_add_keyword(_("vector"));
     G_add_keyword(_("surface"));
     G_add_keyword(_("interpolation"));
+    G_add_keyword(_("pycnophylactic interpolation"));
     module->description =
 	_("Performs mass-preserving area interpolation.");
 

Modified: grass-addons/grass7/vector/v.surf.mass/v.surf.mass.html
===================================================================
--- grass-addons/grass7/vector/v.surf.mass/v.surf.mass.html	2013-07-17 15:32:19 UTC (rev 57197)
+++ grass-addons/grass7/vector/v.surf.mass/v.surf.mass.html	2013-07-17 15:56:10 UTC (rev 57198)
@@ -8,7 +8,7 @@
 
 <h2>NOTES</h2>
 
-<p>The current region needs to be prepared with 
+The current region needs to be prepared with 
 <a href="g.region.html">g.region</a>, choosing a resolution such that 
 the smallest area is covered by at least four pixels. The current region 
 should be completely inside the bounding box of the vector.
@@ -19,19 +19,22 @@
 <h3>Pycnophylactic interpolation of Voronoi triangles using annual precipitation in the 
 North Carolina sample data</h3>
 
+(see below for screenshots of the results)
+
 <div class="code"><pre>
 # setting the region
 g.region -p rast=elev_state_500m
 
-# Voronoi triangulation
-v.voronoi input=precip_30ynormals at PERMANENT output=precip_annual
+# create Voronoi diagram based on meteorological stations
+v.voronoi input=precip_30ynormals output=precip_annual
 
 # List of attributes for the vector precip_annual
 v.info -c precip_annual
 
 # v.surf.mass converts attributes to density, thus:
 # new column for area size and adjusted precipitation
-v.db.addcolumn map=precip_annual column="area double precision, prec_adj double precision"
+v.db.addcolumn map=precip_annual \
+     column="area double precision, prec_adj double precision"
 v.to.db map=precip_annual column=area option=area units=meters
 
 # Getting the size of the smallest area
@@ -39,12 +42,12 @@
 
 # The smallest area with some population is 1.20789e+08 square meters
 # and with a resolution of 5000 meters covered by appr. four pixels 
-# (depending on the shape of the area)
-# adjust region
+# (depending on the shape of the area). Adjust region for that:
 g.region res=5000 -ap
 
-# adjust precipitation: multiply by area size, dived by pixel size
-v.db.update map=precip_annual column=prec_adj qcolumn="annual * area / 25000000"
+# adjust precipitation values: multiply by area size, dived by pixel size
+v.db.update map=precip_annual column=prec_adj \
+     qcolumn="annual * area / 25000000"
 
 # set North Carolina state as MASK for nicer raster output
 r.mapcalc "MASK = if(isnull(elev_state_500m), null(), 1)"
@@ -52,7 +55,7 @@
 # mass-preserving area interpolation
 v.surf.mass input=precip_annual output=precip_annual_pycno column=prec_adj iterations=200
 
-# comparison
+# rasterize Voronoi digram for comparison
 v.to.rast precip_annual out=precip_annual_voronoi type=area use=attr attrcolumn=annual
 
 # remove MASK
@@ -64,6 +67,16 @@
 d.rast.leg precip_annual_pycno
 </pre></div>
 
+<center>
+<img src="v_surf_mass_voronoi.png" border="0"><br>
+<i>Annual precipitation (30 years avg.) of North Carolina shown
+   as Voronoi diagram based on meteorological stations (perspective
+   view in NVIZ).</i>
+<img src="v_surf_mass_pycno.png" border="0"><br>
+<i>Smooth Pycnophylactic Interpolation of annual precipitation
+ (30 years avg.) of North Carolina using the Voronoi diagram map
+ based on meteorological stations (perspective view in NVIZ).</i>
+</center>
 
 <h2>REFERENCES</h2>
 
@@ -71,7 +84,7 @@
 Regions. Journal of the American Statistical Association, 74 (367): 
 519-530. 
 
-<h2>AUTHORS</h2>
+<h2>AUTHOR</h2>
 
 Markus Metz
 

Added: grass-addons/grass7/vector/v.surf.mass/v_surf_mass_pycno.png
===================================================================
(Binary files differ)


Property changes on: grass-addons/grass7/vector/v.surf.mass/v_surf_mass_pycno.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: grass-addons/grass7/vector/v.surf.mass/v_surf_mass_voronoi.png
===================================================================
(Binary files differ)


Property changes on: grass-addons/grass7/vector/v.surf.mass/v_surf_mass_voronoi.png
___________________________________________________________________
Added: svn:mime-type
   + image/png



More information about the grass-commit mailing list