This project has moved. For the latest updates, please go here.

Plotting a Great Circle

Topics: Algorithms, SharpMap v0.9 / v1.x, WinForms Controls
Sep 12, 2007 at 8:38 PM
Hi Guys,

Just started with SharpMap, using 0.9 with VS2005, C# in WinForms.

How would you go about plotting a Great Cirdle between two locations such as 60 degrees North 3 Degrees West and 22 Degrees North and 72 Degrees West?

I can see the curve class but can't work out how to use it or if it what I should be using. Code snippets would help alot.

Nice work on the project guys, you should be very proud of your respective skills.


Sep 17, 2007 at 7:50 AM
Hi John -

You could do this, but it might be tricky. First off, the feature you'd want is a LineString, since that is the geometry type which is implemented.

In order to add the LineString, you'd need a layer backed by a GeometryProvider instance. The DemoWinForm project has a good example of how this is done.

Actually placing the great circle on the map is non-trivial, however, as far as I can tell. You'd have to numerically compute a number of points along the great circle, and add them to the LineString instance. Doing this for a spherical solid isn't too hard, but an ellipsoid gets a bit challenging. If I get any spare time next month, I'll take a look at it more closely, since I've been searching for problems like these anyway.