[GRASS-dev] [GRASS GIS] #1232: gui modeler don't works as aspected

GRASS GIS trac at osgeo.org
Wed Dec 8 11:41:48 EST 2010


#1232: gui modeler don't works as aspected
----------------------+-----------------------------------------------------
 Reporter:  epifanio  |       Owner:  grass-dev@…              
     Type:  defect    |      Status:  new                      
 Priority:  normal    |   Milestone:                           
Component:  wxGUI     |     Version:                           
 Keywords:  modeler   |    Platform:  All                      
      Cpu:  All       |  
----------------------+-----------------------------------------------------
 Hi i'm trying to use the grass modeler in the wx gui, but i have some
 problems to use it :

 the "run" action do not works


 i tried on both osx and linux, with grass65 and 70


 tring to run the model from the gui don't print any useful log
 tring to save it as script, the resulting file is not complete :


 projectfile :


 {{{

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE gxm SYSTEM "grass-gxm.dtd">
 <gxm>
     <window pos="316,250" size="640,480" />
     <properties>
         <name>model</name>
         <description>Script generated by wxGUI Graphical
 Modeler.</description>
         <author>habcam</author>
     </properties>
     <action id="1" name="g.region" pos="305,115" size="100,50">
         <task name="g.region">
             <parameter name="rast">
                 <value>bugsites</value>
             </parameter>
             <flag name="p" />
         </task>
     </action>
     <data pos="110,120" size="175,50">
         <data-parameter prompt="raster">
             <value>bugsites</value>
         </data-parameter>
         <relation dir="from" id="1" name="rast">
         </relation>
     </data>
 </gxm>

 }}}






 python script generated by grass65 (incomplete) :

 {{{

 #!/usr/bin/env python
 #
 # .....
 #

 import sys
 import os
 import atexit

 import grass.script as grass
 }}}

 python script generated by grass70 (it works from command line):


 {{{
 import sys
 import os
 import atexit

 import grass.script as grass

 def cleanup():
     pass

 def main():
     grass.run_command("g.region",
                       flags = 'p',
                       rast = "bugsites")

     return 0

 if __name__ == "__main__":
     options, flags = grass.parser()
     atexit.register(cleanup)
     sys.exit(main())
 }}}


 the save as image also don't works on both grass 65 and 70

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1232>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list