Playing with g.zoom, after a while one wants to get back to the way
everything was in the beginning. But there is no way other than
d.mon stop=x1; g.region ...; d.mon x1
So perhaps d.zoom could have a new -r: restore option, to restore the
magnification/region used when the monitor was born.
--- Headers Follow ---
From jidanni@jidanni.org Mon Dec 6 07:01:04 2004
Return-Path: <jidanni@jidanni.org>
Delivered-To: grass-bugs@lists.intevation.de
Received: from mail.intevation.de (aktaia [212.95.126.10])
by lists.intevation.de (Postfix) with ESMTP id AECF4100167
for <grass-bugs@lists.intevation.de>; Mon, 6 Dec 2004 07:01:04 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by mail.intevation.de (Postfix) with ESMTP id 5DFD036DEF
for <grass-bugs@lists.intevation.de>; Mon, 6 Dec 2004 07:01:04 +0100 (CET)
Received: from frodo.hserus.net (frodo.hserus.net [204.74.68.40])
by mail.intevation.de (Postfix) with ESMTP id DFE3036CD8
for <grass-bugs@intevation.de>; Mon, 6 Dec 2004 07:01:02 +0100 (CET)
Received: from ppp-218-32-112-24.tc.sparqnet.net ([218.32.112.24]:33259 helo=jidanni1)
by frodo.hserus.net with esmtpsa
(Cipher TLSv1:RC4-SHA:128) (Exim 4.43 #0)
id 1CbBvg-000Fgx-4R by authid <jidanni> with plain
for <grass-bugs@intevation.de>; Mon, 06 Dec 2004 11:31:01 +0530
To: grass-bugs@intevation.de
Subject: d.zoomed in and out too much, now can't get back exactly
From: Dan Jacobson <jidanni@jidanni.org>
Date: Mon, 06 Dec 2004 11:34:13 +0800
Message-ID: <87oeh8aymi.fsf@jidanni.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Status: No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level:
-------------------------------------------- Managed by Request Tracker
Playing with g.zoom, after a while one wants to get back to the way
everything was in the beginning. But there is no way other than
d.mon stop=x1; g.region ...; d.mon x1
So perhaps d.zoom could have a new -r: restore option, to restore the
magnification/region used when the monitor was born.
Excellent idea. I happen to forget to save my starting region and then getting exactly back to it is a pain. If possible - please.
>this bug's URL: http://intevation.de/rt/webrt?serial_num=2786
>-------------------------------------------------------------------------
>
>Playing with g.zoom, after a while one wants to get back to the way
>everything was in the beginning. But there is no way other than
>d.mon stop=x1; g.region ...; d.mon x1
>So perhaps d.zoom could have a new -r: restore option, to restore the
>magnification/region used when the monitor was born.
Excellent idea. I happen to forget to save my starting region and then
getting exactly back to it is a pain. If possible - please.
Probably a long standing wish, but: Volunteer(s) needed...
> >this bug's URL: http://intevation.de/rt/webrt?serial_num=2786
> >------------------------------------------------------------------
> >
> >Playing with g.zoom, after a while one wants to get back to the way
> >everything was in the beginning. But there is no way other than
> >d.mon stop=x1; g.region ...; d.mon x1
> >So perhaps d.zoom could have a new -r: restore option, to restore
> >the magnification/region used when the monitor was born.
>
> Excellent idea. I happen to forget to save my starting region and
> then getting exactly back to it is a pain. If possible - please.
Probably a long standing wish, but: Volunteer(s) needed...
? I'm not sure I fully understand the problem.
restore the default region: (stored in PERMANENT/DEFAULT_WIND)
g.region -d
d.redraw
or
g.region save=home
d.zoom
g.region home
d.redraw
As I understand the wish, it is for a more or less automatic way of doing
the following (from your post below):
g.region save=home
d.zoom
g.region home
d.redraw
This only works if you remember to save the region to "home" before zooming.
ArcView and MapInfo both have a 'return to previous zoom' command. I also
would find it handy--though because of the ability of GRASS to save a named
region this function wouldn't be at the top of my wish list.
In GRASS, this would require d.zoom to execute a g.region save=temp_region
each time it resets the region. Then a 'zoom to previous' could call up the
saved temporary region and reset the region accordingly.
Michael
On 12/6/04 3:23 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:
Playing with g.zoom, after a while one wants to get back to the way
everything was in the beginning. But there is no way other than
d.mon stop=x1; g.region ...; d.mon x1
So perhaps d.zoom could have a new -r: restore option, to restore
the magnification/region used when the monitor was born.
Excellent idea. I happen to forget to save my starting region and
then getting exactly back to it is a pain. If possible - please.
Probably a long standing wish, but: Volunteer(s) needed...
? I'm not sure I fully understand the problem.
restore the default region: (stored in PERMANENT/DEFAULT_WIND)
g.region -d
d.redraw
or
g.region save=home
d.zoom
g.region home
d.redraw
or
d.zoom
g.region ...
d.redraw
?
Hamish
____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA
On Mon, Dec 06, 2004 at 11:13:46PM -0700, Michael Barton wrote:
Hamish,
As I understand the wish, it is for a more or less automatic way of doing
the following (from your post below):
g.region save=home
d.zoom
g.region home
d.redraw
This only works if you remember to save the region to "home" before zooming.
ArcView and MapInfo both have a 'return to previous zoom' command. I also
... also QGIS [1] offers this feature:
Using QGIS with new GDAL/GRASS plugin [2], you can enjoy most things which
are missing in the GRASS native display system (vector line thickness,
vector legend, 'return to previous zoom' etc).
Probably a long standing wish, but: Volunteer(s) needed...
Volunteer!
i added these functions to d.zoom (i hope i understood the wishes correctly). on quit, you get another menu asking you if you want to a) reset to default region b) reset to region from where d.zoom started or c) quit.
it works with d.zoom and d.zoom -f. as i don't know how to update the cvs i sent you the files. the new quit.c and an updated main.c.
As I understand the wish, it is for a more or less automatic way of
doing the following (from your post below):
g.region save=home
d.zoom
g.region home
d.redraw
This only works if you remember to save the region to "home" before
zooming. ArcView and MapInfo both have a 'return to previous zoom'
command. I also would find it handy--though because of the ability of
GRASS to save a named region this function wouldn't be at the top of
my wish list.
In GRASS, this would require d.zoom to execute a g.region
save=temp_region each time it resets the region. Then a 'zoom to
previous' could call up the saved temporary region and reset the
region accordingly.
to refine:
d.zoom would start out with
cp $MAPSET/WIND $MAPSET/OLD_WIND
and then do its thing & exit.
then we would need 'd.zoom -r' or 'g.region -r' to restore.
thanks for that! i'm new to oss development and any hint on how things are handled within in the community are most welcome.
after i send the message yesterday, i did some more changes. i added an "-l" (last) flag to d.zoom and an button to the gis manager calling it. it probably has some rough edges, but it basically works. to get a proper last extend, you got to have to use d.zoom twice before you use it. it is not affected by location changes other than those by d.zoom.
regards
florian
PS: quit.c is a new file, so there is nothing to diff it to. main.c and quit.c got to go to display/d.zoom/ the others to display/d.m/
thanks for that! i'm new to oss development and any hint on how things
are handled within in the community are most welcome.
after i send the message yesterday, i did some more changes. i added an
"-l" (last) flag to d.zoom and an button to the gis manager calling it.
it probably has some rough edges, but it basically works. to get a
proper last extend, you got to have to use d.zoom twice before you use
it. it is not affected by location changes other than those by d.zoom.
regards
florian
PS: quit.c is a new file, so there is nothing to diff it to. main.c and
quit.c got to go to display/d.zoom/ the others to display/d.m/
______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
thanks for that! i'm new to oss development and any hint on how things
are handled within in the community are most welcome.
after i send the message yesterday, i did some more changes. i added an
"-l" (last) flag to d.zoom and an button to the gis manager calling it.
it probably has some rough edges, but it basically works. to get a
proper last extend, you got to have to use d.zoom twice before you use
it. it is not affected by location changes other than those by d.zoom.
regards
florian
PS: quit.c is a new file, so there is nothing to diff it to. main.c and
quit.c got to go to display/d.zoom/ the others to display/d.m/
______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
don't overestimated my coding abilities :-). can't you apply the patches to d.zoom as well? i don't have cvs write access so i sadly can't do it myself.
regards
On 08 Dec 2004, at 19:19, Michael Barton wrote:
I am happy to make these changes to the GIS Manager when someone lets me
know that the changes in d.zoom have been implemented.
making diffs is quite simple and does not require cvs write access.
The few steps are (nothing to program):
- have a fresh 5.7 source code tree (needed anyway);
run
cvs up -dP
to refresh again (works fine even over 56k modem)
- create the diffs:
cd display/d.zoom/
cvs diff -u > dzoom.diffs
- send/post the file (as attachment).
That's it!
Thanks
Markus
On Thu, Dec 09, 2004 at 01:33:30PM +0100, Florian Goessmann wrote:
don't overestimated my coding abilities :-). can't you apply the
patches to d.zoom as well? i don't have cvs write access so i sadly
can't do it myself.
regards
On 08 Dec 2004, at 19:19, Michael Barton wrote:
>I am happy to make these changes to the GIS Manager when someone lets
>me
>know that the changes in d.zoom have been implemented.
>
>Michael
>
--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy
re quit.c: I'm not sure I want to have to do an extra right click every
time I zoom. slows me down man. Maybe only call with 'd.zoom -f' flag?
general comment: -l flags look exactly like -1 flags in some fonts...
makes both sense. find the changes attached. did it work, apart from that?