[GRASSGUI] Re: managing layer and properties
Jachym Cepicky
jachym.cepicky at gmail.com
Mon Mar 19 14:45:38 EDT 2007
hi,
2007/3/19, Glynn Clements <glynn at gclements.plus.com>:
>
> Moritz Lennert wrote:
>
> > > If we go the metacontrol route, we only need one method in render.py--one
> > > that will accept a fully formed command with all arguments. I already did
> > > this in order to make a command layer work.
> > >
> > > The metacontrol would construct the fully formed command--based on user
> > > selections in the properties (e.g., a r.colors command if changing the color
> > > table), and send it on to render.py.
Sorry, but I do not get this point: Raster layer has nothing common
with Vector layer, which has nothing common with (e.g. in the future)
WMS layer... Could you post example for these three layer-types, how
they should be rendered?
> >
> > I don't know enough of the internals to judge, but it sounds like this
> > will make the code much more difficult to maintain, especially since it
> > will require regular and significant manual interventions ? Intuitively,
> > I would rather plead for Glynn's suggestion.
>
> Apart from code maintenance issues, you're isolating the user from the
> d.* commands. Someone who normally uses the GUI may have no idea how
> to achieve the same results from the command line or in a script.
>
> Also, if the custom raster and map layers contain useful functionality
> which isn't available via d.rast, d.vect etc, that shouldn't be
> reserved for GUI users, but should also be available from the command
> line.
I hope, I found a way for this (in svn now):
mapdisp.py can be started with path/to/command/file as argument
mapdisp.py will then read the file and if there is something new in
it, it will try to process it:
cmdfile=open("cmdiflename",r)
while 1:
line = cmdfile.readline()
if line:
# there is display command, add new layer and redraw display
sleep(0.1s)
I scripted p.mon , p.rast and p.vect scripts, which can start &&
display the data. p.vect and p.rast siply formulate string, which is
echoed to the cmd file.
I tried to udpate the README, so you can follow these steps.
I hope it is working, it is working on every platform and it is more
or less clean..
Glynn, what do you think about this idea?
Jachym
>
> > P.S. Yes, everyone except William (unless you also go under "woklist at
> > kyngchaos.com")
>
> I'm fairly sure that's him.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
> _______________________________________________
> grassgui mailing list
> grassgui at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassgui
>
--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
More information about the grass-gui
mailing list