[GRASS-dev] Discussing new GUI toolkit: v.pydigit

Glynn Clements glynn at gclements.plus.com
Wed May 31 13:24:01 EDT 2006


Jachym Cepicky wrote:

> concerning the discussion about new GUI, used toolkit, programing
> language, etc., etc., etc. I started to write script, which could show
> us the way/problems/advantages/disadvantages.
> 
> It is the python script, with GTK+ toolkit (PyGTK). The GUI is build by
> Glade. It took me 3 days include pretty much learning of how the things
> are done by glade/pygtk, to write such an gui. I would say, it is pretty
> fast.
> 
> v.pydigit should be graphical frontend to v.edit. Currently implemented
> functions:
> 
>     * Displaying points
>     * Displaying lines
>     * Digitizing new points
>     * Digitizing new lines (snaping included)
>     * Zoom/Pan menu while digitizing by clicking with right mouse button
> 
>     * Zoom In/Out, Pan
>     * Deleting lines
>     * Deleting points
>     * ...
> 
> Not all function in the list are *really* working, because of currently
> limitations of v.edit (e.g. removing selected features means only mark
> them as removed, the vector file is not touched). But that is not the target. 
> Target was to try, how difficult would it be for someone like me, who has only 
> limited programing skills (I learn python since 3 months, pygtk sice 1)
> 
> Known problems:
> 
>     * Data reading/writing: Currently, the data are read through
>         v.out.ascii  and the output (new data storing) is made by
>         v.edit

That's the hard part, and the solution will probably dictate the
fundamental structure of any v.digit replacement.

v.digit uses V_get_updated_line() etc to determine which parts need to
be redrawn. Redrawing from scratch by enumerating the entire visible
portion of the map may be feasible. Enumerating the entire map without
regard to the current region probably won't be.

AFAICT, the V_get_updated_line() approach would require v.edit to
output the information after each update, as the "updated" status
doesn't persist between processes (i.e. it's stored in the client, not
the database).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list