[GRASSLIST:7642] "Linking" images and displaying z-profiles

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?
2) How easy is it to display a z-profile of a currently selected pixel in
GRASS?

--j

--
Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
650-604-5896
AIM: jgrn307
MSN: jgrn307@hotmail.com

Jonathon, as long as both windows are showing the same region, you can do this. Just select the other monitor with d.select and then d.redraw. You can also just use the GIS manager. To get the value of a pixel underneath the cursor, run d.what.rast.

Hope this helps,
-Ian

On Jul 20, 2005, at 11:10 AM, Jonathan Greenberg 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?
2) How easy is it to display a z-profile of a currently selected pixel in
GRASS?

--j

--
Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
650-604-5896
AIM: jgrn307
MSN: jgrn307@hotmail.com

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

2) How easy is it to display a z-profile of a currently selected pixel in
GRASS?

--j

--
Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
650-604-5896
AIM: jgrn307
MSN: jgrn307@hotmail.com

On Wed, 20 Jul 2005 15:30:54 -0300
Daniel Victoria <daniel.victoria@gmail.com> wrote:

if [ "$1" = "z" ]
then
   d.zoom
else
   d.pan
fi

note d.pan is now 'd.zoom -p' for GRASS 6.

Hamish

Thanks for the warning Hamish....
As I said, John Gillette sent me this script 2 years ago, prior to grass6

On 7/21/05, Hamish <hamish_nospam@yahoo.com> wrote:

On Wed, 20 Jul 2005 15:30:54 -0300
Daniel Victoria <daniel.victoria@gmail.com> wrote:

> if [ "$1" = "z" ]
> then
> d.zoom
> else
> d.pan
> fi

note d.pan is now 'd.zoom -p' for GRASS 6.

Hamish