[GRASS-SVN] r68922 - grass-addons/grass7/vector/v.civil

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jul 9 15:28:28 PDT 2016


Author: jfc
Date: 2016-07-09 15:28:28 -0700 (Sat, 09 Jul 2016)
New Revision: 68922

Added:
   grass-addons/grass7/vector/v.civil/v.civil.py
Removed:
   grass-addons/grass7/vector/v.civil/v.road.html
   grass-addons/grass7/vector/v.civil/v.road.py
Log:
Rename v.road.py to v.civil.py

Added: grass-addons/grass7/vector/v.civil/v.civil.py
===================================================================
--- grass-addons/grass7/vector/v.civil/v.civil.py	                        (rev 0)
+++ grass-addons/grass7/vector/v.civil/v.civil.py	2016-07-09 22:28:28 UTC (rev 68922)
@@ -0,0 +1,835 @@
+#!/usr/bin/env python
+# -*- coding: utf-8
+"""
+Created on Wed Jul 23 18:37:36 2014
+
+ at author: jfcr
+"""
+############################################################################
+#
+# MODULE:       v.align, v0.6.0
+#
+# AUTHOR:       Jesús Fernández-Capel Rosillo
+#               Civil Engineer, Spain
+#               jfc at alcd net
+#
+# PURPOSE:      Desing roads, channels, ports...
+#
+# COPYRIGHT:    (c) 2014 Jesús Fernández-Capel Rosillo.
+#
+#               This program is free software under the GNU General Public
+#               License (>=v2). Read the file COPYING that comes with GRASS
+#               for details.
+#
+#############################################################################
+
+#%Module
+#% description: Generate a alignment for desing roads, channels, ports...
+#% keywords: vector, ROADS, CHANNELS, PORTS.
+#%End
+
+#######################
+### Required section
+#######################
+
+#%option G_OPT_V_INPUT
+#% key: name
+#% type: string
+#% description: Name of road map
+#% required: yes
+#%end
+
+#######################
+### Plant section
+#######################
+
+#%option G_OPT_V_TYPE
+#% key: plan
+#% options: plan,pks,displ,marks
+#% answer:
+#% required: no
+#% description: Plan options
+#% guisection: Plan
+#%end
+
+#%option
+#% key: pkopt
+#% type: string
+#% description:  Pks marks options values. (npk,mpk,dist,m)
+#% required: no
+#% answer: 20,100,2,4
+#% guisection: Plan
+#%end
+
+#%option G_OPT_DB_TABLE
+#% key: dtable
+#% description: Other displaced table (Default all)
+#% required: no
+##% guidependency: ocolumn,scolumns
+#% guisection: Plan
+#%end
+
+#%option G_OPT_DB_TABLE
+#% key: mtable
+#% description: Other marks table (Default all)
+#% required: no
+##% guidependency: ocolumn,scolumns
+#% guisection: Plan
+#%end
+
+#%option
+#% key: areaopt
+#% type: string
+#% description:  Pair of displaced lines for areas (1-2,2-5,5-6)
+#% required: no
+#% guisection: Plan
+#%end
+
+#######################
+### Alz section
+#######################
+
+#%option G_OPT_V_TYPE
+#% key: vert
+#% options: vert,profile
+#% answer:
+#% required: no
+#% description: Vertical options
+#% guisection: Vert
+#%end
+
+#%option
+#% key: lpscale
+#% type: integer
+#% description: Long profile vertical scale (V/H, V/1)
+#% options: 0-100
+#% answer : 4
+#% required: no
+#% guisection: Vert
+#%end
+
+#%option
+#% key: lpopt
+#% type: string
+#% description: Long profile values Longmark,distMark_x,distMark_y,DistGitarr.
+#% required: no
+#% answer: 2,20,1,20
+#% guisection: Vert
+#%end
+
+#%option
+#% key: lpoffset
+#% type: string
+#% description: Long profile offset from origin of region
+#% required: no
+#% answer: 0,0
+#% guisection: Vert
+#%end
+
+#%option
+#% key: camber
+#% type: string
+#% description: General camber
+#% required: no
+#% answer: 0
+#% guisection: Vert
+#%end
+
+#%option
+#% key: displrot
+#% type: string
+#% description: Displaced lines to rotate
+#% required: no
+#% answer: 0,0
+#% guisection: Vert
+#%end
+
+#######################
+### Trans section
+#######################
+
+#%option G_OPT_V_TYPE
+#% key: trans
+#% options: trans,profiles
+#% answer:
+#% required: no
+#% description: Vertical options
+#% guisection: Trans
+#%end
+
+#%option
+#% key: ltscale
+#% type: double
+#% description: Cross section vertical scale (V/H, V/1)
+#% required: no
+#% answer: 2
+#% guisection: Trans
+#%end
+
+#%option
+#% key: ltopt1
+#% type: string
+#% description: Cross section options values Longmark,distMark_x,distMark_y.
+#% required: no
+#% answer: 1,20,2
+#% guisection: Trans
+#%end
+
+#%option
+#% key: ltopt2
+#% type: string
+#% description: Trans section options values for nrows,distTP_x,distTP_y.
+#% required: no
+#% answer: 10,10,10
+#% guisection: Trans
+#%end
+
+#%option
+#% key: ltoffset
+#% type: string
+#% description: Trans sections profile offset from origin of region
+#% required: no
+#% answer: 0,0
+#% guisection: Trans
+#%end
+
+#########################
+### Terrain section
+#########################
+
+#%option G_OPT_V_TYPE
+#% key: terr
+#% options: slopes,sareas,topo
+#% answer:
+#% required: no
+#% description: Terrain options
+#% guisection: Terr
+#%end
+
+#%option G_OPT_R_INPUT
+#% key: dem
+#% key_desc: raster dem
+#% description: Name of DEM raster
+#% required: no
+#% guisection: Terr
+#%end
+
+#########################
+### TopoTools section
+#########################
+
+#%flag
+#% key: o
+#% description: TopoTools
+#% guisection: TopoTools
+#%end
+
+#%option G_OPT_V_TYPE
+#% key: actions
+#% options: uppoints, pnt_info
+#% answer:
+#% required: no
+#% description: Points tools
+#% guisection: TopoTools
+#%end
+
+#%option
+#% key: pk_info
+#% type: double
+#% description: PK
+#% required: no
+#% answer: 0
+#% guisection: TopoTools
+#%end
+
+#%option G_OPT_V_TYPE
+#% key: topotools
+#% options: triangle,delaunay,curved,cut_hull
+#% answer:
+#% required: no
+#% description: Triangulate and curved
+#% guisection: TopoTools
+#%end
+
+##%option G_OPT_V_TYPE
+##% key: tinraster
+##% options: tintorast,nnbathy
+##% answer:
+##% required: no
+##% description: Triangulate and curved
+##% guisection: TopoTools
+##%end
+
+
+#%option G_OPT_V_TYPE
+#% key: roundabout
+#% options: roundabout
+#% answer:
+#% required: no
+#% description: Roundabout tools
+#% guisection: TopoTools
+#%end
+
+#%option
+#% key: rround1
+#% type: string
+#% description: Minus radio for roundabout edge
+#% required: no
+#% guisection: TopoTools
+#%end
+
+#%option
+#% key: rround2
+#% type: string
+#% description: Mayor radio for roundabout edge
+#% required: no
+#% guisection: TopoTools
+#%end
+
+#%option
+#% key: azround
+#% type: string
+#% description: Azimut for roundabout start point
+#% required: no
+#% guisection: TopoTools
+#%end
+
+#%option
+#% key: cround
+#% type: string
+#% description: Center for roundabout
+#% required: no
+#% guisection: TopoTools
+#%end
+
+#%option
+#% key: roundname
+#% type: string
+#% description: Name for roundabout
+#% required: no
+#% guisection: TopoTools
+#%end
+
+#########################
+### TableTools section
+#########################
+
+#%flag
+#% key: e
+#% description: TableTools
+#% guisection: TableTools
+#%end
+
+#%option G_OPT_V_TYPE
+#% key: add
+#% options: table, row
+#% answer:
+#% required: no
+#% description: Add new table or add row to table
+#% guisection: TableTools
+#%end
+
+#%option
+#% key: tab_type
+#% type: string
+#% label: Name of table for new table or to add row
+#% description: To add new table only Displ or Marks table are supported
+#% options: Vert,Displ,Trans,Terr,Marks
+#% required: no
+#% guisection: TableTools
+#%end
+
+#%option
+#% key: tab_subname
+#% type: string
+#% label: Table subname for new table or row or displ subname to add or del col
+#% required: no
+#% guisection: TableTools
+#%end
+
+#%option
+#% key: pklist
+#% type: string
+#% label: List of Pks
+#% required: no
+#% guisection: TableTools
+#%end
+
+#%option G_OPT_V_TYPE
+#% key: displline
+#% options: add,del
+#% answer:
+#% required: no
+#% description: Add or del displaced line
+#% guisection: TableTools
+#%end
+
+#%option
+#% key: side
+#% type: string
+#% label: left or right side of Displ
+#% options: left,right
+#% required: no
+#% guisection: TableTools
+#%end
+
+#%option
+#% key: ncol
+#% type: integer
+#% label: Number of Displ to insert
+#% required: no
+#% guisection: TableTools
+#%end
+
+#%option
+#% key: sedist
+#% type: string
+#% label: start and end distance and height
+#% required: no
+#% guisection: TableTools
+#%end
+
+#########################
+### CrossTools section
+#########################
+
+#%flag
+#% key: c
+#% description: CrossTools
+#% guisection: CrossTools
+#%end
+
+#%option G_OPT_V_TYPE
+#% key: intersect
+#% options: left1, right1, left2, right2, in, out, rounda, write
+#% answer:
+#% required: no
+#% description: Plan options
+#% guisection: CrossTools
+#%end
+
+#%option G_OPT_V_INPUT
+#% key: plant1
+#% key_desc: map plant 1
+#% description: Name of first map plant
+#% required: no
+#% guisection: CrossTools
+#%end
+
+#%option
+#% key: cat1
+#% type: integer
+#% label: Categorie of align
+#% required: no
+#% answer: 1
+#% guisection: CrossTools
+#%end
+
+
+#%option G_OPT_V_INPUT
+#% key: plant2
+#% key_desc: map plant 2
+#% description: Name of second map plant
+#% required: no
+#% guisection: CrossTools
+#%end
+
+#%option
+#% key: cat2
+#% type: integer
+#% label: Categorie of align
+#% required: no
+#% answer: 1
+#% guisection: CrossTools
+#%end
+
+#%option
+#% key: dist1
+#% type: string
+#% description: Displaced distances for aling 1
+#% required: no
+#% guisection: CrossTools
+#%end
+
+#%option
+#% key: dist2
+#% type: string
+#% description: Displaced distances for aling 2
+#% required: no
+#% guisection: CrossTools
+#%end
+
+#%option
+#% key: radios
+#% type: string
+#% description: Intersections radios
+#% required: no
+#% guisection: CrossTools
+#%end
+
+#########################
+### #Options section
+#########################
+
+#%flag
+#% key: r
+#% description: Run
+#%end
+
+#%flag
+#% key: p
+#% description: Update solution from polygon
+#%end
+
+#%flag
+#% key: t
+#% description: Update solution from table plan distances_
+#%end
+
+#%option
+#% key: intr
+#% type: integer
+#% label: Interval in straights
+#% required: no
+#% answer: 1
+#%end
+
+#%option
+#% key: intc
+#% type: integer
+#% label: Interval in curves
+#% required: no
+#% answer: 1
+#%end
+
+#%option
+#% key: startend
+#% type: string
+#% label: start and end pks (last pk = -1)
+#% required: no
+#% answer: 0,-1
+#%end
+
+#%option G_OPT_F_OUTPUT
+#% key: backup
+#% description: Create backup file
+#% required: no
+#%end
+
+# ######################
+
+import os
+import sys
+
+#sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'v.road'))
+import grass.script as grass
+from grass.pygrass.utils import get_lib_path
+
+path = get_lib_path(modname='v.road')
+if path is None:
+    grass.fatal("Not able to find the modis library directory.")
+sys.path.append(path)
+
+import road_road as Road
+import road_crosstools as Tools2
+import road_topotools as Topotools
+
+
+# =============================================
+# Main
+# =============================================
+
+def main():
+    """Manage v.road
+    >>> road = Road.Road('Circuit')
+    >>>
+
+    """
+    if '@' in options['name']:
+        name_map = options['name'].split('@')[0]
+    else:
+        name_map = options['name']
+
+    plan_opt = options['plan'].split(',')
+    vert_opt = options['vert'].split(',')
+    trans_opt = options['trans'].split(',')
+    terr_opt = options['terr'].split(',')
+
+    add = options['add'].split(',')
+    displline = options['displline'].split(',')
+
+    intersect = options['intersect'].split(',')
+    topotools = options['topotools'].split(',')
+    actions = options['actions'].split(',')
+    roundabout = options['roundabout'].split(',')
+    # tinraster = options['tinraster'].split(',')
+
+    startend = [float(opt) for opt in options['startend'].split(',')]
+    pkopt = [float(opt) for opt in options['pkopt'].split(',')]
+
+    if options['tab_subname']:
+        options['tab_subname'] = '_' + options['tab_subname']
+
+    if options['tab_type']:
+        options['tab_type'] = '_' + options['tab_type']
+
+### Init road
+    road = Road.Road(name_map)
+
+################### TableTools ##################
+
+    if flags['e']:
+        # Insert new point
+        if 'row' in add:
+
+            road.plant_generate()
+
+            if ',' in options['pklist']:
+                list_pks = options['pklist'].split(',')
+            else:
+                list_pks = [options['pklist']]
+
+            road.rtab.add_row(list_pks, road.plant, options['tab_type'],
+                         options['tab_subname'])
+            sys.exit(0)
+
+        # Add new table
+        if 'table' in add:
+            road.rtab.add_table(options['tab_type'], options['tab_subname'])
+            sys.exit(0)
+
+        # Add column to Displ table
+        if 'add' in displline or 'del' in displline:
+            add_col = True
+            if 'del' in displline:
+                add_col = False
+            road.rtab.tables['_Displ' + options['tab_subname']].displ_add_del_col(
+                options['ncol'], options['side'], options['sedist'], add_col)
+        sys.exit(0)
+
+################### CrossTools ##################
+
+    if flags['c']:
+        inout = 'In'
+        if 'out' in intersect:
+            inout = 'Out'
+        rounda = False
+        if 'rounda' in intersect:
+            rounda = True
+        izq1 = 'Izq'
+        if 'right1' in intersect:
+            izq1 = 'Der'
+        izq2 = 'Izq'
+        if 'right2' in intersect:
+            izq2 = 'Der'
+
+        if '@' in options['plant1']:
+            name_plant1 = options['plant1'].split('@')[0]
+        else:
+            name_plant1 = options['plant1']
+
+        if '@' in options['plant2']:
+            name_plant2 = options['plant2'].split('@')[0]
+        else:
+            name_plant2 = options['plant2']
+
+        inter = Tools2.Intersections(name_plant1, int(options['cat1']), izq1,
+                                     name_plant2, int(options['cat2']), izq2,
+                                     inout, rounda)
+        inter.dist2 = [float(p) for p in options['dist2'].split(',')]
+        inter.dist1 = [float(p) for p in options['dist1'].split(',')]
+        inter.radios = [float(p) for p in options['radios'].split(',')]
+
+        if 'write' in intersect:
+            inter.make_intersect(True)
+        else:
+            inter.make_intersect()
+        sys.exit(0)
+
+################### Topotools ##################
+
+    if flags['o']:
+        if actions != ['']:
+            if 'uppoints' in actions:
+                topo = Topotools.Topo(name_map)
+                topo.uppoints()
+
+        if roundabout != ['']:
+            if 'roundabout' in roundabout:
+                topo = Topotools.Topo(options['roundname'])
+                topo.roundabout(options['rround1'], options['rround1'],
+                                options['azround'], options['cround'])
+
+        if topotools != ['']:
+            tri = Topotools.Triang(name_map)
+            if 'triangle' in topotools:
+                tri.split_maps()
+                tri.triangle()
+            elif 'delaunay' in topotools:
+                tri.delaunay()
+            tri.get_area_hull()
+            if 'curved' in topotools:
+                tri.curved()
+            if 'cut_hull' in topotools:
+                tri.cut_by_hull()
+
+        # if tinraster != ['']:
+            # tin = Topotools.Triang(name_map)
+            # if 'tintorast' in tinraster:
+                # tin.tin_to_raster()
+            # if 'nnbathy' in tinraster:
+                # tin.nnbathy()
+
+        sys.exit(0)
+
+################### Backup ##################
+
+    if options['backup']:
+        road.rtab.create_backup(options['backup'])
+        grass.message('backup created')
+        sys.exit(0)
+
+##################### Run ###################
+
+    if flags['r']:
+
+        if flags['t']:
+            road.plant_generate(True, float(options['camber']))
+            road.rtab.update_tables()
+        elif flags['p']:
+            road.plant_generate(False, float(options['camber']))
+            road.rtab.update_tables()
+        else:
+            road.plant_generate(False, float(options['camber']))
+
+        if 'plan' in plan_opt:
+            road.rtab.update_tables(road.plant)
+
+        road.elev_generate()
+
+        road.displ_generate()
+
+        if options['dem']:
+
+            road.terr_generate(options['dem'])
+
+            road.taludes_generate()
+
+            road.trans_generate()
+
+            if 'profile' in vert_opt:
+                road.long_profile_generate(options['lpopt'],
+                                           options['lpscale'],
+                                           options['lpoffset'])
+
+            if 'profiles' in trans_opt:
+                road.trans_profiles_generate(options['ltopt1'],
+                                             options['ltopt2'],
+                                             options['ltscale'],
+                                             options['ltoffset'])
+        else:
+            road.trans_generate()
+
+        if 'marks' in plan_opt:
+            road.marks_generate()
+
+### Write maps
+
+        if flags['o']:
+            if actions != ['']:
+                if 'pnt_info' in actions:
+                    pto_inf = Topotools.Topo(name_map)
+                    pto_inf.pts_info(options['pk_info'], road)
+            sys.exit(0)
+
+        #
+        road.plant.set_roadline(startend[0], startend[1],
+                                float(options['intr']), float(options['intc']))
+        road.plant.add_pks(road.rtab.get_tables_pks())
+
+        road.vert.set_pnts_elev(road.plant.roadline)
+
+        road.displ.set_roadlines(road.plant.roadline)
+
+        #
+        if 'plan' in plan_opt:
+            grass.message('writing plan')
+            road.plant_write()
+
+        if 'displ' in plan_opt:
+            grass.message('writing displ')
+            road.displ_write()
+
+        if 'marks' in plan_opt:
+            grass.message('writing marks')
+            road.marks_write()
+
+        if 'pks' in plan_opt:
+            grass.message('writing pks')
+            road.trans_write_pks(startend, pkopt)
+
+        #
+        if 'vert' in vert_opt:
+            grass.message('writing elev')
+            road.elev_write()
+
+        #
+        if 'trans' in trans_opt:
+            grass.message('writing trans')
+            road.trans_write()
+
+        if options['dem']:
+
+            road.terr.set_pnts_terr(road.plant.roadline)
+
+            road.taludes.set_roadlines(road.plant.roadline, road.displ)
+
+            #
+            if 'profile' in vert_opt:
+                grass.message('writing profile')
+                road.long_profile_write()
+
+            if 'profiles' in trans_opt:
+                grass.message('writing profiles')
+                road.trans_profiles_write()
+
+            #
+            if 'slopes' in terr_opt:
+                grass.message('writing slopes')
+                road.taludes_write()
+
+            if 'sareas' in terr_opt:
+                grass.message('writing slopes_areas')
+                road.taludes_areas_write()
+
+            if 'topo' in terr_opt:
+                grass.message('writing pnts, breakliness and hull for \
+                               triangulation')
+                road.tri_write()
+
+        tab_subname_d = ''
+        if options['dtable']:
+            tab_subname_d = options['dtable'].split('_Displ')[-1]
+            road.displ_generate(tab_subname_d)
+            road.displ.set_roadlines(road.plant.roadline)
+            road.displ_write('_' + tab_subname_d)
+
+        if options['mtable']:
+            road.marks_generate(options['mtable'])
+            tab_subname_m = '_' + options['mtable'].split('_Marks')[-1]
+            road.marks_write(tab_subname_m)
+
+        if options['areaopt']:
+            grass.message('writing displ_areas')
+            road.displ_areas_write(options['areaopt'], tab_subname_d)
+
+    sys.exit(0)
+
+if __name__ == "__main__":
+    if len(sys.argv) == 2 and sys.argv[1] == '--doctest':
+        import doctest
+        doctest.testmod()
+
+    else:
+        options, flags = grass.parser()
+        main()

Deleted: grass-addons/grass7/vector/v.civil/v.road.html
===================================================================
--- grass-addons/grass7/vector/v.civil/v.road.html	2016-07-09 20:17:08 UTC (rev 68921)
+++ grass-addons/grass7/vector/v.civil/v.road.html	2016-07-09 22:28:28 UTC (rev 68922)
@@ -1,828 +0,0 @@
-<!-- <h2>DESCRIPTION</h2> -->
-
-<em>v.civil.road</em> generates a alignment for design roads, channels, ports...
-
-
-<h2>USAGE</h2>
-
-To run the program for the first time, a map with one horizontal polygon, is
-required. 
-
-<p>
-There are three options:
-The flag <em>-r</em> for run the program,
-The flag <em>-p</em> Update solution from polygon (if you modific the polygon), 
-The flag <em>-t</em> Update solution from table plan (walk with dc_ and lr_)
-
-<p>
-The other options are described below.
-
-
-
-
-<h2>Plan</h2>
-
-<h3>plan options</h3>
-<p>
-<em>plan</em> write the horizontal alignment.
-
-<p>
-<em>pks</em> write pk marks in horizontal.
-
-<p>
-<em>displ</em> write the displaced platform lines in horizontal.
-
-<p>
-<em>marks</em> write the marks in horizontal.
-
-
-<h3>options</h3>
-
-<p>
-<em>pkopt</em> define the distance between normal marks (npk),
-distance between principal marks (mpk), longitude of normal marks and
-longitude of principal marks.
-
-<p>
-<em>areaopt</em> write the areas defined with pairs of displaced lines.
-
-
-
-
-<h2>Vertical</h2>
-
-<h3>vert options</h3>
-<p>
-<em>vert</em>  write the vertical alignment in horizontal.
-
-<p>
-<em>profile</em> write longitudinal profile map.
-
-<h3>options</h3>
-<p>
-With the option <em>LPScale</em>, the vertical scale of the longitudinal
-profile can be given.
-
-<p>
-The <em>LPopt</em> option give the longitude of marks, distance between marks
-in axis x and y, and distance between lines of the guitar.
-
-
-
-
-<h2>Cross</h2>
-
-<h3>Cross options</h3>
-<p>
-<em>cross</em>  write cross section in horizontal
-
-<p>
-<em>sections</em> write cross sections map.
-
-<h3>options</h3>
-<p>
-With the option <em>LTScale</em>, the vertical scale of the longitudinal
-profile can be given.
-
-<p>
-The <em>LTopt</em> option give the longitude of marks, distance between marks
-in axis x and y, and distance between lines of the guitar.
-
-<p>
-The <em>LTopt2</em> option give the number of rows of cross-section to display,
-distance between cross-section in axis x and y.
-
-
-
-
-
-<h2>Terrain</h2>
-
-<h3>Terr options</h3>
-<p>
-<em>slopes</em> flag write the slope soil lines calculated with the last
-displaced lines (perpendicular to the central axis).
-
-<p>
-<em>sareas</em> write the areas map with slope soil lines and the last
-displaced lines in horizontal.
-
-<p>
-<em>tri</em> write points, lines and hull area  map.
-
-
-
-<h2>Tools</h2>
-
-<p>
-The flag <em>-a</em> add a new table. Displ or Marks.
-
-<p>
-The flag <em>-i</em> insert a rows in table. List of pks for each row. 
-
-<p>
-The flag <em>-n</em> add a new displ line, ei, a new column in displ table. 
-You must give a start and end distances and height. And number of column 
-and side to insert.
-
-<p>
-The flag <em>-d</em> del a displ line, ei, a column in displ table. A number
-of column and side is required.
-
-
-<h2>Tables</h2>
-
-<p>
-We have six parts: plant, vertical, displaced, terrain, tranversal and marks.
-
-<p>
-The tables stored in the polygon map are:
-
-<h3>Layer 1:</h3>
-<p>
-Created with only cat column (if not exist), is for free use to add columns
-with information of the road.
-
-
-
-<h3>Layer 2:</h3>
-<p>
-<b>"NameRoad"_Plan</b>, for insert the parameters of the horizontal
-alignment. This layer have all vertices and nodes of the horizontal polygon.
-No more points can be added to this layer with the insert point option.
-
-<p>
-The columns are:
-
-<ul>
-    <li><b>radio</b>: radio of curve
-        <p>+ for clockwise</p>
-        <p>- for anticlockwise</p>
-    </li>
-    <li><b>a_in</b>: Parameter A of input Clothoid</li>
-    <li><b>a_out</b>: Parameter A of output Clothoid</li>
-    <li><b>widening</b>: Widening of curve (where this widening is growing
-        in the clothoid, only in mode exact)</li>
-    <li><b>superelev</b>: Parameter A of input Clothoid</li>
-    <li><b>dc_</b>: longitude of curve. For use with flag <em>-t</em></li>
-    <li><b>lr_</b>: longitude of straight. For use with flag <em>-t</em></li>
-</ul>
-
-
-
-<h3>Layer 3:</h3>
-
-<p>
-<b>"NameRoad"_Vert</b>, for insert the parameters of the vertical
-alignment.This layer are created with the first an last vertices of the
-horizontal polygon. New point can be added by the flag 'e' TableTools option,
-or with edit gui. The added points, are inserted in the central axis
-referencing by pk.
-
-<p>
-The columns are:
-
-<ul>
-    <li><b>pk</b>: kilometric point of the central axis</li>
-    <li><b>elev</b>: Elevation of the vertice of the vertical alignment</li>
-    <li><b>kv</b>: Parameter Kv of the vertical alignment</li>
-    <li><b>l</b>: Leng of parabolic curve (no yet implemented)</li>
-    <li><b>B</b>: Height of vertice of vertical polygon to the parabolic
-                curve (no yet implemented)</li>
-</ul>
-
-
-<h3>Layer 4: </h3>
-
-<b>"NameRoad"_Displ</b>, for insert the parameters of the platform.
-This layer are created with the first an last vertices of the horizontal
-polygon. New point can be added by the flag 'e' TableTools option, or with edit
-gui. The added points, are inserted in the central axis referencing by pk.
-<p>
-The columns for editing by the user are:
-
-<ul>
-    <li><b>pk</b>: kilometric point of the central axis</li>
-    <li><b>sec_left, sec_right</b>: For defining left and right platform lines
-        (distance and height to the central axis), separated by ";" </li>
-    <li><b>type_left, type_right</b>: Types of left and right lines
-        (types are: l,e,r,0). You can enter the type of multiple lines
-        separated by ";"
-        <b>l</b>: linear approximation between definition points.
-        <b>e</b>: displaced lines, mode exact.
-        <b>c</b>: ellipse between definition points.
-        <b>rR,A</b>: circle between definition points ((x-A)^2+y^2=R^2))</li>
-</ul>
-
-<p>
-Between two points, if the second input distance equal zero, the line will be
-stopped. If the second input distance equal -1, this point will not be processed
-and the next one will be considered.
-
-
-
-<h3>Layer 5: </h3>
-
-<b>"NameRoad"_Terr</b>, for insert the parameters for slopes.
-This layer are created with the first an last vertices of the horizontal
-polygon. New point can be added by the flag 'e' TableTools option, or with edit
-gui. The added points, are inserted in the central axis referencing by pk.
-<p>
-The columns for editing by the user are:
-
-<ul>
-    <li><b>cut_left</b>: Cut slope left</li>
-    <li><b>cut_right</b>: Cut slope right</li>
-    <li><b>fill_left</b>: Fill slope left</li> 
-    <li><b>fill_right</b>: Fill slope right</li>
-</ul>
-
-
-
-
-<h3>Layer 6:</h3>
-<p>
-<b>"NameRoad"_Trans</b>, for insert the parameters of transects to the central
-axis.
-This layer are created with the first an last vertices of the horizontal
-polygon. New point can be added by the flag 'e' TableTools option, or with edit gui.
-The added points, are inserted in the central axis referencing by pk.
-<p>
-The columns for editing by the user are:
-
-<ul>
-    <li><b>pk</b>: kilometric point of the central axis</li>
-    <li><b>dist_left,dist_right</b>: Distance left and right from the central
-axis</li>
-    <li><b>npk</b>: Distance between trans</li>
-</ul>
-
-
-
-
-<h3>Layer 7:</h3>
-<p>
-<b>"NameRoad"_Marks</b>, for insert the parameters of Marks.
-This layer are created with the first an last vertex of the horizontal
-polygon. New point can be added by the flag 'e' TableTools option, or with edit gui.
-The added points, are inserted in the central axis referencing by pk.
-<p>
-The columns for editing by the user are:
-
-<ul>
-    <li><b>dist</b>: distance left and right from the central axis</li>
-    <li><b>elev</b>: Elevation left and right from the central
-axis</li>
-    <li><b>azi</b>: 1 for azimuth of the point of the road or -1</li>
-    <li><b>name</b>: Name of mark</li>
-    <li><b>cod</b>: Code of mark</li>
-</ul>
-
-
-<h2>Example:</h2>
-
-<p>
-This example is done in the North Carolina data set.
-</p>
-
-<p>
-At the end of this example, there is a backup that can be executed to play with this example.
-</p>
-
-<p>
-The example start creating a closed polygon with the editor, in a created map named Circuit.
-
-<p>
-<img src="./img1.png" width="500" height="406" alt="">
-
-<p>
-After that, run the next command to get all tables in the map Circuit
-
-<pre><code>
-v.road -r name=Circuit
-</code></pre>
-
-<p>
-<img src="./img_tables1.png" width="400" height="166" alt="">
-
-
-<!-- ########################## Plant ############################## -->
-
-<h3>Plant</h3>
-<p>
-For each vertex of the polygon we define a radio and in and out clothoids. So we can write the plant and pks maps.
-
-<p>
-<img src="./img_tables2.png" width="400" height="221" alt="">
-
-<p>
-<img src="./img_a_plan.png" width="300" height="241" alt="">
-
-<pre><code>
-v.road -r name=Circuit plan=plan,pks
-</code></pre>
-
-<p>
-And we obtain the map <em>Circuit__Plant</em> and <em>Circuit__Pks</em>, and their tables.
-
-<p>
-<img src="./img2.png" width="500" height="406" alt="">
-
-<p>
-<img src="./img_tables2_2.png" width="400" height="200" alt="">
-
-<p>
-If we move some vertex of polygon we must run with the flag 'p' to update the road.
-
-<p>
-<img src="./img2_1.png" width="500" height="406" alt="">
-
-<p>
-If we change some values of columns 'dc_' (long of circle) or 'lr_' (long of straight), or fill the last line (with 'dc_' and 'lr_' too, 
-a new vertex are inserted and a new line) we must run with the flag 't' to update the road.
-
-<p>
-<img src="./img_tables2_3.png" width="400" height="200" alt="">
-
-<p>
-The distance between points of each alignments is of 1 meters by default, but this can be changed in the Interval in straights and Interval in curves options.
-
-<!-- ########################## Vertical ############################## -->
-
-<h3>Vertical</h3>
-
-At first, we have only the nodes of polygon, and if we set elev we will obtain a straight with slope. To get more
-vertices we have to add new rows to this table with <em>tabletools</em> giving the pk of the vertex.
-
-<p>
-<img src="./img_a_tooladdrow.png" width="300" height="229" alt="">
-
-<p>
-And now we have to set the elevation of those vertices and the <em>kv</em> parameter.
-
-<p>
-<img src="./img_tables3.png" width="400" height="166" alt="">
-
-<p>
-Now choose vertical option to get the vertical map in horizontal and the longitudinal profile, and give a 
-<em>DEM</em> in the terrain option.
-
-<pre><code>
-v.road -r name=Circuit vert=vert,profile dem=elev_lid792_1m
-</code></pre>
-
-<p>
-And we obtain the map <em>Circuit__Vertical</em> and <em>Circuit__LongProfile </em>, and their tables. 
-
-<p>
-<img src="./img3_2.png" width="500" height="406" alt="">
-
-
-<!-- ########################## Displaced ############################## -->
-
-<h3>Displaced</h3>
-<p>
-For first time, this table have two rows, who are the nodes of the polygon, and for that the first and the last points of the central axis.
-
-<p>
-The displaced lines are defined in sec_left,sec_right columns with a list separated with ";", starting from left to right in each side of the central axis. 
-Each displaced line is defined with distance to the central axis and height to the central axis (d,h).
-
-<p>
-The mode to calculate the displaced lines is defined in the type_left,type_right columns,for each line separated by ";".
-
-<p>
-To get more vertices we have to add new rows to this table with <em>tabletools</em> giving the pk of the vertex.
-
-<p>
-In this example we are going to define two displaced lines in the left side to the central axis and two for right side with slope 2%  to out.
- 
-<p>
-<img src="./img_tables4_1.png" width="400" height="166" alt="">
-
-<p>
-The platform lines define, the lanes of a road, the platform limits, ... Those lines can be parallel to the central axis of a road (or not). 
-If it's so, we need to know that the parallel to a clothoid is not a clothoid. Then we have two ways to do the platform lines.
-
-<p>
-In the first way, mode exact "e", we need to calculate a new displaced central axis, e.i., a parallel to the polygon not to the central axis. 
-The new alignment or displaced line created within the new polygon have new clothoids for the transitions. 
-To run this mode, the first and the last points, of a section of the road, must have the same displaced distance.
-
-<p>
-The widening parameter of the section above, only will be calculate in this mode, because the widening growing in the clothoid, 
-then is applied only to the displaced lines calculated with clothoid.
-
-<p>
-The second way, mode lineal "l", we calculate the perpendicular displaced distance to each point of the central axis, 
-to obtain a parallel to it, where the transitions won't be clothoids. Then we can't know where are the tangents of transitions. 
-But in this mode, the displaced distance for the first and the last points don't have to be the same in a section of the road. A lineal variation will be done between those points.
-
-<p>
-For this example, the first and last are defined as lineal and the rest are in mode exact.
-
-<p>
-Into this second way, the variation don't have to be only lineal. We can define a circumference in the displaced line with the option "rR,A".
-
-<p>
-Between two points, if the second input distance equal zero, the line will be stopped. If the second input distance equal -1, this point will not be processed and the next one will be considered.
-
-<pre><code>
-v.road -r name=Circuit plan=displ 
-</code></pre>
-
-And we obtain the map Circuit__Displaced, and their tables. 
-
-<p>
-<img src="./img4.png" width="500" height="406" alt="">
-
-<p>
-With distance to the central axis and height of the lines we can obtain different forms, that we'll see in the cross sections. 
-
-<p>
-<img src="./img_a_vcivilroad_7.png" width="400" height="200" alt="">
-
-<p>
-Now we can add new lines by hand or with TableTools option. 
-
-<pre><code>
-v.road -e name=Circuit displline=add side=left ncol=3 sedist="10 -0.2; 10 -0.2"
-v.road -e name=Circuit displline=add side=right ncol=3 sedist="10 -0.2; 10 -0.2"
-</code></pre>
-
-
-<p>
-And add new points. We are going to cut the last line in pk 900 and 1700.
-
-<pre><code>
-v.road -e name=Circuit at road add=row tab_type=Displ pklist=876,900,1074,1690,1700,1811 
-</code></pre>
-
-<p>
-<img src="./img_tables4_2.png" width="400" height="166" alt="">
-
-<p>
-<img src="./img4_1.png" width="500" height="406" alt="">
-
-<p>
-Mode exact "e" in the first two lines, without widening and with widening set to 0.2.
-
-<p>
-<img src="./img4_2.png" width="350" height="275" alt="">
-<img src="./img4_3.png" width="350" height="275" alt="">
-
-
-<!-- ########################## Terr ############################## -->
-
-<h3>Terr</h3>
-
-<p>
-The cut/fill are calculated with the first displaced line of the left side and the last displaced line of the right side, 
-and with the slope given in the columns cut_left, cut_right, fill_left, fill_right.
-
-<p>
-To get more vertices we have to add new rows to this table with <em>tabletools</em> giving the pk of the vertex.
-
-<p>
-<img src="./img_tables5_1.png" width="400" height="166" alt="">
-
-<p>
-We can generate points of the different alignments, breaklines and a hull of all points.
-
-<pre><code>
-v.road -r name=Circuit terr=slopes,sareas,topo dem=elev_lid792_1m
-</code></pre>
-
-<p>
-And we obtain the map Circuit__Slopes, Circuit__Slopes_Areas, Circuit__Topo and Circuit__Topo_Hull, and their tables. 
-
-<p>
-<img src="./img5.png" width="500" height="406" alt="">
-
-
-
-<!-- ########################## Displaced ############################## -->
-
-<h3>Transversal</h3>
-
-<p>
-In this table where we are going to define transversals 2D lines to the central axis, to obtain later, the cross sections.
-
-<p>
-This lines contains the cutoff with the displaced lines.
-
-<p>
-When this table is created, have two rows, who are the first and the last points of the central axis. 
-
-<p>
-In the columns dist_left, dist_right we can define the distance left and right to the central axis and in the column npk the distance between lines. 
-
-<p>
-<img src="./img_tables6_1.png" width="400" height="166" alt="">
-
-<p>
-We can obtain the transversal profiles selecting it too.
-
-<pre><code>
-v.road -r name=Circuit trans=trans,profiles dem=elev_lid792_1m
-</code></pre>
-
-<p>
-And we obtain the map Circuit__Trans and Circuit__TransProfiles, and their tables. 
-
-<p>
-<img src="./img6.png" width="500" height="406" alt="">
-
-<p>
-<img src="./img6_1.png" width="500" height="406" alt="">
-
-
-<h3>Marks</h3>
-We can define marks or road objects by pk.
-<p>
-<img src="./img_tables7_1.png" width="400" height="166" alt="">
-
-<p>
-<img src="./img7.png" width="500" height="406" alt="">
-
-
-
-<!-- ########################## Displaced ############################## -->
-
-<h3>TopoTools</h3>
-
-<p>
-With the Circuit_Topo map created, we can triangulate with triangle or delaunay, and obtain the curves.
-
-<p>
-In this example we must delete the points that cross the road, for a good triangulation. We can run this.
-
-<pre><code>
-v.edit map=Circuit__Topo type=point tool=delete ids=0-999999 where="pk > 876 AND pk < 1074"
-v.edit map=Circuit__Topo type=point tool=delete ids=0-999999 where="pk > 1690 AND pk < 1811"
-
-db.execute sql="DELETE FROM Circuit__Topo WHERE pk > 876 and pk < 1074"
-db.execute sql="DELETE FROM Circuit__Topo WHERE pk > 1690 and pk < 1811"
-</code></pre>
-
-<p>
-And obtain the Circuit__Topo like this. The hull must be changed too.
-
-
-<p>
-<img src="./img8_1.png" width="500" height="406" alt="">
-
-
-<p>
-<img src="./img_a_topotools_1.png" width="399" height="339" alt="">
-
-<pre><code>
-v.road -o name=Circuit dem=elev_lid792_1m topotools=delaunay,curved,cut_hull
-</code></pre>
-
-<p>
-And we obtain the map Circuit__Topo_Tin and Circuit__Topo_Curves, and their tables. 
-
-<p>
-<img src="./img8_2.png" width="500" height="406" alt="">
-
-
-<!-- ########################## Displaced ############################## -->
-
-<h3>Backup</h3>
-
-<p>
-After run the backup you can run this to obtain all maps.
-
-<pre><code>
-v.road -r name=Circuit plan=plan,pks,displ,marks vert=vert,profile trans=trans,profiles terr=slopes,sareas,topo dem=elev_lid792_1m
-</code></pre>
-
-<pre><code>
-echo "L 15 1
- 638602.453907 220281.587467
- 638872.438983 220266.927644
- 638731.321851 220395.256912
- 638781.230311 220495.669832
- 638890.64791 220489.728605
- 638750.420421 220565.326292
- 638662.05161 220298.095029
- 638632.866458 220535.678384
- 638483.222668 220543.750924
- 638406.451001 220388.023737
- 638502.195923 220398.284828
- 638721.795144 220655.135048
- 638656.193203 220404.828666
- 638268.15133 220299.739643
- 638602.453907 220281.587467
- 1  1
-P  1 1
- 638602.453907 220281.587467
- 2    1
-P  1 1
- 638872.438983 220266.927644
- 2    2
-P  1 1
- 638731.321851 220395.256912
- 2    3
-P  1 1
- 638781.230311 220495.669832
- 2    4
-P  1 1
- 638890.64791 220489.728605
- 2    5
-P  1 1
- 638750.420421 220565.326292
- 2    6
-P  1 1
- 638662.05161 220298.095029
- 2    7
-P  1 1
- 638632.866458 220535.678384
- 2    8
-P  1 1
- 638483.222668 220543.750924
- 2    9
-P  1 1
- 638406.451001 220388.023737
- 2    10
-P  1 1
- 638502.195923 220398.284828
- 2    11
-P  1 1
- 638721.795144 220655.135048
- 2    12
-P  1 1
- 638656.193203 220404.828666
- 2    13
-P  1 1
- 638268.15133 220299.739643
- 2    14
-P  1 1
- 638602.453907 220281.587467
- 2    15
-P  1 1
- 638602.453907 220281.587467
- 8    1
-P  1 1
- 638602.453907 220281.587467
- 8    2
-P  1 1
- 638602.453907 220281.587467
- 4    1
-P  1 1
- 638634.426432 220500.061126
- 4    2
-P  1 1
- 638621.330858 220519.982685
- 4    3
-P  1 1
- 638465.368943 220506.786855
- 4    4
-P  1 1
- 638666.507984 220451.258691
- 4    5
-P  1 1
- 638662.328095 220442.177014
- 4    6
-P  1 1
- 638573.410617 220382.409616
- 4    7
-P  1 1
- 638602.453907 220281.587467
- 4    8
-P  1 1
- 638602.453907 220281.587467
- 3    1
-P  1 1
- 638794.637722 220294.628116
- 3    2
-P  1 1
- 638791.485541 220543.187779
- 3    3
-P  1 1
- 638641.56261 220464.886873
- 3    4
-P  1 1
- 638621.266312 220399.660839
- 3    5
-P  1 1
- 638406.371565 220315.000175
- 3    6
-P  1 1
- 638602.453907 220281.587467
- 3    7
-P  1 1
- 638602.453907 220281.587467
- 7    1
-P  1 1
- 638634.610948 220499.596419
- 7    2
-P  1 1
- 638465.368943 220506.786855
- 7    3
-P  1 1
- 638666.507984 220451.258691
- 7    4
-P  1 1
- 638654.577521 220429.350321
- 7    5
-P  1 1
- 638637.711356 220410.985026
- 7    6
-P  1 1
- 638616.836773 220397.342402
- 7    7
-P  1 1
- 638593.594427 220388.201219
- 7    8
-P  1 1
- 638573.410617 220382.409616
- 7    9
-P  1 1
- 638602.453907 220281.587467
- 7    10
-P  1 1
- 638602.453907 220281.587467
- 5    1
-P  1 1
- 638693.765832 220585.688009
- 5    2
-P  1 1
- 638691.041172 220537.792247
- 5    3
-P  1 1
- 638535.766657 220372.214897
- 5    4
-P  1 1
- 638602.453907 220281.587467
- 5    5
-P  1 1
- 638602.453907 220281.587467
- 6    1
-P  1 1
- 638602.453907 220281.587467
- 6    2
-" | v.in.ascii -n input=- output=Circuit format=standard --o 
-
-v.db.addtable map=Circuit table=Circuit_Plan layer=2 key=cat2 columns="pk_eje double precision,radio double precision,a_in double precision,a_out double precision,widening double precision,superelev varchar(25),dc_ double precision,lr_ double precision"
-v.db.addtable map=Circuit table=Circuit_Displ layer=8 key=cat8 columns="pk double precision,sec_left varchar(25),sec_right varchar(25),type_left varchar(25),type_right varchar(25)"
-v.db.addtable map=Circuit table=Circuit_Displ layer=4 key=cat4 columns="pk double precision,sec_left varchar(25),sec_right varchar(25),type_left varchar(25),type_right varchar(25)"
-v.db.addtable map=Circuit table=Circuit_Vert layer=3 key=cat3 columns="pk double precision,elev double precision,kv double precision,l double precision,b double precision"
-v.db.addtable map=Circuit table=Circuit_Marks layer=7 key=cat7 columns="pk double precision,dist varchar(25),elev varchar(25),azi varchar(25),name varchar(25),cod varchar(25)"
-v.db.addtable map=Circuit table=Circuit_Terr layer=5 key=cat5 columns="pk double precision,cut_left double precision,cut_right double precision,fill_left double precision,fill_right double precision,height double precision,leng double precision"
-v.db.addtable map=Circuit table=Circuit_Trans layer=6 key=cat6 columns="pk double precision,dist_left double precision,dist_right double precision,npk double precision"
-v.db.addtable map=Circuit table=Circuit layer=1 key=cat columns="name varchar(25)"
-
-echo "UPDATE Circuit_Plan SET pk_eje='0.0',radio='0.0',a_in='0.0',a_out='0.0',widening='0.0',superelev='',dc_='0.0',lr_='140.002162531' WHERE cat2=1;
-UPDATE Circuit_Plan SET pk_eje='270.382786955',radio='-40.0',a_in='35.0',a_out='35.0',widening='0.0',superelev='',dc_='67.689561716',lr_='18.521314174' WHERE cat2=2;
-UPDATE Circuit_Plan SET pk_eje='461.124617255',radio='40.0',a_in='30.0',a_out='30.0',widening='0.0',superelev='',dc_='29.2637172691',lr_='39.7863972502' WHERE cat2=3;
-UPDATE Circuit_Plan SET pk_eje='573.256721368',radio='30.0',a_in='25.0',a_out='25.0',widening='0.0',superelev='',dc_='14.0798000021',lr_='1.81890329525' WHERE cat2=4;
-UPDATE Circuit_Plan SET pk_eje='682.835501948',radio='-15.0',a_in='15.0',a_out='15.0',widening='0.0',superelev='',dc_='25.5209406839',lr_='47.3026773599' WHERE cat2=5;
-UPDATE Circuit_Plan SET pk_eje='842.142623261',radio='-20.0',a_in='20.0',a_out='20.0',widening='0.0',superelev='',dc_='14.9175006172',lr_='100.00718402' WHERE cat2=6;
-UPDATE Circuit_Plan SET pk_eje='1123.60593223',radio='30.0',a_in='25.0',a_out='25.0',widening='0.0',superelev='',dc_='60.1666666667',lr_='24.9072874929' WHERE cat2=7;
-UPDATE Circuit_Plan SET pk_eje='1362.97515278',radio='-60.0',a_in='45.0',a_out='45.0',widening='0.0',superelev='',dc_='49.9304491395',lr_='25.1574394299' WHERE cat2=8;
-UPDATE Circuit_Plan SET pk_eje='1512.8365209',radio='-60.0',a_in='45.0',a_out='45.0',widening='0.0',superelev='',dc_='36.2500000006',lr_='68.9069121541' WHERE cat2=9;
-UPDATE Circuit_Plan SET pk_eje='1686.45923111',radio='-20.0',a_in='20.0',a_out='20.0',widening='0.0',superelev='',dc_='22.711648047',lr_='24.7225033281' WHERE cat2=10;
-UPDATE Circuit_Plan SET pk_eje='1782.75242935',radio='-40.0',a_in='25.0',a_out='25.0',widening='0.0',superelev='',dc_='14.6414158745',lr_='213.435753539' WHERE cat2=11;
-UPDATE Circuit_Plan SET pk_eje='2120.68119964',radio='20.0',a_in='20.0',a_out='20.0',widening='0.0',superelev='',dc_='33.810837057',lr_='71.3354524078' WHERE cat2=12;
-UPDATE Circuit_Plan SET pk_eje='2379.441513',radio='100.0',a_in='75.0',a_out='75.0',widening='0.0',superelev='',dc_='48.75',lr_='140.918379815' WHERE cat2=13;
-UPDATE Circuit_Plan SET pk_eje='2781.46165959',radio='-25.0',a_in='25.0',a_out='25.0',widening='0.0',superelev='',dc_='45.5718116349',lr_='160.427746506' WHERE cat2=14;
-UPDATE Circuit_Plan SET pk_eje='3116.25669305',radio='0.0',a_in='0.0',a_out='0.0',widening='0.0',superelev='',dc_='0.0',lr_='0.0' WHERE cat2=15;
-UPDATE Circuit_Displ SET pk='0.0',sec_left='6 0;3.5 0',sec_right='3.5 0;6 0',type_left='',type_right='' WHERE cat8=1;
-UPDATE Circuit_Displ SET pk='2208.88779535',sec_left='6 0;3.5 0',sec_right='3.5 0;6 0',type_left='',type_right='' WHERE cat8=2;
-UPDATE Circuit_Displ SET pk='0.0',sec_left='10 -0.34;8 -0.19;6.5 -0.13;4 -0.08',sec_right='4 -0.08;6.5 -0.13;8 -0.19;10 -0.34',type_left='l;l;e;e',type_right='e;e;l;l' WHERE cat4=1;
-UPDATE Circuit_Displ SET pk='876.0',sec_left='10 -0.34;-1 0;-1 0;-1 0',sec_right='-1 0;-1 0;-1 0;10 -0.34',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=2;
-UPDATE Circuit_Displ SET pk='900.0',sec_left='0 0;-1 0;-1 0;-1 0',sec_right='-1 0;-1 0;-1 0;0 0',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=3;
-UPDATE Circuit_Displ SET pk='1074.0',sec_left='10 -0.34;-1 0;-1 0;-1 0',sec_right='-1 0;-1 0;-1 0;10 -0.34',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=4;
-UPDATE Circuit_Displ SET pk='1690.0',sec_left='10 -0.34;-1 0;-1 0;-1 0',sec_right='-1 0;-1 0;-1 0;10 -0.34',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=5;
-UPDATE Circuit_Displ SET pk='1700.0',sec_left='0 0;-1 0;-1 0;-1 0',sec_right='-1 0;-1 0;-1 0;0 0',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=6;
-UPDATE Circuit_Displ SET pk='1811.0',sec_left='10 -0.34;-1 0;-1 0;-1 0',sec_right='-1 0;-1 0;-1 0;10 -0.34',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=7;
-UPDATE Circuit_Displ SET pk='2208.88779535',sec_left=' 10 -0.34;8 -0.19;6.5 -0.13;4 -0.08',sec_right='4 -0.08;6.5 -0.13;8 -0.19; 10 -0.34',type_left='l;l;l;l',type_right='l;l;l;l' WHERE cat4=8;
-UPDATE Circuit_Vert SET pk='0.0',elev='118.0',kv='0.0',l='0.0',b='0.0' WHERE cat3=1;
-UPDATE Circuit_Vert SET pk='200.0',elev='116.0',kv='-2500.0',l='0.0',b='0.0' WHERE cat3=2;
-UPDATE Circuit_Vert SET pk='550.0',elev='133.0',kv='3000.0',l='0.0',b='0.0' WHERE cat3=3;
-UPDATE Circuit_Vert SET pk='840.0',elev='114.0',kv='-2000.0',l='0.0',b='0.0' WHERE cat3=4;
-UPDATE Circuit_Vert SET pk='1760.0',elev='133.0',kv='3000.0',l='0.0',b='0.0' WHERE cat3=5;
-UPDATE Circuit_Vert SET pk='2000.0',elev='121.0',kv='-2000.0',l='0.0',b='0.0' WHERE cat3=6;
-UPDATE Circuit_Vert SET pk='2208.88779535',elev='118.0',kv='0.0',l='0.0',b='0.0' WHERE cat3=7;
-UPDATE Circuit_Marks SET pk='0.0',dist='',elev='',azi='',name='',cod='' WHERE cat7=1;
-UPDATE Circuit_Marks SET pk='875.5',dist='0',elev='0',azi='1',name='Bridge1',cod='a1' WHERE cat7=2;
-UPDATE Circuit_Marks SET pk='1074.0',dist='0',elev='0',azi='-1',name='Bridge2',cod='a1' WHERE cat7=3;
-UPDATE Circuit_Marks SET pk='1690.0',dist='0',elev='0',azi='1',name='Tunel1',cod='a2' WHERE cat7=4;
-UPDATE Circuit_Marks SET pk='1715.0',dist='0',elev='0',azi='1',name='Pila',cod='' WHERE cat7=5;
-UPDATE Circuit_Marks SET pk='1740.0',dist='0',elev='0',azi='1',name='Pila',cod='' WHERE cat7=6;
-UPDATE Circuit_Marks SET pk='1765.0',dist='0',elev='0',azi='1',name='Pila',cod='' WHERE cat7=7;
-UPDATE Circuit_Marks SET pk='1790.0',dist='0',elev='0',azi='1',name='Pila',cod='' WHERE cat7=8;
-UPDATE Circuit_Marks SET pk='1811.0',dist='0',elev='0',azi='-1',name='Tunel2',cod='a2' WHERE cat7=9;
-UPDATE Circuit_Marks SET pk='2208.88779535',dist='',elev='',azi='',name='',cod='' WHERE cat7=10;
-UPDATE Circuit_Terr SET pk='0.0',cut_left='2.0',cut_right='2.0',fill_left='0.5',fill_right='0.5',height='0.0',leng='0.0' WHERE cat5=1;
-UPDATE Circuit_Terr SET pk='1550.0',cut_left='2.0',cut_right='2.0',fill_left='0.5',fill_right='0.5',height='0.0',leng='0.0' WHERE cat5=2;
-UPDATE Circuit_Terr SET pk='1600.0',cut_left='2.0',cut_right='2.0',fill_left='4.0',fill_right='4.0',height='0.0',leng='0.0' WHERE cat5=3;
-UPDATE Circuit_Terr SET pk='1850.0',cut_left='2.0',cut_right='2.0',fill_left='0.5',fill_right='0.5',height='0.0',leng='0.0' WHERE cat5=4;
-UPDATE Circuit_Terr SET pk='2208.88779535',cut_left='2.0',cut_right='2.0',fill_left='0.5',fill_right='0.5',height='0.0',leng='0.0' WHERE cat5=5;
-UPDATE Circuit_Trans SET pk='0.0',dist_left='20.0',dist_right='20.0',npk='20.0' WHERE cat6=1;
-UPDATE Circuit_Trans SET pk='2208.88779535',dist_left='20.0',dist_right='20.0',npk='20.0' WHERE cat6=2;
-UPDATE Circuit SET name='Circuit' WHERE cat=1;
-" | db.execute input=- 
-</code></pre>

Deleted: grass-addons/grass7/vector/v.civil/v.road.py
===================================================================
--- grass-addons/grass7/vector/v.civil/v.road.py	2016-07-09 20:17:08 UTC (rev 68921)
+++ grass-addons/grass7/vector/v.civil/v.road.py	2016-07-09 22:28:28 UTC (rev 68922)
@@ -1,835 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8
-"""
-Created on Wed Jul 23 18:37:36 2014
-
- at author: jfcr
-"""
-############################################################################
-#
-# MODULE:       v.align, v0.6.0
-#
-# AUTHOR:       Jesús Fernández-Capel Rosillo
-#               Civil Engineer, Spain
-#               jfc at alcd net
-#
-# PURPOSE:      Desing roads, channels, ports...
-#
-# COPYRIGHT:    (c) 2014 Jesús Fernández-Capel Rosillo.
-#
-#               This program is free software under the GNU General Public
-#               License (>=v2). Read the file COPYING that comes with GRASS
-#               for details.
-#
-#############################################################################
-
-#%Module
-#% description: Generate a alignment for desing roads, channels, ports...
-#% keywords: vector, ROADS, CHANNELS, PORTS.
-#%End
-
-#######################
-### Required section
-#######################
-
-#%option G_OPT_V_INPUT
-#% key: name
-#% type: string
-#% description: Name of road map
-#% required: yes
-#%end
-
-#######################
-### Plant section
-#######################
-
-#%option G_OPT_V_TYPE
-#% key: plan
-#% options: plan,pks,displ,marks
-#% answer:
-#% required: no
-#% description: Plan options
-#% guisection: Plan
-#%end
-
-#%option
-#% key: pkopt
-#% type: string
-#% description:  Pks marks options values. (npk,mpk,dist,m)
-#% required: no
-#% answer: 20,100,2,4
-#% guisection: Plan
-#%end
-
-#%option G_OPT_DB_TABLE
-#% key: dtable
-#% description: Other displaced table (Default all)
-#% required: no
-##% guidependency: ocolumn,scolumns
-#% guisection: Plan
-#%end
-
-#%option G_OPT_DB_TABLE
-#% key: mtable
-#% description: Other marks table (Default all)
-#% required: no
-##% guidependency: ocolumn,scolumns
-#% guisection: Plan
-#%end
-
-#%option
-#% key: areaopt
-#% type: string
-#% description:  Pair of displaced lines for areas (1-2,2-5,5-6)
-#% required: no
-#% guisection: Plan
-#%end
-
-#######################
-### Alz section
-#######################
-
-#%option G_OPT_V_TYPE
-#% key: vert
-#% options: vert,profile
-#% answer:
-#% required: no
-#% description: Vertical options
-#% guisection: Vert
-#%end
-
-#%option
-#% key: lpscale
-#% type: integer
-#% description: Long profile vertical scale (V/H, V/1)
-#% options: 0-100
-#% answer : 4
-#% required: no
-#% guisection: Vert
-#%end
-
-#%option
-#% key: lpopt
-#% type: string
-#% description: Long profile values Longmark,distMark_x,distMark_y,DistGitarr.
-#% required: no
-#% answer: 2,20,1,20
-#% guisection: Vert
-#%end
-
-#%option
-#% key: lpoffset
-#% type: string
-#% description: Long profile offset from origin of region
-#% required: no
-#% answer: 0,0
-#% guisection: Vert
-#%end
-
-#%option
-#% key: camber
-#% type: string
-#% description: General camber
-#% required: no
-#% answer: 0
-#% guisection: Vert
-#%end
-
-#%option
-#% key: displrot
-#% type: string
-#% description: Displaced lines to rotate
-#% required: no
-#% answer: 0,0
-#% guisection: Vert
-#%end
-
-#######################
-### Trans section
-#######################
-
-#%option G_OPT_V_TYPE
-#% key: trans
-#% options: trans,profiles
-#% answer:
-#% required: no
-#% description: Vertical options
-#% guisection: Trans
-#%end
-
-#%option
-#% key: ltscale
-#% type: double
-#% description: Cross section vertical scale (V/H, V/1)
-#% required: no
-#% answer: 2
-#% guisection: Trans
-#%end
-
-#%option
-#% key: ltopt1
-#% type: string
-#% description: Cross section options values Longmark,distMark_x,distMark_y.
-#% required: no
-#% answer: 1,20,2
-#% guisection: Trans
-#%end
-
-#%option
-#% key: ltopt2
-#% type: string
-#% description: Trans section options values for nrows,distTP_x,distTP_y.
-#% required: no
-#% answer: 10,10,10
-#% guisection: Trans
-#%end
-
-#%option
-#% key: ltoffset
-#% type: string
-#% description: Trans sections profile offset from origin of region
-#% required: no
-#% answer: 0,0
-#% guisection: Trans
-#%end
-
-#########################
-### Terrain section
-#########################
-
-#%option G_OPT_V_TYPE
-#% key: terr
-#% options: slopes,sareas,topo
-#% answer:
-#% required: no
-#% description: Terrain options
-#% guisection: Terr
-#%end
-
-#%option G_OPT_R_INPUT
-#% key: dem
-#% key_desc: raster dem
-#% description: Name of DEM raster
-#% required: no
-#% guisection: Terr
-#%end
-
-#########################
-### TopoTools section
-#########################
-
-#%flag
-#% key: o
-#% description: TopoTools
-#% guisection: TopoTools
-#%end
-
-#%option G_OPT_V_TYPE
-#% key: actions
-#% options: uppoints, pnt_info
-#% answer:
-#% required: no
-#% description: Points tools
-#% guisection: TopoTools
-#%end
-
-#%option
-#% key: pk_info
-#% type: double
-#% description: PK
-#% required: no
-#% answer: 0
-#% guisection: TopoTools
-#%end
-
-#%option G_OPT_V_TYPE
-#% key: topotools
-#% options: triangle,delaunay,curved,cut_hull
-#% answer:
-#% required: no
-#% description: Triangulate and curved
-#% guisection: TopoTools
-#%end
-
-##%option G_OPT_V_TYPE
-##% key: tinraster
-##% options: tintorast,nnbathy
-##% answer:
-##% required: no
-##% description: Triangulate and curved
-##% guisection: TopoTools
-##%end
-
-
-#%option G_OPT_V_TYPE
-#% key: roundabout
-#% options: roundabout
-#% answer:
-#% required: no
-#% description: Roundabout tools
-#% guisection: TopoTools
-#%end
-
-#%option
-#% key: rround1
-#% type: string
-#% description: Minus radio for roundabout edge
-#% required: no
-#% guisection: TopoTools
-#%end
-
-#%option
-#% key: rround2
-#% type: string
-#% description: Mayor radio for roundabout edge
-#% required: no
-#% guisection: TopoTools
-#%end
-
-#%option
-#% key: azround
-#% type: string
-#% description: Azimut for roundabout start point
-#% required: no
-#% guisection: TopoTools
-#%end
-
-#%option
-#% key: cround
-#% type: string
-#% description: Center for roundabout
-#% required: no
-#% guisection: TopoTools
-#%end
-
-#%option
-#% key: roundname
-#% type: string
-#% description: Name for roundabout
-#% required: no
-#% guisection: TopoTools
-#%end
-
-#########################
-### TableTools section
-#########################
-
-#%flag
-#% key: e
-#% description: TableTools
-#% guisection: TableTools
-#%end
-
-#%option G_OPT_V_TYPE
-#% key: add
-#% options: table, row
-#% answer:
-#% required: no
-#% description: Add new table or add row to table
-#% guisection: TableTools
-#%end
-
-#%option
-#% key: tab_type
-#% type: string
-#% label: Name of table for new table or to add row
-#% description: To add new table only Displ or Marks table are supported
-#% options: Vert,Displ,Trans,Terr,Marks
-#% required: no
-#% guisection: TableTools
-#%end
-
-#%option
-#% key: tab_subname
-#% type: string
-#% label: Table subname for new table or row or displ subname to add or del col
-#% required: no
-#% guisection: TableTools
-#%end
-
-#%option
-#% key: pklist
-#% type: string
-#% label: List of Pks
-#% required: no
-#% guisection: TableTools
-#%end
-
-#%option G_OPT_V_TYPE
-#% key: displline
-#% options: add,del
-#% answer:
-#% required: no
-#% description: Add or del displaced line
-#% guisection: TableTools
-#%end
-
-#%option
-#% key: side
-#% type: string
-#% label: left or right side of Displ
-#% options: left,right
-#% required: no
-#% guisection: TableTools
-#%end
-
-#%option
-#% key: ncol
-#% type: integer
-#% label: Number of Displ to insert
-#% required: no
-#% guisection: TableTools
-#%end
-
-#%option
-#% key: sedist
-#% type: string
-#% label: start and end distance and height
-#% required: no
-#% guisection: TableTools
-#%end
-
-#########################
-### CrossTools section
-#########################
-
-#%flag
-#% key: c
-#% description: CrossTools
-#% guisection: CrossTools
-#%end
-
-#%option G_OPT_V_TYPE
-#% key: intersect
-#% options: left1, right1, left2, right2, in, out, rounda, write
-#% answer:
-#% required: no
-#% description: Plan options
-#% guisection: CrossTools
-#%end
-
-#%option G_OPT_V_INPUT
-#% key: plant1
-#% key_desc: map plant 1
-#% description: Name of first map plant
-#% required: no
-#% guisection: CrossTools
-#%end
-
-#%option
-#% key: cat1
-#% type: integer
-#% label: Categorie of align
-#% required: no
-#% answer: 1
-#% guisection: CrossTools
-#%end
-
-
-#%option G_OPT_V_INPUT
-#% key: plant2
-#% key_desc: map plant 2
-#% description: Name of second map plant
-#% required: no
-#% guisection: CrossTools
-#%end
-
-#%option
-#% key: cat2
-#% type: integer
-#% label: Categorie of align
-#% required: no
-#% answer: 1
-#% guisection: CrossTools
-#%end
-
-#%option
-#% key: dist1
-#% type: string
-#% description: Displaced distances for aling 1
-#% required: no
-#% guisection: CrossTools
-#%end
-
-#%option
-#% key: dist2
-#% type: string
-#% description: Displaced distances for aling 2
-#% required: no
-#% guisection: CrossTools
-#%end
-
-#%option
-#% key: radios
-#% type: string
-#% description: Intersections radios
-#% required: no
-#% guisection: CrossTools
-#%end
-
-#########################
-### #Options section
-#########################
-
-#%flag
-#% key: r
-#% description: Run
-#%end
-
-#%flag
-#% key: p
-#% description: Update solution from polygon
-#%end
-
-#%flag
-#% key: t
-#% description: Update solution from table plan distances_
-#%end
-
-#%option
-#% key: intr
-#% type: integer
-#% label: Interval in straights
-#% required: no
-#% answer: 1
-#%end
-
-#%option
-#% key: intc
-#% type: integer
-#% label: Interval in curves
-#% required: no
-#% answer: 1
-#%end
-
-#%option
-#% key: startend
-#% type: string
-#% label: start and end pks (last pk = -1)
-#% required: no
-#% answer: 0,-1
-#%end
-
-#%option G_OPT_F_OUTPUT
-#% key: backup
-#% description: Create backup file
-#% required: no
-#%end
-
-# ######################
-
-import os
-import sys
-
-#sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'v.road'))
-import grass.script as grass
-from grass.pygrass.utils import get_lib_path
-
-path = get_lib_path(modname='v.road')
-if path is None:
-    grass.fatal("Not able to find the modis library directory.")
-sys.path.append(path)
-
-import road_road as Road
-import road_crosstools as Tools2
-import road_topotools as Topotools
-
-
-# =============================================
-# Main
-# =============================================
-
-def main():
-    """Manage v.road
-    >>> road = Road.Road('Circuit')
-    >>>
-
-    """
-    if '@' in options['name']:
-        name_map = options['name'].split('@')[0]
-    else:
-        name_map = options['name']
-
-    plan_opt = options['plan'].split(',')
-    vert_opt = options['vert'].split(',')
-    trans_opt = options['trans'].split(',')
-    terr_opt = options['terr'].split(',')
-
-    add = options['add'].split(',')
-    displline = options['displline'].split(',')
-
-    intersect = options['intersect'].split(',')
-    topotools = options['topotools'].split(',')
-    actions = options['actions'].split(',')
-    roundabout = options['roundabout'].split(',')
-    # tinraster = options['tinraster'].split(',')
-
-    startend = [float(opt) for opt in options['startend'].split(',')]
-    pkopt = [float(opt) for opt in options['pkopt'].split(',')]
-
-    if options['tab_subname']:
-        options['tab_subname'] = '_' + options['tab_subname']
-
-    if options['tab_type']:
-        options['tab_type'] = '_' + options['tab_type']
-
-### Init road
-    road = Road.Road(name_map)
-
-################### TableTools ##################
-
-    if flags['e']:
-        # Insert new point
-        if 'row' in add:
-
-            road.plant_generate()
-
-            if ',' in options['pklist']:
-                list_pks = options['pklist'].split(',')
-            else:
-                list_pks = [options['pklist']]
-
-            road.rtab.add_row(list_pks, road.plant, options['tab_type'],
-                         options['tab_subname'])
-            sys.exit(0)
-
-        # Add new table
-        if 'table' in add:
-            road.rtab.add_table(options['tab_type'], options['tab_subname'])
-            sys.exit(0)
-
-        # Add column to Displ table
-        if 'add' in displline or 'del' in displline:
-            add_col = True
-            if 'del' in displline:
-                add_col = False
-            road.rtab.tables['_Displ' + options['tab_subname']].displ_add_del_col(
-                options['ncol'], options['side'], options['sedist'], add_col)
-        sys.exit(0)
-
-################### CrossTools ##################
-
-    if flags['c']:
-        inout = 'In'
-        if 'out' in intersect:
-            inout = 'Out'
-        rounda = False
-        if 'rounda' in intersect:
-            rounda = True
-        izq1 = 'Izq'
-        if 'right1' in intersect:
-            izq1 = 'Der'
-        izq2 = 'Izq'
-        if 'right2' in intersect:
-            izq2 = 'Der'
-
-        if '@' in options['plant1']:
-            name_plant1 = options['plant1'].split('@')[0]
-        else:
-            name_plant1 = options['plant1']
-
-        if '@' in options['plant2']:
-            name_plant2 = options['plant2'].split('@')[0]
-        else:
-            name_plant2 = options['plant2']
-
-        inter = Tools2.Intersections(name_plant1, int(options['cat1']), izq1,
-                                     name_plant2, int(options['cat2']), izq2,
-                                     inout, rounda)
-        inter.dist2 = [float(p) for p in options['dist2'].split(',')]
-        inter.dist1 = [float(p) for p in options['dist1'].split(',')]
-        inter.radios = [float(p) for p in options['radios'].split(',')]
-
-        if 'write' in intersect:
-            inter.make_intersect(True)
-        else:
-            inter.make_intersect()
-        sys.exit(0)
-
-################### Topotools ##################
-
-    if flags['o']:
-        if actions != ['']:
-            if 'uppoints' in actions:
-                topo = Topotools.Topo(name_map)
-                topo.uppoints()
-
-        if roundabout != ['']:
-            if 'roundabout' in roundabout:
-                topo = Topotools.Topo(options['roundname'])
-                topo.roundabout(options['rround1'], options['rround1'],
-                                options['azround'], options['cround'])
-
-        if topotools != ['']:
-            tri = Topotools.Triang(name_map)
-            if 'triangle' in topotools:
-                tri.split_maps()
-                tri.triangle()
-            elif 'delaunay' in topotools:
-                tri.delaunay()
-            tri.get_area_hull()
-            if 'curved' in topotools:
-                tri.curved()
-            if 'cut_hull' in topotools:
-                tri.cut_by_hull()
-
-        # if tinraster != ['']:
-            # tin = Topotools.Triang(name_map)
-            # if 'tintorast' in tinraster:
-                # tin.tin_to_raster()
-            # if 'nnbathy' in tinraster:
-                # tin.nnbathy()
-
-        sys.exit(0)
-
-################### Backup ##################
-
-    if options['backup']:
-        road.rtab.create_backup(options['backup'])
-        grass.message('backup created')
-        sys.exit(0)
-
-##################### Run ###################
-
-    if flags['r']:
-
-        if flags['t']:
-            road.plant_generate(True, float(options['camber']))
-            road.rtab.update_tables()
-        elif flags['p']:
-            road.plant_generate(False, float(options['camber']))
-            road.rtab.update_tables()
-        else:
-            road.plant_generate(False, float(options['camber']))
-
-        if 'plan' in plan_opt:
-            road.rtab.update_tables_pnts(road.plant)
-
-        road.elev_generate()
-
-        road.displ_generate()
-
-        if options['dem']:
-
-            road.terr_generate(options['dem'])
-
-            road.taludes_generate()
-
-            road.trans_generate()
-
-            if 'profile' in vert_opt:
-                road.long_profile_generate(options['lpopt'],
-                                           options['lpscale'],
-                                           options['lpoffset'])
-
-            if 'profiles' in trans_opt:
-                road.trans_profiles_generate(options['ltopt1'],
-                                             options['ltopt2'],
-                                             options['ltscale'],
-                                             options['ltoffset'])
-        else:
-            road.trans_generate()
-
-        if 'marks' in plan_opt:
-            road.marks_generate()
-
-### Write maps
-
-        if flags['o']:
-            if actions != ['']:
-                if 'pnt_info' in actions:
-                    pto_inf = Topotools.Topo(name_map)
-                    pto_inf.pts_info(options['pk_info'], road)
-            sys.exit(0)
-
-        #
-        road.plant.set_roadline(startend[0], startend[1],
-                                float(options['intr']), float(options['intc']))
-        road.plant.add_pks(road.rtab.get_tables_pks())
-
-        road.vert.set_pnts_elev(road.plant.roadline)
-
-        road.displ.set_roadlines(road.plant.roadline)
-
-        #
-        if 'plan' in plan_opt:
-            grass.message('writing plan')
-            road.plant_write()
-
-        if 'displ' in plan_opt:
-            grass.message('writing displ')
-            road.displ_write()
-
-        if 'marks' in plan_opt:
-            grass.message('writing marks')
-            road.marks_write()
-
-        if 'pks' in plan_opt:
-            grass.message('writing pks')
-            road.trans_write_pks(startend, pkopt)
-
-        #
-        if 'vert' in vert_opt:
-            grass.message('writing elev')
-            road.elev_write()
-
-        #
-        if 'trans' in trans_opt:
-            grass.message('writing trans')
-            road.trans_write()
-
-        if options['dem']:
-
-            road.terr.set_pnts_terr(road.plant.roadline)
-
-            road.taludes.set_roadlines(road.plant.roadline, road.displ)
-
-            #
-            if 'profile' in vert_opt:
-                grass.message('writing profile')
-                road.long_profile_write()
-
-            if 'profiles' in trans_opt:
-                grass.message('writing profiles')
-                road.trans_profiles_write()
-
-            #
-            if 'slopes' in terr_opt:
-                grass.message('writing slopes')
-                road.taludes_write()
-
-            if 'sareas' in terr_opt:
-                grass.message('writing slopes_areas')
-                road.taludes_areas_write()
-
-            if 'topo' in terr_opt:
-                grass.message('writing pnts, breakliness and hull for \
-                               triangulation')
-                road.tri_write()
-
-        tab_subname_d = ''
-        if options['dtable']:
-            tab_subname_d = options['dtable'].split('_Displ')[-1]
-            road.displ_generate(tab_subname_d)
-            road.displ.set_roadlines(road.plant.roadline)
-            road.displ_write('_' + tab_subname_d)
-
-        if options['mtable']:
-            road.marks_generate(options['mtable'])
-            tab_subname_m = '_' + options['mtable'].split('_Marks')[-1]
-            road.marks_write(tab_subname_m)
-
-        if options['areaopt']:
-            grass.message('writing displ_areas')
-            road.displ_areas_write(options['areaopt'], tab_subname_d)
-
-    sys.exit(0)
-
-if __name__ == "__main__":
-    if len(sys.argv) == 2 and sys.argv[1] == '--doctest':
-        import doctest
-        doctest.testmod()
-
-    else:
-        options, flags = grass.parser()
-        main()



More information about the grass-commit mailing list