浏览代码

wxGUI: fix m.proj

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38146 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 年之前
父节点
当前提交
8bccbf8687
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      gui/wxpython/gui_modules/utils.py

+ 7 - 4
gui/wxpython/gui_modules/utils.py

@@ -424,17 +424,20 @@ def ReprojectCoordinates(coord, projOut, projIn = None, flags = ''):
     if not projIn:
         projIn = gcmd.RunCommand('g.proj',
                                  flags = 'jf',
-                                 read = True)
+                                 read = True).rstrip('\n')
+    
     coors = gcmd.RunCommand('m.proj',
                             flags = flags,
+                            input = '-',
                             proj_in = projIn,
                             proj_out = projOut,
-                            stdin = '%f|%f' % (coord[0], coord[1]),
+                            fs = ';',
+                            stdin = '%f;%f' % (coord[0], coord[1]),
                             read = True)
     if coors:
-        coors = coors.split('\t')
+        coors = coors.split(';')
         e = coors[0]
-        n = coors[1].split(' ')[0].strip()
+        n = coors[1]
         try:
             proj = projOut.split(' ')[0].split('=')[1]
         except IndexError: