About 7 years ago John Gillette sent me this script for Grass 5. I was
used for linking 2 X monitors. I then resent the email do Jonathan
Greenberg in 2005 and here we go again. It looks s though this feature
(geolink monitors) is something very usefull and that it should be
considered for grass 7. Maybe geolink two map displays...
Cheers
Daniel
Below are the old emails...
-------------------------------------------------------------------------
Hi,
Two years ago I asked the same question:
On 7/20/05, Jonathan Greenberg <jgreenberg@arc.nasa.gov> wrote:
I have two quick questions:
1) Can I have two overlapping raster images in two different windows, and
"link" them so as I move through one image, the second window moves with it?
and I git this answer from "John Gillette" <JGillette@rfmd.com>. I
remember that it worked well back then. You need to start both
monitors X0 and X1. Hope it helps...
---------------------------------------------------------------------------------------------------------
[GRASSLIST:5636] Linking Monitors script
try this:
Select and then Erase x1 and then display what ever you want there.
Select x0 and erase and display other info there.
Run this script to either pan or zoom in x0. After finishing
the pan or zoom x1 will redraw it's contents at the same region
thereby "following" what ever is done in x0.
The disadvantage is that you can only do 1 pan or zoom at a time,
i.e. not interactively.
usage:
script_name z <- does zoom instead of pan
script_name
zooming and panning in x0. x0 is selected at exit.
Does this help?
John
------------------
#!/bin/sh
d.mon select=x1
monitor1=`d.save -o`
d.mon select=x0
if [ "$1" = "z" ]
then
d.zoom
else
d.pan
fi
region=`g.region -g`
d.mon select=x1
d.erase
g.region $region
eval "$monitor1"
d.mon select=x0
exit 0
On Mon, May 23, 2011 at 6:29 PM, Pierre Roudier
<pierre.roudier@gmail.com> wrote:
Kia ora Hamish,
note that using development code for production work is asking
for trouble..
I'm using the 7 version as I'm testing the WPS bridge for another
project. I got a 6.4.1 version installed if I need more stability (but
so far, so good with the dev version).
Map Display 1: Zoom options (right-most magnifying glass icon in
the Map Display toolbar) -> Save display geometry to named region.
Map Display 2: Same menu but -> Zoom to saved region.
It does zoom to the same extent, but what I got in mind is a way to
link displays: I need to browse through a shaded relief layer on the
one display, and I'd like the orthophoto, on the second display to
update its extent automatically (not sure I was that clear on what I
tried to achieve in my first mail).
The GRASS book has an example of how to cross-hatch two maps in
a checkerboard fashion. (not sure if that's in the latest
edition or not)
See also the xganim module where you can flip between multiple
rasters in the same animation window. (with some work you could
also do that in NVIZ + keyframe animation) Not sure if that's
available on MS Windows or not.
It can indeed display my two layers, either on the same view or on
superposed views, but I can't really browse through them (no zoom, no
pan) - I guess this is not the core purpose of the module.
And finally, from the old Xmon d.* commands (again UNIX only),
see the d.split.frame module, to split a single d.mon window into
a left & right frame.
Yes, I'm on a Unix machine, so I could try that on the 6.4.1 version I
got installed. But I'm aware those modules will disappear in the 7
version.
good luck,
Hamish
(Otago Uni)
Thank you for your answers and pointers,
Pierre
--
Scientist
Landcare Research, New Zealand
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user