[GRASSLIST:3607] Re: function to compare rasters visually

Daniel Victoria daniel_victoria at yahoo.com
Mon Jun 7 08:19:48 EDT 2004


Hi Martin,

I had a similar problem once and John was kind enough
to send me this script. It links to grass displays
monitors so, whaever you look at in X0, X1 will
follow, like linking the displays geographically in
ERDAS.
Hope it helps, but don't thanks me, thanks John

Cheers
Daniel

--------------------------------------------------
From:	"John Gillette" <JGillette at rfmd.com>
To:	"Daniel Victoria" <daniel_victoria at yahoo.com>,
"Sandro Klippel" <sandro.klippel at talha-mar.com.br>,
"GRASSLIST" <grasslist at baylor.edu>
	

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

--- Martin Wegmann <mailinglist2_wegmann at web.de>
wrote:
> Hello, 
> 
> I was looking for a function which makes it easy to
> compare two images 
> visually by dissolving the upper image or only
> displaying parts of the upper 
> image and moving the border between upper and lower
> image across the monitor. 
> In other programs it is called dissolve or flicker.
> But I couldn't find 
> anything related to this by using the GRASS search
> function. 
> 
> Thanks for pointing me to the correct word in GRASS.
> Martin
> 
>  
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the grass-user mailing list