[GRASSGUI] graphic overlays

Martin Landa landa.martin at gmail.com
Sun Mar 25 03:52:49 EDT 2007


Hi,

just *note* -- from my point of view it would be nice to design new
GUI only as an interface (without any extra functionality). User can
choose between CLI or GUI. But the functionality (including
decorations) would be almost identical (i.e. accessible via GUI or
CLI). E.g. I don't like that the user can set transparency level of
raster layers via GUI in the current GIS Manager but not via CLI (I
mean using directly d.rast).

Martin

2007/3/25, Michael Barton <michael.barton at asu.edu>:
>
> On 3/24/07 8:25 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:
>
> >
> > Michael Barton wrote:
> >
> >>>> I want to suggest that most or all graphic overlays be done via wxPython
> >>>> rather than using GRASS d.* commands.
> >>>>
> >>>> These are: north arrow, scale, grid (and geodetic lines maybe), and text.
> >>>> We¹ll need someone to design some nice (and GRASS distinctive) north arrows
> >>>> and scales.
> >>>>
> >>>> I suggest that these be accessed through an item or items (popup checkbox
> >>>> menu?) on the map display tool bar, rather than having them added as
> >>>> layers.
> >>>> They should be able to be turned on and off of course, as well as being
> >>>> positioned with a mouse (the latter will be much easier if they are
> >>>> wxPython
> >>>> graphic objects). Each will need it¹s own dialog with options, but that
> >>>> shouldn¹t be too difficult to do.
> >>>>
> >>>> Vector labels could go either way<as something done from the map display
> >>>> tool bar or as an independent layer.
> >>>>
> >>>> Other opinions?
> >>>
> >>> I suggest that this is implemented in such a way that the user can
> >>> easily choose to use the equivalent d.* commands instead, so that the
> >>> display contents can be exported as a script which can be used outside
> >>> of the GUI (i.e. with an X/PNG monitor).
> >>
> >> This kind of negates the idea (I thought you were promoting too) of using
> >> native GUI functions for all 'decorations'.
> >
> > FWIW, I don't support requiring the GUI in order to render anything
> > which might reasonably appear on a printed map (labels, scale bar,
> > legend etc).
>
> I don't think we should necessarily limit the GUI to only being able to do
> what plain GRASS command modules can do. The programming that goes into the
> GUI is value added to anyone who uses this. Underneath, it is still just
> running GRASS modules. So anyone who wants to script as creatively can get
> the same results. But that doesn't mean that simply running a series of
> GRASS commands will necessarily achieve the same result. Especially for
> graphic rendering, a good GUI may well be able to some things that GRASS
> outside the GUI cannot do. I don't see this as an issue. If people want to
> use the features of the GUI they can. If they don't want to they don't have
> to. If they want to recreate the GUI coding in another platform, that's fine
> too. But a bash shell script may not be able to achieve what can be done in
> a wxPython script.
>
> >
> > These should all be achievable using d.* commands, and the GUI should
> > provide a convenient interface to those commands (e.g. using the mouse
> > to identify coordinates for placement).
>
> This is fine as far as it goes. d.grid is fairly complete as is. However,
> d.barscale is very limited in its style of north arrows and scales. And
> there is no way to adjust the size of either. If someone wants to program in
> a bunch of arrow and scale styles, along with ways of setting scale
> parameters and arrow sizes, that's fine. But it may well be much easier to
> to do this in the GUI than in a C module. I don't advocate getting rid of
> d.barscale. But I don't think the GUI should be limited by its restrictions.
> d.text is similarly limited. You can do quite a bit more with text in the
> GUI, and do so more easily (e.g., built in font-setting dialogs that are
> appropriate to whatever platform it's run on). For all of these, interactive
> placing and moving with a mouse is difficult if we only use the d.* command
> modules. While I can click and send coordinates to d.barscale (like we can
> do in the TclTk GUI), I don't know how I could grab a north arrow with a
> mouse and drag it to reposition it in another locale on the screen using
> d.barscale. However, I can do that with wxPython generated graphics.
>
> >
> >> It's not hard to add a layer
> >> managers for d.grid, d.text, d.scalebar, etc. But it could clutter up the
> >> main control more.
> >>
> >> What if we could make it scriptable using wxPython graphic elements?
> >
> > I'm not entirely sure what you mean by that.
> >
> > But, essentially, I feel that it should be possible to save the
> > contents of the display as a script which will work on a system with
> > only core GRASS modules (no Python, no X server; can you render
> > wxPython graphics into an image file on a system with no X server?).
>
> NVIZ can be scripted, but you can't render an NVIZ image without NVIZ. I
> don't see that as a problem. If you want to render a 2.5D or 4D image, you
> need NVIZ. There is no way to render this using plain vanilla GRASS
> commands. I wouldn't want to not have this tool simply because we couldn't
> render its images with plain command line C modules.
>
> I'm a very big advocate of GRASS's scripting potential. I've written a
> number of scripts. And this scriptability is what makes it possible to wrap
> the commands in a nice GUI. But as you've pointed out, there are limitations
> to graphic output rendering from command-line modules alone. Continued
> improvements to ps.map may be a way to achieve this. Perhaps it could be
> made to render to a PNG or PPM file as well as a postscript one. Just some
> thoughts.
>
> Michael
>
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
>
>
> _______________________________________________
> grassgui mailing list
> grassgui at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassgui
>


-- 
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *




More information about the grass-gui mailing list