[Greater-commits] r335 - trunk/GREAT-ER/Greater/Modules
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 30 15:09:24 CEST 2011
Author: aheinecke
Date: 2011-06-30 15:09:23 +0200 (Thu, 30 Jun 2011)
New Revision: 335
Modified:
trunk/GREAT-ER/Greater/Modules/analysis.py
trunk/GREAT-ER/Greater/Modules/catchment.py
Log:
Do not access the table attribute directly which is no
longer possible in Thuban layers, access should go over the shapefile store
Modified: trunk/GREAT-ER/Greater/Modules/analysis.py
===================================================================
--- trunk/GREAT-ER/Greater/Modules/analysis.py 2011-06-30 13:08:30 UTC (rev 334)
+++ trunk/GREAT-ER/Greater/Modules/analysis.py 2011-06-30 13:09:23 UTC (rev 335)
@@ -763,8 +763,8 @@
PECcatchment_flowincrement = P_Q / Qsum
# now display the selection of the last PEC catchment:
- for i in range(layer.table.NumRows()):
- stretch_id = layer.table.ReadRowAsDict(i)['rivernet-i']
+ for i in range(layer.ShapeStore().Table().NumRows()):
+ stretch_id = layer.ShapeStore().Table().ReadRowAsDict(i)['rivernet-i']
if stretch_id in stretches_to_select:
shapes_to_select.append(i)
# select all the stretches found so far on the map
@@ -1057,7 +1057,7 @@
layer. The picture is retrieved from the GREAT-ER database."""
# get source and name via shapeid
- record = layer.table.ReadRowAsDict(shapeid)
+ record = layer.ShapeStore().Table().ReadRowAsDict(shapeid)
source = record['source']
name = record['name']
@@ -1109,7 +1109,7 @@
stretch. This function is tricky on units."""
# get the StretchID from the shapeid
- StretchID = layer.table.ReadRowAsDict(shapeid)['rivernet-i']
+ StretchID = layer.ShapeStore().Table().ReadRowAsDict(shapeid)['rivernet-i']
catchment = context.session.SimulationSession().Catchment()
stretchtable = catchment.StretchTable()
Modified: trunk/GREAT-ER/Greater/Modules/catchment.py
===================================================================
--- trunk/GREAT-ER/Greater/Modules/catchment.py 2011-06-30 13:08:30 UTC (rev 334)
+++ trunk/GREAT-ER/Greater/Modules/catchment.py 2011-06-30 13:09:23 UTC (rev 335)
@@ -652,7 +652,7 @@
sim = context.session.SimulationSession()
catchment = sim.Catchment()
disch = None
- discharges = layer.table.ReadRowAsDict(shapeid)['discharges']
+ discharges = layer.ShapeStore().Table().ReadRowAsDict(shapeid)['discharges']
for d in catchment.Discharges():
if d.record.disch_id == discharges:
disch = d
@@ -680,7 +680,7 @@
sim = context.session.SimulationSession()
catchment = sim.Catchment()
disch = None
- discharges = layer.table.ReadRowAsDict(shapeid)['discharges']
+ discharges = layer.ShapeStore().Table().ReadRowAsDict(shapeid)['discharges']
for d in catchment.Discharges():
if d.record.disch_id == discharges:
disch = d
More information about the Greater-commits
mailing list