Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-19 Thread Nyall Dawson
On 16 June 2017 at 06:36, C Hamilton  wrote:

> There are several missing methods to QgsDistanceArea
>
> 1. Return the shortest path line between two points. The input would be the
> two points and the maximum distance of travel before a new line segment is
> added to the path. It may be good to add an attribute that is the maximum
> number of line segments that the line can have.
>
> 3. Calculate the intersection of two paths given their starting points and
> bearing.

These sound very useful! I'd love to see them implemented.

> 2. Given a starting point, bearing, and distance, return the destination
> point.

This was recently added (in master) by Mark Johnson.

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-15 Thread C Hamilton
That's nice to see someone else with the same ideas and needs. Ultimately
what I would like to see happen is for QgsDistanceArea class to be expanded
to support these better geodesic algorithms, but also support great circle
transforms as well. The advantage of simpler algorithms is their speed and
for short distances are relatively accurate, but for real accuracy
geographiclib is the way to go. ArcGIS also supports Rhumb lines. I'm not
sure if that would be needed or not.

There are several missing methods to QgsDistanceArea

1. Return the shortest path line between two points. The input would be the
two points and the maximum distance of travel before a new line segment is
added to the path. It may be good to add an attribute that is the maximum
number of line segments that the line can have.

2. Given a starting point, bearing, and distance, return the destination
point.

3. Calculate the intersection of two paths given their starting points and
bearing.






On Wed, Jun 14, 2017 at 11:21 PM, Tobias Wendorff <
tobias.wendo...@tu-dortmund.de> wrote:

> Am Mi, 14.06.2017, 23:41 schrieb Nyall Dawson:
> >
> > This looks relevant:
> >
> > https://github.com/sourcepole/kadas-albireo/commit/
> df64318e5198f40f0e96d27fcf9e179fbbf682fd
>
> Thanks, nice find. After googling a bit: that seems to be the GIS
> of the Swiss army :)
>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-14 Thread Even Rouault
On jeudi 15 juin 2017 07:41:06 CEST Nyall Dawson wrote:
> On 13 June 2017 at 00:20, C Hamilton  wrote:
> >> > Right now it could use the Vincinty algorithms in QGIS to calculate the
> >> > distances, but eventually I would like to see the geographiclib
> >> > algorithms
> >> > used.
> >> 
> >> I'd start with the bearing changes (since they are self contained, and
> >> the methods for calculating bearing are already present in the QGIS
> >> api). Then using geographiclib could be discussed as a separate set of
> >> changes, to be decided on its own merit. If you mix these two changes
> >> it's likely to get bogged down as one or other part of the changes are
> >> debated.
> > 
> > Ok.
> 
> This looks relevant:
> 
> https://github.com/sourcepole/kadas-albireo/commit/df64318e5198f40f0e96d27fc
> f9e179fbbf682fd
> 
> There's a lot of unrelated changes in there, but it also shows the
> basics for using geographiclib within the QGIS c++ code.
> 

Note that at least since proj 4.9.0, Charles Karney has ported its geodesic 
code from 
geographiclib in C (since proj.4 is C only) and the header is normally 
installed with proj-dev 
package (I've just checked on my Ubuntu 16.04 with proj 4.9.2. I see it is also 
available in 
OSGeo4W):

https://github.com/OSGeo/proj.4/blob/4.9.0/src/geodesic.h

Even
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-14 Thread Nyall Dawson
On 13 June 2017 at 00:20, C Hamilton  wrote:

>>
>> > Right now it could use the Vincinty algorithms in QGIS to calculate the
>> > distances, but eventually I would like to see the geographiclib
>> > algorithms
>> > used.
>>
>> I'd start with the bearing changes (since they are self contained, and
>> the methods for calculating bearing are already present in the QGIS
>> api). Then using geographiclib could be discussed as a separate set of
>> changes, to be decided on its own merit. If you mix these two changes
>> it's likely to get bogged down as one or other part of the changes are
>> debated.
>
>
> Ok.

This looks relevant:

https://github.com/sourcepole/kadas-albireo/commit/df64318e5198f40f0e96d27fcf9e179fbbf682fd

There's a lot of unrelated changes in there, but it also shows the
basics for using geographiclib within the QGIS c++ code.

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-12 Thread C Hamilton
> >
> > 2. I would like to see a check box or selection widget of some sort that
> > chooses between using Geodesic math or the current method of calculating
> the
> > distances which I am still unsure on how it is doing its calculations.
>
> If you expand down the info box you'll get a detailed description of
> exactly how QGIS is calculating the distances. Is there something
> missing there?
>

In some sense the measure tool is rather confusing. You can't just use it
without really reading up on how to use it and even then I am not 100% sure
I am getting the results I want, but as I look more into it I also realize
I have had a narrow view on how users might use it.

When you click the configuration button it takes you to the Map Tools
Options. What I didn't initially realize is that there are also project
properties that you also need to set as well. There is not a button on the
measure tool dialog that takes you to that dialog to change those settings.
Can this be simplified some how?

By default it appears that "None / Planimetric" is selected as the
ellipsoid. I think that for many people trying to use QGIS they are not
going to know how to get the settings set correctly to get accurate
measurements. I personally prefer to have the defaults set so that all
measurements make use of the Vincinty algorithm - projecting the
coordinates to latitude and longitudes and then doing that calculation.
This would give relative accurate measurements, but for the user that has a
local projection then they might want to select something else.

By the way there appears to be a problem with selecting Project
Properties->General Ellipsoid settings for QGIS 3. Every time I go into
these settings the Ellipsoid is set to "None / Plainimetric" and it is not
enabled. I have to click on the CRS tab and then go back for it to be
enabled.


>
> > Right now it could use the Vincinty algorithms in QGIS to calculate the
> > distances, but eventually I would like to see the geographiclib
> algorithms
> > used.
>
> I'd start with the bearing changes (since they are self contained, and
> the methods for calculating bearing are already present in the QGIS
> api). Then using geographiclib could be discussed as a separate set of
> changes, to be decided on its own merit. If you mix these two changes
> it's likely to get bogged down as one or other part of the changes are
> debated.


Ok.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-12 Thread Nyall Dawson
On 12 June 2017 at 18:43, Neumann, Andreas  wrote:
> +1 for getting these improvements in QGIS core, rather than in a plugin.
>
> fyi: https://map.geo.admin.ch/ has an interesting "all-in-one" measure tool,
> which could server as an inspiration for QGIS.
>
> If you start with a new measure line, you first get a circle with distance
> and bearing. It also shows markers with labels along the line with round
> distances (e.g. 500m, 1000m, etc.). If you close the polygon by going back
> to the first vertex, it autosnaps and shows the area. So it is really just
> one single tool, but it helps to show distances, bearings and areas - along
> with an elevation profile.

That's quite nice! I wonder why the bearing/radius circle is only
shown for the first line segment though...

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-12 Thread Paolo Cavallini
Il 12/06/2017 10:43, Neumann, Andreas ha scritto:
> +1 for getting these improvements in QGIS core, rather than in a plugin.

+1
thanks

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-12 Thread Neumann, Andreas
+1 for getting these improvements in QGIS core, rather than in a plugin.


fyi: https://map.geo.admin.ch/ has an interesting "all-in-one" measure
tool, which could server as an inspiration for QGIS. 

If you start with a new measure line, you first get a circle with
distance and bearing. It also shows markers with labels along the line
with round distances (e.g. 500m, 1000m, etc.). If you close the polygon
by going back to the first vertex, it autosnaps and shows the area. So
it is really just one single tool, but it helps to show distances,
bearings and areas - along with an elevation profile. 

Greetings, 

Andreas 

On 2017-06-12 10:27, Nyall Dawson wrote:

> On 10 June 2017 at 02:30, C Hamilton  wrote: 
> 
>> Several weeks ago I had proposed a geodesic measure tool that also includes
>> the bearing from point A to B and bearing from B to A. Nyall suggested that
>> this capability be added to the QGIS measure tool. The question is would you
>> want this with the QGIS measure tool or should it be a separate plugin?
> 
> My strong vote would be towards extending the QGIS measure tool. To me
> that's a better solution then requiring users to download a plugin,
> and having to reimplement all the (complex) logic of the measure tool
> again in a python plugin.
> 
>> 1. Where the current measure tool has 'Segments' there would be two more
>> columns with 'Bearing to' and 'Bearing from'.
> 
> Sounds good!
> 
>> 2. I would like to see a check box or selection widget of some sort that
>> chooses between using Geodesic math or the current method of calculating the
>> distances which I am still unsure on how it is doing its calculations.
> 
> If you expand down the info box you'll get a detailed description of
> exactly how QGIS is calculating the distances. Is there something
> missing there?
> 
>> Right now it could use the Vincinty algorithms in QGIS to calculate the
>> distances, but eventually I would like to see the geographiclib algorithms
>> used.
> 
> I'd start with the bearing changes (since they are self contained, and
> the methods for calculating bearing are already present in the QGIS
> api). Then using geographiclib could be discussed as a separate set of
> changes, to be decided on its own merit. If you mix these two changes
> it's likely to get bogged down as one or other part of the changes are
> debated.
> 
>> If this is of interest then I will attempt to get a QGIS development
>> environment running to help make the changes to the core measure tool;
>> otherwise, I will just create a plugin to do this. If I create a plugin I
>> will use the geographiclib python library to do the calculations.
>> 
>> Thoughts?
> 
> Go the core! Let us know if you need help setting up a dev
> environment. It's actually much easier for 3.0 then it was for 2.x
> (especially on windows).
> 
> Nyall
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Geodesic Measure Tool With Bearing Information

2017-06-12 Thread Nyall Dawson
On 10 June 2017 at 02:30, C Hamilton  wrote:
> Several weeks ago I had proposed a geodesic measure tool that also includes
> the bearing from point A to B and bearing from B to A. Nyall suggested that
> this capability be added to the QGIS measure tool. The question is would you
> want this with the QGIS measure tool or should it be a separate plugin?

My strong vote would be towards extending the QGIS measure tool. To me
that's a better solution then requiring users to download a plugin,
and having to reimplement all the (complex) logic of the measure tool
again in a python plugin.

>
> 1. Where the current measure tool has 'Segments' there would be two more
> columns with 'Bearing to' and 'Bearing from'.

Sounds good!

>
> 2. I would like to see a check box or selection widget of some sort that
> chooses between using Geodesic math or the current method of calculating the
> distances which I am still unsure on how it is doing its calculations.

If you expand down the info box you'll get a detailed description of
exactly how QGIS is calculating the distances. Is there something
missing there?

> Right now it could use the Vincinty algorithms in QGIS to calculate the
> distances, but eventually I would like to see the geographiclib algorithms
> used.

I'd start with the bearing changes (since they are self contained, and
the methods for calculating bearing are already present in the QGIS
api). Then using geographiclib could be discussed as a separate set of
changes, to be decided on its own merit. If you mix these two changes
it's likely to get bogged down as one or other part of the changes are
debated.

> If this is of interest then I will attempt to get a QGIS development
> environment running to help make the changes to the core measure tool;
> otherwise, I will just create a plugin to do this. If I create a plugin I
> will use the geographiclib python library to do the calculations.
>
> Thoughts?

Go the core! Let us know if you need help setting up a dev
environment. It's actually much easier for 3.0 then it was for 2.x
(especially on windows).

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer