[GRASS-SVN] r54572 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 8 02:29:16 PST 2013


Author: martinl
Date: 2013-01-08 02:29:16 -0800 (Tue, 08 Jan 2013)
New Revision: 54572

Modified:
   grass/trunk/gui/wxpython/gui_core/dialogs.py
   grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: import vector data, add column for projection match


Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2013-01-08 10:17:38 UTC (rev 54571)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2013-01-08 10:29:16 UTC (rev 54572)
@@ -1617,6 +1617,8 @@
                    _('Name for output GRASS map (editable)')]
         if itype == 'ogr':
             columns.insert(2, _('Feature type'))
+            columns.insert(3, _('Projection match'))
+
         self.list = LayersList(parent = self.panel, columns = columns)
         self.list.LoadData()
 
@@ -2140,7 +2142,7 @@
         if len(columns) == 3:
             width = (65, 200)
         else:
-            width = (65, 180, 110)
+            width = (65, 180, 90, 70)
         
         for i in range(len(width)):
             self.SetColumnWidth(col = i, width = width[i])

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2013-01-08 10:17:38 UTC (rev 54571)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2013-01-08 10:29:16 UTC (rev 54572)
@@ -1733,9 +1733,13 @@
             
             layerId = 1
             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)
-                data.append((layerId, layerName, featureType, grassName))
+                data.append((layerId, layerName, featureType, projectionMatch, grassName))
                 layerId += 1
         else:
             if self.dsnType == 'file':



More information about the grass-commit mailing list