[GRASS-SVN] r43469 - in grass/trunk: display/d.graph display/d.his general/g.message gui/wxpython/docs ps/ps.map raster/r.basins.fill raster/r.cost raster/r.in.xyz raster/r.out.gdal raster/r.proj raster/r.resamp.bspline raster/r.watershed/front raster/r.what scripts/m.proj tools vector/v.lidar.correction vector/v.lidar.edgedetection vector/v.lidar.growing vector/v.outlier vector/v.reclass vector/v.segment vector/v.surf.bspline

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 15 16:39:49 EDT 2010


Author: martinl
Date: 2010-09-15 20:39:49 +0000 (Wed, 15 Sep 2010)
New Revision: 43469

Modified:
   grass/trunk/display/d.graph/d.graph.html
   grass/trunk/display/d.his/d.his.html
   grass/trunk/general/g.message/g.message.html
   grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html
   grass/trunk/ps/ps.map/ps.map.html
   grass/trunk/raster/r.basins.fill/r.basins.fill.html
   grass/trunk/raster/r.cost/r.cost.html
   grass/trunk/raster/r.in.xyz/r.in.xyz.html
   grass/trunk/raster/r.out.gdal/r.out.gdal.html
   grass/trunk/raster/r.proj/r.proj.html
   grass/trunk/raster/r.resamp.bspline/r.resamp.bspline.html
   grass/trunk/raster/r.watershed/front/r.watershed.html
   grass/trunk/raster/r.what/r.what.html
   grass/trunk/scripts/m.proj/m.proj.html
   grass/trunk/tools/mkhtml.py
   grass/trunk/vector/v.lidar.correction/v.lidar.correction.html
   grass/trunk/vector/v.lidar.edgedetection/v.lidar.edgedetection.html
   grass/trunk/vector/v.lidar.growing/v.lidar.growing.html
   grass/trunk/vector/v.outlier/v.outlier.html
   grass/trunk/vector/v.reclass/v.reclass.html
   grass/trunk/vector/v.segment/v.segment.html
   grass/trunk/vector/v.surf.bspline/v.surf.bspline.html
Log:
toc in manual implemented


Modified: grass/trunk/display/d.graph/d.graph.html
===================================================================
--- grass/trunk/display/d.graph/d.graph.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/display/d.graph/d.graph.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -176,14 +176,14 @@
 A dynamic example can be found in the <em>d.polar</em> shell script.
 
 
-<h4>Draw a "star" symbol at a given map coordinate</h4>
+<h3>Draw a "star" symbol at a given map coordinate</h3>
 
 <div class="code"><pre>
 echo "symbol basic/star 20 2264417 5413182 black red" | d.graph -m
 </pre></div>
 
 
-<h4>Split the screen into quadrants:</h4>
+<h3>Split the screen into quadrants:</h3>
 
 <div class="code"><pre>
 d.frame -s full_screen

Modified: grass/trunk/display/d.his/d.his.html
===================================================================
--- grass/trunk/display/d.his/d.his.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/display/d.his/d.his.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -112,7 +112,7 @@
 
 
 <H2>EXAMPLE</H2>
-<h4>Spearfish dataset</h4>
+<h3>Spearfish dataset</h3>
 
 <div class="code"><pre>
   g.region rast=elevation.dem

Modified: grass/trunk/general/g.message/g.message.html
===================================================================
--- grass/trunk/general/g.message/g.message.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/general/g.message/g.message.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -44,7 +44,7 @@
 <tt>$VARIABLE</tt> expansion.
 <P>
 
-<h4>VERBOSITY LEVELS</h4>
+<h3>VERBOSITY LEVELS</h3>
 Controlled by the "<tt>GRASS_VERBOSE</tt>" environment variable. Typically this
 is set using the <tt>--quiet</tt> or <tt>--verbose</tt> command line options.
 <ul>
@@ -54,7 +54,7 @@
 <li>3 - additional verbose messages are printed
 </ul>
 
-<h4>DEBUG LEVELS</h4>
+<h3>DEBUG LEVELS</h3>
 Controlled by the "<tt>DEBUG</tt>" GRASS <i>gisenv</i> variable. (set with
 <em><a href="g.gisenv.html">g.gisenv</a></em>)
 <BR>

Modified: grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html
===================================================================
--- grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -5,15 +5,21 @@
 <p>
 <b>Graphical modeler</b> is a <em><a href="wxGUI.html">wxGUI</a></em>
 extension which allows the user to create, edit, and manage
-models. It's available from the menu &quot;File | Graphical modeler&quot;.
+models. The modeler can be launched from the menu &quot;File |
+Graphical modeler&quot; or by clicking on
+icon <img src="icons/grass2/modeler-main.png"> in the toolbar.
 
 <p>
 The modeler currently allows to:
 
 <ul>
   <li>define actions (GRASS modules)
-  <li>define data items (raster, vector, 3D raster)
+  <li>define data items (raster, vector, 3D raster maps)
   <li>define relations between data and action items
+  <li>define loops and conditions (if-else statements)
+  <li>define model variables
+  <li>define intermediate data
+  <li>parameterize actions
   <li>validate model
   <li>run model
   <li>store model settings to the file (GRASS Model File|*.gxm)
@@ -29,7 +35,7 @@
 </em>
 
 <p>
-See also <a href="http://grass.osgeo.org/wiki/WxGUI_Modeler">wiki</a> page.
+See also user <a href="http://grass.osgeo.org/wiki/WxGUI_Modeler">wiki</a> page.
 
 <h2>AUTHORS</h2>
 

Modified: grass/trunk/ps/ps.map/ps.map.html
===================================================================
--- grass/trunk/ps/ps.map/ps.map.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/ps/ps.map/ps.map.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -272,7 +272,7 @@
 legends.
 
 
-<h4>Categorical (CELL) Maps</h4>
+<h3>Categorical (CELL) Maps</h3>
 
 Adding the <B>nodata N</B> instruction will prevent the "no data" box 
 from being drawn (category based legends only). If you have manually
@@ -288,7 +288,7 @@
 have a label. You can use the <em>r.category</em> module to add labels.
 
 
-<h4>Floating point (FCELL and DCELL) Maps</h4>
+<h3>Floating point (FCELL and DCELL) Maps</h3>
 
 The legend's <B>range</B> can be adjusted for floating point rasters, but if
 set beyond the extent of the map's range be sure that you have set up color 
@@ -1605,7 +1605,7 @@
 
 The following are examples of <EM>ps.map</EM> script files.
 <P>
-<h4>Simple example</h4>
+<h3>Simple example</h3>
 The file has been named <EM>spear.basic</EM>:
 
 <PRE>
@@ -1625,7 +1625,7 @@
 </PRE>
 
 
-<h4>More complicated example</h4>
+<h3>More complicated example</h3>
 The file has been named <EM>spear.soils</EM>:
 
 <PRE>

Modified: grass/trunk/raster/r.basins.fill/r.basins.fill.html
===================================================================
--- grass/trunk/raster/r.basins.fill/r.basins.fill.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.basins.fill/r.basins.fill.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -40,7 +40,6 @@
 r.watershed</a> for further details on the combined use of
 <em>r.basins.fill</em> and <em><a href="r.watershed.html">r.watershed</a></em>.
 
-<p>
 <em>
   <a href="r.watershed.html">r.watershed</a>,
   <a href="wxGUI.Vector_Digitizing_Tool.html">wxGUI vector digitizer</a>

Modified: grass/trunk/raster/r.cost/r.cost.html
===================================================================
--- grass/trunk/raster/r.cost/r.cost.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.cost/r.cost.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -121,7 +121,7 @@
 This problem doesn't arise with floating point maps.
 
 
-<h4>Algorithm notes</h4>
+<h3>Algorithm notes</h3>
 
 The fundamental approach to calculating minimum travel cost is as
 follows:<p> The user generates a raster map indicating the cost of
@@ -202,7 +202,7 @@
 those that are different between operations using and not using the
 Knight's move (<b>-k</b>) option.
 
-<h4>Output analysis</h4>
+<h3>Output analysis</h3>
 
 The output map can be viewed, for example, as an elevation model in which
 the starting location(s) is/are the lowest point(s). Outputs from  <em>r.cost</em>
@@ -212,7 +212,7 @@
 two programs, when used together, generate least-cost paths or corridors between any 
 two map locations (cells).
 
-<h4>Shortest distance surfaces</h4>
+<h3>Shortest distance surfaces</h3>
 The <em>r.cost</em> module allows for computing the shortest distance 
 of each pixel from raster lines, such as determining the shortest distances
 of households to the nearby road. For this cost surfaces with cost value 1 are

Modified: grass/trunk/raster/r.in.xyz/r.in.xyz.html
===================================================================
--- grass/trunk/raster/r.in.xyz/r.in.xyz.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.in.xyz/r.in.xyz.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -40,7 +40,7 @@
 
 <h2>NOTES</h2>
 
-<h4>Gridded data</h4>
+<h3>Gridded data</h3>
 
 If data is known to be on a regular grid <em>r.in.xyz</em> can reconstruct
 the map perfectly as long as some care is taken to set up the region
@@ -60,7 +60,7 @@
 should be identical regardless of which of those methods are used.
 
 
-<h4>Memory use</h4>
+<h3>Memory use</h3>
 
 While the <b>input</b> file can be arbitrarily large, <em>r.in.xyz</em>
 will use a large amount of system memory for large raster regions (10000x10000).
@@ -85,7 +85,7 @@
 If reading data from a <tt>stdin</tt> stream, the program can only run using
 a single pass.
 
-<h4>Setting region bounds and resolution</h4>
+<h3>Setting region bounds and resolution</h3>
 
 You can use the <b>-s</b> scan flag to find the extent of the input data
 (and thus point density) before performing the full import. Use
@@ -115,7 +115,7 @@
 as well use "<tt>v.in.ascii&nbsp;-zbt</tt>" directly.
 
 
-<h4>Filtering</h4>
+<h3>Filtering</h3>
 
 Points falling outside the current region will be skipped. This includes
 points falling <em>exactly</em> on the southern region bound.
@@ -148,13 +148,13 @@
 <em>r.neighbors</em> to smooth the stddev map before further use.]
 
 
-<h4>Reprojection</h4>
+<h3>Reprojection</h3>
 
 If the raster map is to be reprojected, it may be more appropriate to reproject
 the input points with <em>m.proj</em> or <em>cs2cs</em> before running
 <em>r.in.xyz</em>.
 
-<h4>Interpolation into a DEM</h4>
+<h3>Interpolation into a DEM</h3>
 
 The vector engine's topographic abilities introduce a finite memory overhead
 per vector point which will typically limit a vector map to approximately

Modified: grass/trunk/raster/r.out.gdal/r.out.gdal.html
===================================================================
--- grass/trunk/raster/r.out.gdal/r.out.gdal.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.out.gdal/r.out.gdal.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -80,7 +80,7 @@
 for details.
 
 
-<h4>Ranges of GDAL data types</h4>
+<h3>Ranges of GDAL data types</h3>
 <pre>
   GDAL data type	       minimum  	maximum
 
@@ -120,7 +120,7 @@
 stretching the color table to actual min/max would help (sometimes under
 symbology).
 
-<h4>GeoTIFF caveats</h4>
+<h3>GeoTIFF caveats</h3>
 
 GeoTIFF exports can only be displayed by standard image viewers
 if the GDAL data type was set to Byte and the GeoTIFF contains either
@@ -137,7 +137,7 @@
 This issue only arises when writing out multi-band imagery groups.
 <p>
 
-<h4>Improving GeoTIFF compatibility</h4>
+<h3>Improving GeoTIFF compatibility</h3>
 
 To create a GeoTIFF that is highly compatible with various other GIS
 software packages, it is recommended to keep the GeoTIFF file as simple
@@ -175,31 +175,31 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Export the integer raster roads map to GeoTIFF format:</h4>
+<h3>Export the integer raster roads map to GeoTIFF format:</h3>
 <div class="code"><pre>
 r.out.gdal input=roads output=roads.tif type=UInt16
 </pre></div>
 <p>
 
-<h4>Export a DCELL raster map in GeoTIFF format suitable for ESRI software:</h4>
+<h3>Export a DCELL raster map in GeoTIFF format suitable for ESRI software:</h3>
 <div class="code"><pre>
 r.out.gdal in=elevation.10m out=ned_elev10m.tif type=Float64 createopt="PROFILE=GeoTIFF,TFW=YES"
 </pre></div>
 <p>
 
-<h4>Export R,G,B imagery bands in GeoTIFF format suitable for ESRI software:</h4>
+<h3>Export R,G,B imagery bands in GeoTIFF format suitable for ESRI software:</h3>
 <div class="code"><pre>
 i.group group=nc_landsat_rgb input=lsat7_2002_30,lsat7_2002_20,lsat7_2002_10
 r.out.gdal in=nc_landsat_rgb out=nc_landsat_rgb.tif type=Byte createopt="PROFILE=GeoTIFF,INTERLEAVE=PIXEL,TFW=YES"
 </pre></div>
 <p>
 
-<h4>Export the floating point raster elevation map to ERDAS/IMG format:</h4>
+<h3>Export the floating point raster elevation map to ERDAS/IMG format:</h3>
 <div class="code"><pre>
 r.out.gdal input=elevation.10m output=elev_dem10.img format=HFA type=Float32
 </pre></div>
 
-<h4>Export group of image maps as multi-band file</h4>
+<h3>Export group of image maps as multi-band file</h3>
 <div class="code"><pre>
 g.list group
 i.group group=tm7 subgroup=tm7 input=tm7_10,tm7_20,tm7_30,tm7_40,tm7_50,tm7_60,tm7_70

Modified: grass/trunk/raster/r.proj/r.proj.html
===================================================================
--- grass/trunk/raster/r.proj/r.proj.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.proj/r.proj.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -7,7 +7,7 @@
 current PROJ_INFO files, as set with <i><a href="g.setproj.html">g.setproj</a>
 </i> and viewed with <i><a href="g.proj.html">g.proj</a></i>.
 
-<h4>Introduction</h4>
+<h3>Introduction</h3>
 
 <h5>Map projections</h5>
 
@@ -83,7 +83,7 @@
 GRASS location.
 <br><br>
 
-<h4>Design of r.proj</h4>
+<h3>Design of r.proj</h3>
 
 As discussed briefly above, the fundamental step in re-projecting a
 raster is resampling the source grid at locations corresponding to the
@@ -175,7 +175,7 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Inline method</h4>
+<h3>Inline method</h3>
 With GRASS running in the destination location use the <b>-g</b> flag to
 show the input map's bounds once projected into the current working projection,
 then use that to set the region bounds before performing the reprojection:
@@ -231,7 +231,7 @@
 </pre></div>
 
 
-<h4>v.in.region method</h4>
+<h3>v.in.region method</h3>
 <div class="code"><pre>
 
 # In the source location, use v.in.region to generate a bounding box around the

Modified: grass/trunk/raster/r.resamp.bspline/r.resamp.bspline.html
===================================================================
--- grass/trunk/raster/r.resamp.bspline/r.resamp.bspline.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.resamp.bspline/r.resamp.bspline.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -55,7 +55,7 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Basic interpolation</h4>
+<h3>Basic interpolation</h3>
 
 <div class="code"><pre>
 r.resamp.bspline input=raster_surface output=interpolated_surface method=bicubic
@@ -64,7 +64,7 @@
 A bicubic spline interpolation will be done and a raster map with estimated
 (i.e., interpolated) values will be created. 
 
-<h4>Interpolation of NULL cells and patching</h4>
+<h3>Interpolation of NULL cells and patching</h3>
 
 <div class="code"><pre>
 # set region to area with NULL cells, align region to input map
@@ -77,7 +77,7 @@
 r.patch input=input_raster,interpolated_nulls output=input_raster_gapfilled
 </pre></div>
 
-<h4>Estimation of <b><i>lambda</i></b> parameter with a cross validation proccess</h4>
+<h3>Estimation of <b><i>lambda</i></b> parameter with a cross validation proccess</h3>
 
 A random sample of points should be generated first with
 <a href="r.random.html">r.random</a>, and the current region should not

Modified: grass/trunk/raster/r.watershed/front/r.watershed.html
===================================================================
--- grass/trunk/raster/r.watershed/front/r.watershed.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.watershed/front/r.watershed.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -178,7 +178,7 @@
 
 <h2>NOTES</h2>
 
-<h4>A<sup>T</sup> least-cost search algorithm</h4>
+<h3>A<sup>T</sup> least-cost search algorithm</h3>
 <em>r.watershed</em> uses an A<sup>T</sup> least-cost search algorithm 
 (see <a href="#references">REFERENCES</a> section) designed to minimize 
 the impact of DEM data errors. Compared to <em>r.terraflow</em>, this 
@@ -203,7 +203,7 @@
 <em><a href="r.cost.html">r.cost</a></em> and
 <em><a href="r.drain.html">r.drain</a></em> on every cell on the map.
 
-<h4>Multiple flow direction (MFD)</h4>
+<h3>Multiple flow direction (MFD)</h3>
 
 <em>r.watershed</em> offers two methods to calculate surface flow: 
 single flow direction (SFD, D8) and multiple flow direction (MFD). With 
@@ -218,7 +218,7 @@
 with MFD, setting the convergence factor to a higher value can reduce 
 the amount of small sliver basins.
 
-<h4>In-memory mode and disk swap mode</h4>
+<h3>In-memory mode and disk swap mode</h3>
 There are two versions of this program: <em>ram</em> and <em>seg</em>.
 <em>ram</em> is used by default, <em>seg</em> can be used by setting 
 the <em>-m</em> flag.
@@ -246,7 +246,7 @@
 space requirements of <em>r.terraflow</em> are several times higher than
 of <em>seg</em>.
 
-<h4>Large regions with many cells</h4>
+<h3>Large regions with many cells</h3>
 In some situations, the region size (number of cells) may be too large for
 the amount of time or memory available. Running <em>r.watershed</em> may
 then require use of a coarser resolution. To make the results more closely
@@ -263,7 +263,7 @@
 using the values from the <em>neighborhood</em> output map layer that
 represents the minimum elevation within the region of the coarser cell.
 
-<h4>Basin threshold</h4>
+<h3>Basin threshold</h3>
 The minimum size of drainage basins, defined by the <em>threshold</em>
 parameter, is only relevant for those watersheds with a single stream
 having at least the <em>threshold</em> of cells flowing into it.
@@ -273,7 +273,7 @@
 an interior stream segment is determined by the distance between the
 tributaries flowing into it.
 
-<h4>MASK and no data</h4>
+<h3>MASK and no data</h3>
 <p>
 The <em>r.watershed</em> program does not require the user to have the
 current geographic region filled with elevation values.  Areas without
@@ -292,7 +292,7 @@
 <p>
 Zero (0) and negative values will be treated as elevation data (not no_data).
 
-<h4>Further processing of output layers</h4>
+<h3>Further processing of output layers</h3>
 <p>
 Problem areas, i.e. those parts of a basin with a likely underestimate of
 flow accumulation, can be easily identified with e.g.

Modified: grass/trunk/raster/r.what/r.what.html
===================================================================
--- grass/trunk/raster/r.what/r.what.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/raster/r.what/r.what.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -28,7 +28,7 @@
 <h2>EXAMPLES</h2>
 
 
-<h4>Input from <tt>stdin</tt> on the command line</h4>
+<h3>Input from <tt>stdin</tt> on the command line</h3>
 
 Input coordinates may be given directly from <tt>stdin</tt>, for example:
 <br> (input data appears between the "<tt>EOF</tt>" markers)
@@ -50,7 +50,7 @@
 </pre></div>
 
 
-<h4>Input from a text file containing coordinates</h4>
+<h3>Input from a text file containing coordinates</h3>
 
 The contents of an ASCII text file can be redirected to <em>r.what</em>
 as follows. If we have a file called <i>input_coord.txt</i> containing the
@@ -64,7 +64,7 @@
 </pre></div>
 
 
-<h4>Input coordinates given as a module option</h4>
+<h3>Input coordinates given as a module option</h3>
 
 The module's <b>east_north</b> parameter can be used to enter coordinate
 pairs directly. The maximum number of pairs will be limited by your system's
@@ -78,7 +78,7 @@
 </pre></div>
 
 
-<h4>Input coordinates piped from another program</h4>
+<h3>Input coordinates piped from another program</h3>
 
 The input coordinates may be "piped" from the <tt>stdout</tt> of another program.
 For example:
@@ -100,7 +100,7 @@
 v.out.ascii bugsites fs=' ' | r.what input=soils,aspect
 </pre></div>
 
-<h4>Output containing raster map category labels</h4>
+<h3>Output containing raster map category labels</h3>
 
 Here we use the <b>-f</b> label flag to enable the output of category labels
 associated with the raster cell(s), as well as values. (categorical maps only)

Modified: grass/trunk/scripts/m.proj/m.proj.html
===================================================================
--- grass/trunk/scripts/m.proj/m.proj.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/scripts/m.proj/m.proj.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -130,7 +130,7 @@
 If a datum is specified there is no need for the '<tt>+ellps=</tt>' or underlying
 parameters, '<tt>+a=</tt>', '<tt>+es=</tt>', etc.
 <p>
-<h4>Another custom parameter usage example:</h4>
+<h3>Another custom parameter usage example:</h3>
 
 <div class="code"><pre>
 m.proj <B>proj_in</B>="+proj=tmerc +datum=ire65 +lat_0=53.5 +lon_0=-8 +x_0=200000 \

Modified: grass/trunk/tools/mkhtml.py
===================================================================
--- grass/trunk/tools/mkhtml.py	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/tools/mkhtml.py	2010-09-15 20:39:49 UTC (rev 43469)
@@ -4,8 +4,9 @@
 #
 # MODULE:       mkhtml.py
 # AUTHOR(S):    Markus Neteler, Glynn Clements
+#               TOC by Martin Landa <landa.martin gmail.com>
 # PURPOSE:      create HTML manual page snippets
-# COPYRIGHT:    (C) 2007,2009 Glynn Clements and the GRASS Development Team
+# COPYRIGHT:    (C) 2007,2009-2010 Glynn Clements and the GRASS Development Team
 #
 #               This program is free software under the GNU General Public
 #               License (>=v2). Read the file COPYING that comes with GRASS
@@ -56,6 +57,62 @@
 
 src_data = read_file(src_file)
 
+def get_toc_item(line, pattern):
+    found = pattern.search(line)
+    if found:
+        return found.group(2).strip()
+    
+    return None
+
+def filter_toc_item(label):
+    return label.replace('"', '&quot;')
+
+def write_toc_level(line, src_list, pattern, pattern_level, level, idx):
+    indent = 4
+    
+    text = get_toc_item(line, pattern)
+    if not text:
+        return False, level
+    
+    if pattern_level > level:
+        for l in range(level, pattern_level):
+            sys.stdout.write('%s<ul>\n' % (' ' * l * indent))
+    elif level > pattern_level:
+        for l in range(level, pattern_level, -1):
+            sys.stdout.write('%s</ul>\n' % (' ' * (l - 1) * indent))
+    level = pattern_level
+    
+    sys.stdout.write('%s<li><a href="#%s">%s</a>\n' % (' ' * level * indent,
+                                                       filter_toc_item(text), filter_toc_item(text)))
+    src_list[idx] = '<a name="%s"></a>' % filter_toc_item(text) + line
+    
+    return True, level
+    
+def write_toc():
+    global src_data
+    level  = 1
+    idx    = 0
+    
+    sys.stdout.write('<a name="TOC"></a><h2>TABLE OF CONTENT</h2>\n\n<ul>\n')
+    src_list = src_data.splitlines()
+    for line in src_list:
+        found, level = write_toc_level(line, src_list,
+                                       re.compile(r"(<h2>)(.*)(</h2>)", re.IGNORECASE), 1,
+                                       level, idx)
+        if not found:
+            found, level = write_toc_level(line, src_list,
+                                           re.compile(r"(<h3>)(.*)(</h3>)", re.IGNORECASE), 2,
+                                           level, idx)
+        if not found:
+            found, level = write_toc_level(line, src_list,
+                                           re.compile(r"(<h4>)(.*)(</h4>)", re.IGNORECASE), 3,
+                                           level, idx)
+                
+        idx += 1
+    
+    sys.stdout.write('</ul>\n')
+    src_data = '\n'.join(src_list)
+
 if not re.search('<html>', src_data, re.IGNORECASE):
     tmp_data = read_file(tmp_file)
     if not re.search('<html>', tmp_data, re.IGNORECASE):
@@ -64,6 +121,7 @@
 	for line in tmp_data.splitlines(True):
 	    if not re.search('</body>|</html>', line, re.IGNORECASE):
 		sys.stdout.write(line)
+    write_toc()
 
 sys.stdout.write(src_data)
 
@@ -73,22 +131,20 @@
     sys.exit()
 
 index_names = {
-    'd': 'display',
+    'd' : 'display',
     'db': 'database',
-    'g': 'general',
-    'i': 'imagery',
-    'm': 'misc',
-    'pg': 'postGRASS',
+    'g' : 'general',
+    'i' : 'imagery',
+    'm' : 'misc',
     'ps': 'postscript',
-    'p': 'paint',
-    'r': 'raster',
+    'p' : 'paint',
+    'r' : 'raster',
     'r3': 'raster3D',
-    's': 'sites',
-    'v': 'vector'
+    's' : 'sites',
+    'v' : 'vector'
     }
 
 mod_class = pgm.split('.', 1)[0]
 index_name = index_names.get(mod_class, mod_class)
 
 sys.stdout.write(footer_tmpl.substitute(INDEXNAME = index_name))
-

Modified: grass/trunk/vector/v.lidar.correction/v.lidar.correction.html
===================================================================
--- grass/trunk/vector/v.lidar.correction/v.lidar.correction.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.lidar.correction/v.lidar.correction.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -50,12 +50,12 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Basic correction procedure</h4>
+<h3>Basic correction procedure</h3>
 <div class="code"><pre>
 v.lidar.correction input=growing output=correction out_terrain=only_terrain
 </pre></div>
 
-<h4>Second correction procedure</h4>
+<h3>Second correction procedure</h3>
 <div class="code"><pre>
 v.lidar.correction input=correction output=correction_bis out_terrain=only_terrain_bis
 </pre></div>

Modified: grass/trunk/vector/v.lidar.edgedetection/v.lidar.edgedetection.html
===================================================================
--- grass/trunk/vector/v.lidar.edgedetection/v.lidar.edgedetection.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.lidar.edgedetection/v.lidar.edgedetection.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -63,7 +63,7 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Basic edge detection</h4>
+<h3>Basic edge detection</h3>
 <div class="code"><pre>
 v.lidar.edgedetection input=vector_last output=edge see=8 sen=8 lambda_g=0.5
 </pre></div>

Modified: grass/trunk/vector/v.lidar.growing/v.lidar.growing.html
===================================================================
--- grass/trunk/vector/v.lidar.growing/v.lidar.growing.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.lidar.growing/v.lidar.growing.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -42,7 +42,7 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Basic region growing procedure</h4>
+<h3>Basic region growing procedure</h3>
 <div class="code"><pre>
 v.lidar.growing input=edge output=growing first=firstpulse
 </pre></div>

Modified: grass/trunk/vector/v.outlier/v.outlier.html
===================================================================
--- grass/trunk/vector/v.outlier/v.outlier.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.outlier/v.outlier.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -14,7 +14,7 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Basic outlier removal</h4>
+<h3>Basic outlier removal</h3>
 
 <div class="code"><pre>
 v.outlier input=vector_map output=vector_output outlier=vector_outlier thres_O=25
@@ -22,7 +22,7 @@
 
 In this case, a basic outlier removal is done with a threshold of 25 m.
 
-<h4>Basic outlier removal</h4>
+<h3>Basic outlier removal</h3>
 
 <div class="code"><pre>
 v.outlier -q input=vector_map output=vector_output outlier=vector_outlier qgis=vector_qgis
@@ -32,7 +32,7 @@
 an output vector available for visualizaton in QGIS
  (<a href="http://www.qgis.org">http://www.qgis.org</a>).
 
-<h4>North carolina location example</h4>
+<h3>North carolina location example</h3>
 
 <div class="code"><pre>
 v.outlier --o --v input=elev_lid792_bepts at PERMANENT output=elev_lid792_bepts_nooutliers outlier=elev_lid792_bepts_outliers soe=5 son=5 thres_o=0.1

Modified: grass/trunk/vector/v.reclass/v.reclass.html
===================================================================
--- grass/trunk/vector/v.reclass/v.reclass.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.reclass/v.reclass.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -36,7 +36,7 @@
 <H2>EXAMPLES</H2>
 
 
-<H4>Example 1: Reclass by rules</H4>
+<H3>Example 1: Reclass by rules</H3>
 
 <div class="code"><pre>
 v.reclass input=land output=land_u type=boundary rules=land.rcl
@@ -64,7 +64,7 @@
 <tt>select id from tland where use = 'E14'</tt> changed to category 2.
 
 
-<H4>Example 2: Reclass by attribute column</H4>
+<H3>Example 2: Reclass by attribute column</H3>
 
 (North Carolina sample dataset)<br>
 

Modified: grass/trunk/vector/v.segment/v.segment.html
===================================================================
--- grass/trunk/vector/v.segment/v.segment.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.segment/v.segment.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -10,7 +10,7 @@
 L &lt;segment id&gt; &lt;line cat&gt; &lt;start offset&gt; &lt;end offset&gt; [&lt;side offset&gt;]
 </pre></div>
 
-<h4>EXAMPLE</h4>
+<h3>EXAMPLE</h3>
 
 The user could send to <tt>stdin</tt> something like:
 <div class="code"><pre>

Modified: grass/trunk/vector/v.surf.bspline/v.surf.bspline.html
===================================================================
--- grass/trunk/vector/v.surf.bspline/v.surf.bspline.html	2010-09-15 20:38:56 UTC (rev 43468)
+++ grass/trunk/vector/v.surf.bspline/v.surf.bspline.html	2010-09-15 20:39:49 UTC (rev 43469)
@@ -88,7 +88,7 @@
 
 <h2>EXAMPLES</h2>
 
-<h4>Basic interpolation</h4>
+<h3>Basic interpolation</h3>
 
 <div class="code"><pre>
 v.surf.bspline input=point_vector output=interpolate_surface method=bicubic
@@ -97,7 +97,7 @@
 A bicubic spline interpolation will be done and a vector points map with estimated
 (i.e., interpolated) values will be created. 
 
-<h4>Basic interpolation and raster output with a longer spline step</h4>
+<h3>Basic interpolation and raster output with a longer spline step</h3>
 
 <div class="code"><pre>
 v.surf.bspline input=point_vector raster=interpolate_surface sie=25 sin=25
@@ -106,13 +106,13 @@
 A bilinear spline interpolation will be done with a spline step length of 25 map
 units. An interpolated raster map will be created at the current region resolution.
 
-<h4>Estimation of <b><i>lambda_i</i></b> parameter with a cross validation proccess</h4>
+<h3>Estimation of <b><i>lambda_i</i></b> parameter with a cross validation proccess</h3>
 
 <div class="code"><pre>
 v.surf.bspline -c input=point_vector 
 </pre></div>
 
-<h4>Estimation on sparse points</h4>
+<h3>Estimation on sparse points</h3>
 
 <div class="code"><pre>
 v.surf.bspline input=point_vector sparse=sparse_points output=interpolate_surface
@@ -120,7 +120,7 @@
 
 An output map of vector points will be created, corresponding to the sparse vector map, with interpolated values.
 
-<h4>Using attribute values instead Z-coordinates</h4>
+<h3>Using attribute values instead Z-coordinates</h3>
 <div class="code"><pre>
 v.surf.bspline input=point_vector raster=interpolate_surface layer=1 column=attrib_column
 </pre></div>
@@ -128,7 +128,7 @@
 The interpolation will be done using the values in attrib_column, in the
 table associated with layer 1.
 
-<h4>North carolina location example using Z-coordinates for interpolation</h4>
+<h3>North carolina location example using Z-coordinates for interpolation</h3>
 <div class="code"><pre>
 v.surf.bspline --o --v input=elev_lid792_bepts at PERMANENT raster=elev_lid792_rast sie=5 sin=5 method=bicubic lambda_i=0.1 -z
 </pre></div>



More information about the grass-commit mailing list