Преглед изворни кода

wxGUI: import vector data, add column for projection match

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54572 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa пре 12 година
родитељ
комит
9a464adbbd
2 измењених фајлова са 9 додато и 3 уклоњено
  1. 3 1
      gui/wxpython/gui_core/dialogs.py
  2. 6 2
      gui/wxpython/gui_core/gselect.py

+ 3 - 1
gui/wxpython/gui_core/dialogs.py

@@ -1617,6 +1617,8 @@ class ImportDialog(wx.Dialog):
                    _('Name for output GRASS map (editable)')]
                    _('Name for output GRASS map (editable)')]
         if itype == 'ogr':
         if itype == 'ogr':
             columns.insert(2, _('Feature type'))
             columns.insert(2, _('Feature type'))
+            columns.insert(3, _('Projection match'))
+
         self.list = LayersList(parent = self.panel, columns = columns)
         self.list = LayersList(parent = self.panel, columns = columns)
         self.list.LoadData()
         self.list.LoadData()
 
 
@@ -2140,7 +2142,7 @@ class LayersList(GListCtrl, listmix.TextEditMixin):
         if len(columns) == 3:
         if len(columns) == 3:
             width = (65, 200)
             width = (65, 200)
         else:
         else:
-            width = (65, 180, 110)
+            width = (65, 180, 90, 70)
         
         
         for i in range(len(width)):
         for i in range(len(width)):
             self.SetColumnWidth(col = i, width = width[i])
             self.SetColumnWidth(col = i, width = width[i])

+ 6 - 2
gui/wxpython/gui_core/gselect.py

@@ -1733,9 +1733,13 @@ class GdalSelect(wx.Panel):
             
             
             layerId = 1
             layerId = 1
             for line in ret.splitlines():
             for line in ret.splitlines():
-                layerName, featureType = map(lambda x: x.strip(), line.split(' ', 1))
+                layerName, featureType, projection = map(lambda x: x.strip(), line.split(','))
+                if projection == '0':
+                    projectionMatch = _("No")
+                else:
+                    projectionMatch = _("Yes")
                 grassName = GetValidLayerName(layerName)
                 grassName = GetValidLayerName(layerName)
-                data.append((layerId, layerName, featureType, grassName))
+                data.append((layerId, layerName, featureType, projectionMatch, grassName))
                 layerId += 1
                 layerId += 1
         else:
         else:
             if self.dsnType == 'file':
             if self.dsnType == 'file':