<html><body>Hi Hamish and Michael,<div><br></div><div>your questions are connected I will try to explain both.</div><div><br></div><div>The scatter plot tool backend is run in same process as wxGUI. If you select some area in scatter plot, then data from numpy arrays are passed to the backend (through ctypes), which describes selected areas in scatters plots. <span style="line-height: 1.3;">And the backend computes corresponding areas which will be highlighted in all opened scatter plots. To avoid frozing of the wxGUI, the computation is done in separate python thread. </span></div><div><span style="line-height: 1.3;"><br></span></div><div><span style="line-height: 1.3;">Currently r.out.bin is used to bypass inability to set region in raster library for different rasters. When user choose raster group for analysis in the tool, it is exported into binary files in current region and the backend works directly with the binary files. This is not very nice. </span></div><div><span style="line-height: 1.3;"><br></span></div><div><span style="line-height: 1.3;">If the backend would be written as module, then I would need to create temporary files to pass the selected areas, which does not seem very elegant to me. </span></div><div><span style="line-height: 1.3;"><br></span></div><div><span style="line-height: 1.3;">In simplified way the idea is that the library should give you option whether you want to open and then work with raster file according to the statically set variables (in structure R__) or open it with dynamically defined variables. </span></div><div><span style="line-height: 1.3;"><br></span></div><div><span style="line-height: 1.3;">It could be also useful for Pietro's pyGRASS API. And it would be first small step to </span>achieve<span style="line-height: 1.3;"> compilation of raster modules as library instead of different programs. I am working on more concrete proposal of the changes in raster library during this weekend. </span></div><div><span style="line-height: 1.3;"><br></span></div><div><span style="line-height: 1.3;">I am new to this problematic, so all these suggestions can be totally wrong..</span></div><div><span style="line-height: 1.3;"><br></span></div><div><span style="line-height: 1.3;">Best</span><br></div><div><span style="line-height: 1.3;">Stepan</span></div><div><span style="line-height: 1.3;"><br></span></div><p>---------- Původní zpráva ----------<br>Od: Michael Barton <Michael.Barton@asu.edu><br>Datum: 6. 7. 2013<br>Předmět: Re: [SoC] Weekly report #3 - GRASS Interactive Scatter Plot Tool</p><br><blockquote>So I take it you are not using r.stats to generate the data to plot, but are getting data directly accessing rasters via GRASS libraries?<br><br>Michael<br>______________________________</blockquote><p><br></p><p><br></p><div>Hi,<br><br>I am interested to hear more about the library limitations.. you<br>mean the WIND region, right? I'd be surprised if WIND_OVERRIDE or<br>GRASS_REGION enviro variables (and the python wrappers for them)<br>didn't provide full control for whatever someone might like to do.<br><br>I would guess if the scatter tool was spawned as an independent<br>process, it could maintain its own environment & so it's own region<br>override enviro variables. or simply unset the wxGUI display overrides<br>and just use the mapset's real computational region read directly from<br>the WIND file?<br><br><br>regards,<br>Hamish</div><div><br></div><p><br></p></body></html>