/[thuban]/branches/WIP-pyshapelib-bramz/Extensions/ogr/ogrdialog.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Extensions/ogr/ogrdialog.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2558 by nhueffme, Mon Jan 31 09:18:27 2005 UTC revision 2559 by nhueffme, Tue Feb 8 09:52:56 2005 UTC
# Line 186  class ChooseLayer(wxDialog): Line 186  class ChooseLayer(wxDialog):
186    
187          datasource = ogr.Open(filename)          datasource = ogr.Open(filename)
188          self.layer = []          self.layer = []
189          for i in range(datasource.GetLayerCount()):          for i in range(datasource.GetLayerCount()):
190              self.layer.append(datasource.GetLayer(i))              self.layer.append(datasource.GetLayer(i))
191              self.lb_drivers.Append(datasource.GetLayer(i).GetName())              self.lb_drivers.Append(datasource.GetLayer(i).GetName())
192          if self.lb_drivers.GetCount() > 0:          if self.lb_drivers.GetCount() > 0:
# Line 307  class ChooseOGRDBTableDialog(wxDialog): Line 307  class ChooseOGRDBTableDialog(wxDialog):
307          i = self.lb_connections.GetSelection()          i = self.lb_connections.GetSelection()
308          if i >= 0:          if i >= 0:
309              self.selected_conn = self.dbconns[i]              self.selected_conn = self.dbconns[i]
310              self.tables = self.selected_conn.GeometryTables()              connString = ("PG: host=%s dbname=%s user=%s port=%s"
311              self.lb_tables.Set(self.tables)                            %(self.selected_conn.host, self.selected_conn.dbname,
312                                self.selected_conn.user, self.selected_conn.port))
313                ds = ogr.Open(connString)
314                if ds:
315                    for i in range(ds.GetLayerCount()):
316                        self.tables.append(ds.GetLayer(i).GetName())
317                    self.lb_tables.Set(self.tables)
318    
319      def OnTableSelect(self, event):      def OnTableSelect(self, event):
320          i = self.lb_tables.GetSelection()          i = self.lb_tables.GetSelection()

Legend:
Removed from v.2558  
changed lines
  Added in v.2559

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26