d.mon vs gui windows

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

d.mon vs gui windows

Tyler Smith-2
Hi,

I've noticed a curious difference between d.mon and g.gui with respect
to plotting maps on the screen. I usually use d.mon, and run GRASS from
within Emacs. However, on a recent project a particular map wouldn't
appear when plotted. No errors or warning messages, but d.vect didn't
change the appearance of the displayed map (no new features were shown).

I later needed to do some manual digitization, which appears to be only
available via g.gui. Running this, I realized that despite looking
identical, the map window run from g.gui works much better than when I
start it from d.mon. First, this solved the problem I mentioned above -
the points I couldn't display from d.mon showed up as expected with the
g.gui window.

Another thing I noticed, is that the map window from g.gui seems to
'remember' when I pan the view, while d.mon doesn't. That is, if I open
a window with d.mon, plot a map, pan to a different location, and then
plot some more points, the new points are initially placed on the screen
as if I hadn't panned. I have to click the 'redraw' button to get
everything lined up. This isn't necessary when running from g.gui.

What is the difference between plot windows opened from g.gui and d.mon?

My use case is probably quite esoteric: I'm running GRASS in text mode
from Emacs grass-mode on Debian, with the i3 window manager. So it's
possible I've inflicted these weird inconsistencies on myself. Any
suggestions on how to get d.mon to behave as nicely as g.gui for
displaying maps?

Best,

Tyler

--
plantarum.ca
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: d.mon vs gui windows

Ken Mankoff


> On 29 Nov 2017, at 20.13, Tyler Smith <[hidden email]> wrote:
>
> My use case is probably quite esoteric: I'm running GRASS in text mode
> from Emacs grass-mode on Debian, with the i3 window manager. So it's
> possible I've inflicted these weird inconsistencies on myself.

No, I have the same issues running d.mon on OS X. Lots of redraw required. I also run from within Emacs (Org Mode Babel code blocks) but the issues also exist when running with just a terminal.

  -k.

Please excuse brevity. Sent from pocket computer with tiny non-haptic feedback keyboard.
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: d.mon vs gui windows

Tyler Smith-2
On Wed, Nov 29, 2017, at 04:32 PM, Ken Mankoff wrote:
>
> No, I have the same issues running d.mon on OS X. Lots of redraw
> required. I also run from within Emacs (Org Mode Babel code blocks) but
> the issues also exist when running with just a terminal.
>

That's reassuring, in a way. If the problem isn't local to my setup,
perhaps there's a way to fix it.

How are you running the code blocks? I didn't think there was babel
support for GRASS. I've been using org-mode more frequently lately, and
was thinking about extending grass-mode to provide babel support. But
maybe someone's already done this?

Best,

Tyler
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: d.mon vs gui windows

Ken Mankoff

On 2017-11-29 at 22:12, Tyler Smith <[hidden email]> wrote:
> How are you running the code blocks? I didn't think there was babel
> support for GRASS. I've been using org-mode more frequently lately,
> and was thinking about extending grass-mode to provide babel support.
> But maybe someone's already done this?

I don't actually use the Emacs grass mode, just Org and Babel and Shells and GRASS. The code below this text works for me, both with and without Babel sessions. There are probably more elegant ways to do this. It would be nice if GRASS could have a "--quiet" option at launch to save the ASCII splash screen. I'm not sure why Org Babel w/ session's doesn't source my ~/.bash_profile. I usually run with ":results verbatim" but sometimes generate Org Tables from GRASS commands, and then use and manipulate them outside of GRASS in other babel blocks in other languages, and then bring results back into GRASS.

Also, many things in GRASS take time to run, and Org Babel doesn't officially support asynchronous execution. There are hacks for this, but I often find that I code in Org Babel but execute using an Emacs interface to my shell. This can be the same shell :session accessed by Org Babel. I have various keybindings to send lines and regions to the shell buffer (including appending an audio & visual notification when the commands complete) and then Emacs does not hang, I can continue using it while the GRASS commands run, and I'm alerted when the command finishes and I can send the next chunk to the shell.

When development is done, I can tangle everything to a single script and re-run all commands to re-produce the analysis and results using only GRASS and no Emacs, if I so choose (but not if I'm manipulating results in Org but outside of GRASS, as described above).

I hope this helps,

  -k.


*** GRASS shell no session
**** Create Region
#+BEGIN_SRC sh :results verbatim
trash ~/Desktop/Gtmp
grass72 --text -c EPSG:3413 ~/Desktop/Gtmp
g.region -p
#+END_SRC

**** Run more commands (re-launch GRASS each time)
#+BEGIN_SRC sh :results verbatim
grass72 ~/Desktop/Gtmp/PERMANENT
g.region -p
#+END_SRC


*** GRASS shell w/ session
**** Initialize Session and GRASS
#+BEGIN_SRC sh :results verbatim :session Gfoo
source ~/.bash_profile  # not sure why I need to do this
trash ~/Desktop/Gtmp
grass72 --text -c EPSG:3413 ~/Desktop/Gtmp
g.region -p
#+END_SRC

**** Run more commands
#+BEGIN_SRC sh :results verbatim :session Gfoo
g.region -p
#+END_SRC
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: d.mon vs gui windows

Ken Mankoff

On 2017-11-30 at 09:05, Ken Mankoff <[hidden email]> wrote:
> On 2017-11-29 at 22:12, Tyler Smith <[hidden email]> wrote:
>> How are you running the code blocks? I didn't think there was babel
>> support for GRASS. I've been using org-mode more frequently lately,
>> and was thinking about extending grass-mode to provide babel support.
>> But maybe someone's already done this?

Note also that the methods to run GRASS without starting it, both from Python and Bash, work fine with Org Babel.

  -k.
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user