georeference.org
Subscribe to this thread
Home - General / All posts - Bearing/greater circle lines
Galain5 post(s)
#06-May-08 15:04

Hi,

I am considering purchasing Manifold, but I have one important question to ask first: is it possible to get Manifold to accurately draw greater circle lines? Ideally id like to be able to programatically specify a bearing and distance from a point and have a line drawn that takes the shortest path along the surface of the earth. Is this sort of thing possible without having to resort to manually calculating polylines?

Thanks.

tjhb

2,384 post(s)
#06-May-08 16:40

Yes.

You would first draw a straight line between two points in an unprojected map. (You can draw programmatically or manually, and you can use either one point and a bearing or two points.) Then use the Segmentize transform on the line, so that its coordinates are at most, say, 20m apart (the distance can be as fine as you like). Now show this straight polyline in a projected map, and the path will show as a curved polyline. (Reprojection is done on the fly.) Alternatively you can now reproject the polyline and it will become an inherently curved polyline, with an inherent length in linear measure.

tjhb

2,384 post(s)
#06-May-08 17:24

[Not thinking hard enough there sorry.]

tjhb

2,384 post(s)
#06-May-08 18:14

You would first draw a straight line between two points in an unprojected map.

That should be changed to:

"You would first draw a straight line between two points in a drawing having a Gnomonic projection."

The rest of it is correct I think.

This will only deliver a great circle path on the sphere, not on an ellipsoid. And if you wanted a very long great circle, spanning a hemisphere or more, then several drawings might be necessary.

There must be a more sophisticated way of doing this. Is there a simpler one?

mdsumner


2,971 post(s)
#06-May-08 18:32

I once asked for a new feature:

1. Draw a great circle between 2 points.

2. Draw a rhumb line between 2 points.

Both rely on some inherent segmentization so the "line" actually snaps to where it needs to, but I guess that could be a setting for "N nodes" or something. Probably there are only a limited number of projections in which you could sensibly do this, so maybe it's just a nice example for the doc/forum?


cuda shuda wuda

Galain5 post(s)
#07-May-08 01:45

Thanks for your reply tjhb. You obviously know your stuff! However, the distances I am dealing with will result in significant errors if one assumes a spheriod. Im surprised how many GIS packages dont support what I consider to be a fundamental feature for geodetic geometry (I've been researching a number of packages and so far have only found two, which is a shame as I was starting to like the look of manifold). The fall back is to use great circle maths to calculate nodes along a polyline, but its not ideal.

KlausDE


3,275 post(s)
online
#07-May-08 13:05

No need to do the curved projection by yourself TMO.

Create a straight line with StartPoint and EndPoint in LatLong projection. Look at it in a map using your projected Coordinatesystem.

... and then Create Segments, lets say 100 inflection points. You will see that Manifold reprojects every inflection point of each object and with enough segments it will show a smooth curve along the shortest path - which BTW often is as far from a circle as a straight line.

However I don't want to hinder any suggestions for true curves, which - refering to answers of tech@manifold.net - seem to be hard to do in projected and unprojected maps based on the same object type

tjhb

2,384 post(s)
#07-May-08 15:58

This is what I was thinking initially too, Klaus. If you already have great circle lines, that will work fine.

The other question is how to get great circle lines.

In what coordinate system are all straight lines great circle lines? Snyder says only in Gnomonic. (And then only over the sphere.)

In Lat/Long, I believe only parallels and meridians are great circle lines. Any straight line drawn obliquely is not.

Is this right? I certainly don't know my stuff here, but what an interesting question it is.

mdsumner


2,971 post(s)
#07-May-08 16:04

I was surprised at the suggestions to draw a great circle in lat/long - certainly that is not right as I understand it. I haven't looked closely enough to find if straight lines in Gnomonic are *always* great circles, or just if great circles in Gnomonic appear as straight lines - I suspect the latter and not the former must be the case.


cuda shuda wuda

tjhb

2,384 post(s)
#08-May-08 13:29

Dead right Mike. A miserable misreading on my part. The converse does not follow (of course) and is not true. Thanks.

woneil7 post(s)
#24-Aug-08 19:41

I haven't looked closely enough to find if straight lines in Gnomonic are *always* great circles, or just if great circles in Gnomonic appear as straight lines - I suspect the latter and not the former must be the case.

In fact there is an isomophism between straight lines on a gnomonic map and great circle segments on the globe. The projection may be derived from this property, and this is how it often is demonstrated in classes.

Considerable care is required in projecting large areas to the gnomonic in Manifold, since if the dataset spans as much as 180° in any dimension the projection will blow up without warning.

Will O'Neil

tjhb

2,384 post(s)
#26-Aug-08 14:28

Good to have this sort of expertise around. Can you point me towards a book or internet resource where this isomorphism is demonstrated? I'd like to be able to visualise it so that it seems to follow naturally (so that I follow). It sounds a very useful property.

KlausDE


3,275 post(s)
online
#07-May-08 17:09

Well, the task is to draw the shortest path along the surface of the earth primarily. Saw your first answer, Tim, and wanted to come back to this. The sector of a great circle was more of a guess how to get there as I understood Galain.

adamw


4,662 post(s)
#08-May-08 06:23

If all you are looking for is the distance between a pair of locations on an ellipsoid, you can use the EarthDistance query function (or Ctrl-Tracker).

tjhb

2,384 post(s)
#08-May-08 08:50

You mean DistanceEarth Adam?

But that function (like the Ctrl-Tracker tool) is currently not giving ellipsoidal distances, but distances over a sphere. As you've confirmed yourself, measurement is made in an Azimuthal Equidistant projection, which always uses a fixed eccentricity of zero, despite what is specified in the datum.

adamw


4,662 post(s)
#11-May-08 02:10

Yes, I meant DistanceEarth, and yes, DistanceEarth currently ignores flattening, but may still be useful if the difference in measurements between the ellipsoid and the corresponding sphere can be ignored.

tjhb

2,384 post(s)
#08-May-08 14:05

My earlier question (which I answered wrongly)—in what projection do all straight lines lie on great circle paths?"—The right answer is none, I think.

But my question was wrong, too!

We only need a projection in which a given straight line, drawn from a given A to a given B, must lie on a great circle path.

And there's at least one, which is an Azimuthal Equidistant, centred at either A or B. (I.e. with either A or B its pole.) Which is, after all, why Manifold measures "ellipsoidal" distances in that projection.

But there remains the problem that Azimuthal Equidistant is implemented only for a sphere. (Any sphere you like, I think, but one where any ellipsoidal flattening is ignored.)

So is there a projection in which we can draw a great ellipse path between A and B by means of a straight line?

Being simple (so as not to repeat any mistakes), I think we need three properties: the projection must be implemented for the ellipsoid, using flattening or eccentricity where specified; it must be azimuthal, meaning that the direction from the centre to any point is correct (and this must be true for both spherical and ellipsoidal forms); and it should be capable of mapping the entire earth, not just a hemisphere or less, so as to be able to map long distances.

Is there such a projection? The nearest match I can find is Lambert Azimuthal Equal Area. However, it seems not perfect, since (according to Snyder) direction from the centre is not quite true for the ellipsoidal form, except where the projection is centred on a pole. There is also the problem that a true ellipsoidal distance cannot be measured in this projection, since scale shrinks radially (and radically) with distance from the centre.

I'm thinking that a workable compromise might be this. Neither path nor distance would be exactly correct. I would like to know of a method that satisfied both criteria better.

(1) Draw a straight line from A to B in a Lambert Azimuthal Equal Area projection centred on A. (2) Segmentize it finely. (3) Reproject the path to Azimuthal Equidistant, centred on A, and measure its (spherical) length in that projection (or use DistanceEarth, or another built-in function, without necessary reprojection). Or use Vincenty's formula (outside Manifold) to calculate the ellipsoidal length. (4) Show the path in whatever projection is most suitable for display.

mdsumner


2,971 post(s)
#11-May-08 06:31

I'm too tired to think about this right now this but I remembered this reference that I'm sure will help us understand what's going on:

Abdali SK (1997) "The Correct Qibla",

<URL: http://patriot.net/users/abdali/ftp/qibla.pdf>


cuda shuda wuda

0 msec Copyright (C) 2007-2008 Manifold.net. All rights reserved.