[GRASS-SVN] r68930 - grass-addons/grass7/vector/v.civil
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 9 18:35:05 PDT 2016
Author: jfc
Date: 2016-07-09 18:35:04 -0700 (Sat, 09 Jul 2016)
New Revision: 68930
Modified:
grass-addons/grass7/vector/v.civil/road_road.py
grass-addons/grass7/vector/v.civil/road_tables.py
Log:
Some fixed
Modified: grass-addons/grass7/vector/v.civil/road_road.py
===================================================================
--- grass-addons/grass7/vector/v.civil/road_road.py 2016-07-10 01:03:30 UTC (rev 68929)
+++ grass-addons/grass7/vector/v.civil/road_road.py 2016-07-10 01:35:04 UTC (rev 68930)
@@ -82,6 +82,8 @@
"""Set plant.
"""
tabla = self.rtab.tables['_Plan']
+ tabla2 = list(tabla)
+ print tabla2
if table_to_plant:
self.plant = Plant.Plant(self.rtab.polyline, tabla,
Modified: grass-addons/grass7/vector/v.civil/road_tables.py
===================================================================
--- grass-addons/grass7/vector/v.civil/road_tables.py 2016-07-10 01:03:30 UTC (rev 68929)
+++ grass-addons/grass7/vector/v.civil/road_tables.py 2016-07-10 01:35:04 UTC (rev 68930)
@@ -710,8 +710,8 @@
cats = [row[0] for row in self.rows]
if plant:
- self.rows[-1][1] = plant.length()
- for i, row in enumerate(self.rows):
+ self.rows[-1][1] = plant.length() # set real length
+ for i, row in enumerate(self.rows): # sort if new line is inserted
r_pnt = plant.get_roadpoint(row[1])
if row[0] > i + 1 and i + 1 not in cats:
self.rewrite_new(r_pnt, row, i + 1)
@@ -836,6 +836,7 @@
"""Return None
"""
for i, name in enumerate(self.get_tables_names()):
+
namedic = name[1] + name[2]
if name[1] == '':
namedic = 'first'
@@ -845,22 +846,22 @@
name[1] + name[2], name[1])
# @time_func
- def update_tables(self):
+ def update_tables(self, plant):
"""Return None
"""
for name, tab in self.tables.items():
if name == '_Plan':
tab.update_table_plan()
elif name != 'first':
- tab.update_table()
+ tab.update_table(plant)
# @time_func
- def update_tables_pnts(self, plant):
- """Return None
- """
- for tab in self.tables.values():
- if tab.name not in ['', '_Plan']:
- tab.update_table(plant)
+# def update_tables_pnts(self, plant):
+# """Return None
+# """
+# for tab in self.tables.values():
+# if tab.name not in ['', '_Plan']:
+# tab.update_table(plant)
def add_table(self, tab_sufix, tab_subname):
"""Return
More information about the grass-commit
mailing list