[GRASS-user] How to find out an angle between to points on the map (for r.plane, r.lake)

On Feb 28, 2008, at 6:32 PM, grass-user-request@lists.osgeo.org wrote:

Date: Thu, 28 Feb 2008 16:17:17 -0800
From: Dylan Beaudette <dylan.beaudette@gmail.com>
Subject: Re: [GRASS-user] How to find out an angle between to points
  on the map (for r.plane, r.lake)
To: grass-user@lists.osgeo.org
Message-ID: <200802281617.17608.dylan.beaudette@gmail.com>
Content-Type: text/plain; charset="iso-8859-15"

On Thursday 28 February 2008, Philipp Steigenberger wrote:

Hi
I want to work with r.plane and r.lake to get simulate floodings in DTMs.

In the section of interest there is a river which runs from about SSW to
NNE. For r.plane I need the
azimuth. Is there a tool in GRASS which tells me the angle between two
points I mark on the map like I can measure in between two points with
d.measure?

Well of course I had to go and try this out.

attached is a patch (against todays SVN) to optionally print the bearing
between clicks.

Dylan

In the new wxPython GUI, the measure tool prints bearing as well as distance between click points.

Michael

On Thu, Feb 28, 2008 at 9:36 PM, Michael Barton <michael.barton@asu.edu> wrote:

On Feb 28, 2008, at 6:32 PM, grass-user-request@lists.osgeo.org wrote:

> Date: Thu, 28 Feb 2008 16:17:17 -0800
> From: Dylan Beaudette <dylan.beaudette@gmail.com>
> Subject: Re: [GRASS-user] How to find out an angle between to points
> on the map (for r.plane, r.lake)
> To: grass-user@lists.osgeo.org
> Message-ID: <200802281617.17608.dylan.beaudette@gmail.com>
> Content-Type: text/plain; charset="iso-8859-15"

>
> On Thursday 28 February 2008, Philipp Steigenberger wrote:
>> Hi
>> I want to work with r.plane and r.lake to get simulate floodings
>> in DTMs.
>>
>> In the section of interest there is a river which runs from about
>> SSW to
>> NNE. For r.plane I need the
>> azimuth. Is there a tool in GRASS which tells me the angle between
>> two
>> points I mark on the map like I can measure in between two points
>> with
>> d.measure?
>>
>

> Well of course I had to go and try this out.
>
> attached is a patch (against todays SVN) to optionally print the
> bearing
> between clicks.
>
> Dylan

In the new wxPython GUI, the measure tool prints bearing as well as
distance between click points.

Michael

Thanks for the update. I don't regularly use either of the GUI and did
not know about this feature. Does the patch that I submitted interfere
with this functionality? I think that it would be useful to have this
functionality in the old style monitors as well.

Cheers,

Dylan

Dylan,

If I remember, your patch is to d.measure? We don't use any of the old interactive xterm commands. In fact, you can't use them anywhere except in an xterm.

Michael
______________________________
Michael Barton, Professor
Professor of Anthropology
Director of Graduate Studies
School of Human Diversity & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Feb 29, 2008, at 9:34 AM, Dylan Beaudette wrote:

On Thu, Feb 28, 2008 at 9:36 PM, Michael Barton <michael.barton@asu.edu> wrote:

On Feb 28, 2008, at 6:32 PM, grass-user-request@lists.osgeo.org wrote:

Date: Thu, 28 Feb 2008 16:17:17 -0800
From: Dylan Beaudette <dylan.beaudette@gmail.com>
Subject: Re: [GRASS-user] How to find out an angle between to points
     on the map (for r.plane, r.lake)
To: grass-user@lists.osgeo.org
Message-ID: <200802281617.17608.dylan.beaudette@gmail.com>
Content-Type: text/plain; charset="iso-8859-15"

On Thursday 28 February 2008, Philipp Steigenberger wrote:

Hi
I want to work with r.plane and r.lake to get simulate floodings
in DTMs.

In the section of interest there is a river which runs from about
SSW to
NNE. For r.plane I need the
azimuth. Is there a tool in GRASS which tells me the angle between
two
points I mark on the map like I can measure in between two points
with
d.measure?

Well of course I had to go and try this out.

attached is a patch (against todays SVN) to optionally print the
bearing
between clicks.

Dylan

In the new wxPython GUI, the measure tool prints bearing as well as
distance between click points.

Michael

Thanks for the update. I don't regularly use either of the GUI and did
not know about this feature. Does the patch that I submitted interfere
with this functionality? I think that it would be useful to have this
functionality in the old style monitors as well.

Cheers,

Dylan

Hi Dylan,

2008/2/29, Dylan Beaudette <dylan.beaudette@gmail.com>:
[snip]

Thanks for the update. I don't regularly use either of the GUI and did
not know about this feature. Does the patch that I submitted interfere
with this functionality? I think that it would be useful to have this
functionality in the old style monitors as well.

d.measure is not used in wxGUI. Display windows are not registered as
GRASS displays (d.mon -L) [TODO, not sure how to implemented], I think
it would be good to use d.measure or something like g.measure in wxGUI
too instead of using Python-based function for distance calculation
(at least it would make sense for LL projections)? Please correct me
if I am wrong.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

On Friday 29 February 2008, Michael Barton wrote:

Dylan,

If I remember, your patch is to d.measure? We don't use any of the old
interactive xterm commands. In fact, you can't use them anywhere
except in an xterm.

Michael

Hi Michael,

Right -- this patch was to d.measure, so it sounds like it will not interfere
with the workings of the GUI.

Cheers,

Dylan

______________________________
Michael Barton, Professor
Professor of Anthropology
Director of Graduate Studies
School of Human Diversity & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Feb 29, 2008, at 9:34 AM, Dylan Beaudette wrote:
> On Thu, Feb 28, 2008 at 9:36 PM, Michael Barton <michael.barton@asu.edu
>
> > wrote:
>>
>> On Feb 28, 2008, at 6:32 PM, grass-user-request@lists.osgeo.org
>>
>> wrote:
>>> Date: Thu, 28 Feb 2008 16:17:17 -0800
>>> From: Dylan Beaudette <dylan.beaudette@gmail.com>
>>> Subject: Re: [GRASS-user] How to find out an angle between to points
>>> on the map (for r.plane, r.lake)
>>> To: grass-user@lists.osgeo.org
>>> Message-ID: <200802281617.17608.dylan.beaudette@gmail.com>
>>> Content-Type: text/plain; charset="iso-8859-15"
>>>
>>> On Thursday 28 February 2008, Philipp Steigenberger wrote:
>>>> Hi
>>>> I want to work with r.plane and r.lake to get simulate floodings
>>>> in DTMs.
>>>>
>>>> In the section of interest there is a river which runs from about
>>>> SSW to
>>>> NNE. For r.plane I need the
>>>> azimuth. Is there a tool in GRASS which tells me the angle between
>>>> two
>>>> points I mark on the map like I can measure in between two points
>>>> with
>>>> d.measure?
>>>
>>> Well of course I had to go and try this out.
>>>
>>> attached is a patch (against todays SVN) to optionally print the
>>> bearing
>>> between clicks.
>>>
>>> Dylan
>>
>> In the new wxPython GUI, the measure tool prints bearing as well as
>> distance between click points.
>>
>> Michael
>
> Thanks for the update. I don't regularly use either of the GUI and did
> not know about this feature. Does the patch that I submitted interfere
> with this functionality? I think that it would be useful to have this
> functionality in the old style monitors as well.
>
> Cheers,
>
> Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

On Feb 29, 2008, at 12:56 PM, Martin Landa wrote:

Hi Dylan,

2008/2/29, Dylan Beaudette <dylan.beaudette@gmail.com>:
[snip]

Thanks for the update. I don't regularly use either of the GUI and did
not know about this feature. Does the patch that I submitted interfere
with this functionality? I think that it would be useful to have this
functionality in the old style monitors as well.

d.measure is not used in wxGUI. Display windows are not registered as
GRASS displays (d.mon -L) [TODO, not sure how to implemented], I think
it would be good to use d.measure or something like g.measure in wxGUI
too instead of using Python-based function for distance calculation
(at least it would make sense for LL projections)? Please correct me
if I am wrong.

What's wrong with the Python one?

Michael

Micheal,

2008/3/1, Michael Barton <michael.barton@asu.edu>:

> 2008/2/29, Dylan Beaudette <dylan.beaudette@gmail.com>:
> [snip]
>> Thanks for the update. I don't regularly use either of the GUI and
>> did
>> not know about this feature. Does the patch that I submitted
>> interfere
>> with this functionality? I think that it would be useful to have
>> this
>> functionality in the old style monitors as well.
>
> d.measure is not used in wxGUI. Display windows are not registered as
> GRASS displays (d.mon -L) [TODO, not sure how to implemented], I think
> it would be good to use d.measure or something like g.measure in wxGUI
> too instead of using Python-based function for distance calculation
> (at least it would make sense for LL projections)? Please correct me
> if I am wrong.

Michael,

What's wrong with the Python one?

duplication of the code, and in this particular case ignoring geodetic
distance for LL projections.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *