Hi all,<br><br>I am in delay with my project, this is due to the fact that I am used to code in python in procedural way and now I am facing the object oriented, or better, the "event oriented" way. I am studying the Wxpython reference book and I am learning a lot. I am not giving up at all!! <br>
<br>I also need a little help from you devs to solve some issues.<br><br>In the Layer Manager I have added "Network Modeling" under Raster -> Hydrologic Modeling. This command should raise the GUI of wx.stream. When user has filled every box dialogs, he/she should select a point on Map Display and click a button in wx.stream called "update preview", in order to see the preview over a small region. If user doesn't select any point and clicks the button, raises a warning message like "please select a point on the map display". When the point is selected, ad the parameters are correctly inserted, the wx.preview GUI raises (this should be a second independent module). It shows an image browser and a bigger image display. User can click over an image in the image browser and the image is displayed in the bigger frame. User can change the parameters in wx.stream GUI and then clicking the same button "update preview" a new image is generated in the preview image browser and can be selected to be displayed.<br>
<br>Preview widget, as Hamish suggested, should be as general as possible, so it can be used by all commands instead of just r.stream. Preview widget IMHO should generate png images stored in a temp folder. And here are my issues.<br>
<br>1) First problem is that input of preview widget are passed by r.stream GUI (as a command line, so actually a string), and by Map Display (as a point, actually a tuple). String can be processed by preview GUI using os.system(cmd), BUT in order to convert the output of the command in a png file and to export it in the temporary folder, it is necessary to know the name of the output map that has to be exported. Output has a name given by user and passed as string (actually parsing a command line is not big deal, but problem is how to recognize output name, because every command has different name for output, it's not always output = something, but can be acc = something for instance). And also:<br>
<br>2) How to convert the output of the command in a png file and how to export it in the temporary folder in G7? In grass 6.5 I simply would do:<br><br> grass.run_command( 'd.mon', start = 'x0' )<br> grass.run_command( 'd.rast', map = 'sc_elev' )<br>
grass.run_command( 'd.out.file', output = os.path.join(fpath, prefix + '_elevation'), format = 'png', resolution = 2, flags = 't' )<br><br>Thanks for any suggestion..<br><br>madi<br clear="all">
<br>-- <br><span style="color: rgb(102, 102, 102);">Eng. Margherita Di Leo</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Ph.D. Candidate</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">Methods and Technologies for Environmental Monitoring</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Department of Environmental Engineering and Physics (DIFA)</span><br style="color: rgb(102, 102, 102);">
<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">University of Basilicata </span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Campus Macchia Romana</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">85100 - Potenza </span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Italy</span><br style="color: rgb(102, 102, 102);"><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">Office: +39-0971205360</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"></span><br><br><br>