[Greater-commits] r3655 - in branches/3.0.0-all-models/GREAT-ER: . Greater/Modules
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jul 25 15:46:19 CEST 2011
Author: aheinecke
Date: 2011-07-25 15:46:19 +0200 (Mon, 25 Jul 2011)
New Revision: 3655
Modified:
branches/3.0.0-all-models/GREAT-ER/
branches/3.0.0-all-models/GREAT-ER/ChangeLog
branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py
branches/3.0.0-all-models/GREAT-ER/Greater/Modules/catchment.py
Log:
Merged revisions 335 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ER
........
r335 | aheinecke | 2011-06-30 15:09:23 +0200 (Thu, 30 Jun 2011) | 3 lines
Do not access the table attribute directly which is no
longer possible in Thuban layers, access should go over the shapefile store
........
Property changes on: branches/3.0.0-all-models/GREAT-ER
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/GREAT-ER:1-232,310,312-315,319,322,327,333
+ /trunk/GREAT-ER:1-232,310,312-315,319,322,327,333,335
Modified: branches/3.0.0-all-models/GREAT-ER/ChangeLog
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/ChangeLog 2011-07-25 13:44:32 UTC (rev 3654)
+++ branches/3.0.0-all-models/GREAT-ER/ChangeLog 2011-07-25 13:46:19 UTC (rev 3655)
@@ -6,6 +6,7 @@
* Greater/Modules/analysis.py:
- Change classnames to Thuban 1.2 names
- Inherit from the correct Tool Class from viewport
+ - Access tables over the Shapefile store
* Greater/Dialogs/opensession.py: Add encoding line
* Greater/UI/session.py: Change classgen classnames to Thuban 1.2
* Greater/Modules/catchment.py:
@@ -13,6 +14,7 @@
- Write encoding files for shapelib with the assumption that
the Database delivers UTF-8 encoded data.
- Inherit from the correct Tool class from viewport
+ - Access tables over the Shapefile store
* Greater/Dialogs/editdischargedata.py: Add encoding line
* Greater/Dialogs/editsubstance.py: Add encoding line
* Greater/Dialogs/editenvironment.py: Add encoding line
Modified: branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py 2011-07-25 13:44:32 UTC (rev 3654)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py 2011-07-25 13:46:19 UTC (rev 3655)
@@ -909,8 +909,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
@@ -1203,7 +1203,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']
@@ -1255,7 +1255,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']
type = layer.GreaterLayerType()
if type == "RIVERNETRESULTS":
Modified: branches/3.0.0-all-models/GREAT-ER/Greater/Modules/catchment.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/Modules/catchment.py 2011-07-25 13:44:32 UTC (rev 3654)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/Modules/catchment.py 2011-07-25 13:46:19 UTC (rev 3655)
@@ -724,7 +724,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
@@ -752,7 +752,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