[GRASS-SVN] r42020 - grass-addons/ossim_grass/r.planet

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 24 10:14:37 EDT 2010


Author: epifanio
Date: 2010-04-24 10:14:36 -0400 (Sat, 24 Apr 2010)
New Revision: 42020

Modified:
   grass-addons/ossim_grass/r.planet/r.planet.py
Log:
testing on osx, fixing bugs (later will test on linux)

Modified: grass-addons/ossim_grass/r.planet/r.planet.py
===================================================================
--- grass-addons/ossim_grass/r.planet/r.planet.py	2010-04-24 14:01:48 UTC (rev 42019)
+++ grass-addons/ossim_grass/r.planet/r.planet.py	2010-04-24 14:14:36 UTC (rev 42020)
@@ -94,6 +94,7 @@
 import socket
 import grass.script as grass
 import osgeo.gdal as gdal
+import platform
 
 def main():
     add = flags['a']
@@ -353,14 +354,18 @@
 
 
 def makeoverview(input):
+    systemplatform = WhichPlatform()
+    mpi = 0
+    np = 1
     if systemplatform == 'Darwin':
-        img2rrexec = '/Users/sasha/OssimBuilds/Release/ossim-img2rr'
+        img2rrexec = 'export DYLD_FRAMEWORK_PATH=/Users/sasha/OssimBuilds/Release/ ; /Users/sasha/OssimBuilds/Release/ossim-img2rr'
     else :
         img2rrexec = 'ossim-img2rr'
-    if mpi :
-        os.system("mpirun -np %s %s %s" % np, img2rrexec, input)
+    if mpi == 1 :
+        os.system("mpirun -np %s %s %s" % (np, img2rrexec, input))
     else :
-        os.system("%s %s" % img2rrexec, input)
+        os.system('%s %s' % (img2rrexec, input))
+        
 
 
 if __name__ == "__main__":



More information about the grass-commit mailing list