[GRASS-dev] wxGUI: supervised classification tool

Vaclav Petras wenzeslaus at gmail.com
Tue Feb 12 04:01:47 PST 2013


Hi,

I don't understand how you will avoid re-implementation of the whole
i.pca module.

This is common problem with GUI in GRASS. We need to provide
functionality through module and through GUI. The standard way is to
call module from GUI and read output. However, this is not sufficient
when GUI needs some more information from the process or even some
interactive view of the intermediate data. This is the case of
wxIClass, r-based v.krige and probably also your interactive
scatterplot/pca tool.

I would propose putting this functionality into the library and than
use it in both the module and the GUI but this would lead to the rapid
increase in the size of the library or the number of libraries and
python packages/modules (those which are part of the library).

Vaclav


On 12 February 2013 12:28, stepan.turek <stepan.turek at seznam.cz> wrote:
> Hi Rashad,
>
> I am sorry I have not read "reg i.pca module" discussion.
> I have been already working on interactive plot.
>
> The aim is to create interactive scatter plot (similar to XGobi), which
> would also allow to plot data in PCA transformed space.
> It should be possible to highlight points in plots form mapwindow, highlight
> pixels in mapwindow from plots and highlight points in other plots.
>
> For implementation I have chosen combination of numpy and c.
> And from plotting probably I will choose Matplotlib. Currently I am working
> on back-end functions managing data and computations for plotting (c and
> numpy), after that I will focuse on GUI part (plotting...).
>
> Stepan
>
> ---------- Původní zpráva ----------
> Od: Rashad M <mohammedrashadkm at gmail.com>
> Datum: 12. 2. 2013
>
>
> Předmět: Re: [GRASS-dev] wxGUI: supervised classification tool
>
>
> Hi All,
>
> As I discussed with markus Netler he pointed out the idea of having a pure
> pixel identification module for GRASS GIS. This will be very helful for
> spectral unmixing because pure pixels are found  in the corners of PCA space
> and since PCA transformed its spatial position is lost. see my other post
> "reg i.pca module" where I had discussion with Nikos, Markus and others.
>
> So the point is it needs an interactive plot. I had gathered all other
> inputs for the module and planning to start coding next week. Since its gui
> and interactive scatter plot comes as a part it. I would like to know if
> there is anybody working on it. If not I can make it happen as a part of
> this new module
>
>
> On Fri, Dec 21, 2012 at 11:18 PM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
>
> Hi Stepan,
>
> On 21 December 2012 16:53, stepan.turek <stepan.turek at seznam.cz> wrote:
>> Hi,
>>
>> yesterday I discussed some ideas on improvement of supervised
>> classification
>> capabilities in GRASS with Martin and a remote sensing researcher, who is
>> working with proprietary software.
>>
>> We came up with suggestion that useful feature for GRASS would be
>> interactive scatter plot tool which would allow to highlight pixels
>> according to chosen areas in scatter plot and also in reverse way it would
>> allow to highlight corresponding points in scatter plot for chosen areas
>> in
>> map window.
>> Also it would plot class ellipses for training areas.
>>
>> Useful and unique feature among GIS and Imaginary software would be
>> scatter
>> plot 3D mode which would allow comparison of 3 bands.
>>
> If starting from scratch, Matplotlib seems to be the right option. It
> allows to interactively select data and also draw 3D plots. Data for
> scatterplot can be obtained by r.stats -g input=map1,map2. The result
> needs to be stored and used for searching coordinates and values (i.e.
> coordinates in scatterplot). Highlighting in plot according to click
> in the map is probably possible. The other way should be also
> possible, there are some click handler sin matplotlib. Highlighting in
> map - that's probably something for your (Stepan's) new graphical
> object API.
>
> However, there is also Bivariate Scatterplot Tool available from Map
> Display. It's able to display plots for pairs of maps. The plot is
> wxplot which is not so powerful as matplotlib. I am not sure if it
> could be used more interactively.
>
> Vaclav
>
>> Stepan
>>
>> ---------- Původní zpráva ----------
>> Od: Anna Kratochvílová <kratochanna at gmail.com>
>> Datum: 20. 12. 2012
>> Předmět: Re: [GRASS-dev] wxGUI: supervised classification tool
>>
>>
>> Hi,
>>
>> On Thu, Dec 20, 2012 at 9:52 AM, Markus Neteler <neteler at osgeo.org> wrote:
>>> Hi,
>>>
>>> while searching for the new i.class tool I have discovered
>>> the "supervised classification tool"
>>> in Imagery -> Classify Image -> Interactive input for supervised
>>> classification
>>>
>>> Nice! /edit: I now see that it *is* the
>>> http://grasswiki.osgeo.org/wiki/WxIClass
>>>
>> Right, wxIClass (perhaps g.gui.iclass in the future), available as
>> "Interactive input for supervised classification" from the menu, is
>> intended to be an i.class replacement.
>>
>>> I tried it with NC data and loaded the Landsat2002 group.
>>> Now I would expect that I can select channels for display from
>>> the group. Perhaps something with [x] checkboxes would be
>>> good. The existing "free" choice of maps should remain of course.
>>
>> That's reasonable, other suggestions are here:
>> http://trac.osgeo.org/grass/wiki/wxGUIDevelopment/wxIClass
>>
>>>
>>> When I then digitize, it nicely opens the class dialog, ok. Then,
>>> when running, it segfaults (entire wxGUI disappears, no error msg
>>> visible).
>>
>> There have been some changes three days ago which should fix this
>> crash. If you used the latest version, we have a problem.
>>
>>>
>>> Suggestion: It may also become the tool for i.smap, just a method
>>> dialog would be needed
>>>
>>>> Run Analysis
>>> - MaxLik: i.maxlik
>>> - SMAP: i.gensigset, i.smap
>>>
>>
>> yes, something like this is planned, Stepan is collecting these ideas now.
>>
>> We haven't touched this tool for some time, however Martin tried to
>> use it in class with students this week and he promised to report
>> bugs.
>>
>> Anna and Vaclav
>>
>>> to make it universal. However, great to have such a tool now.
>>>
>>> Markus
>>> _______________________________________________
>>> grass-dev mailing list
>>> grass-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>>
>>
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
>
>
> --
> Regards,
>    Rashad


More information about the grass-dev mailing list