Questions tagged [great-circle]

A great circle of a sphere is the intersection of the sphere and a plane which passes through the center point of the sphere. Used in navigation to determine the shortest distance between two points on the globe.

A great circle, also known as an orthodrome or Riemannian circle, of a sphere is the intersection of the sphere and a plane which passes through the center point of the sphere. This partial case of a circle of a sphere is opposed to a small circle, the intersection of the sphere and a plane which does not pass through the center. Any diameter of any great circle coincides with a diameter of the sphere, and therefore all great circles have the same circumference as each other, and have the same center as the sphere. A great circle is the largest circle that can be drawn on any given sphere. Every circle in Euclidean 3-space is a great circle of exactly one sphere.

For most pairs of points on the surface of a sphere there is a unique great circle through the two points. The exception is a pair of antipodal points, for which there are infinitely many great circles. The minor arc of a great circle between two points is the shortest surface-path between them. In this sense the minor arc is analogous to “straight lines” in Euclidean geometry. The length of the minor arc of a great circle is taken as the distance between two points on a surface of a sphere in Riemannian geometry. The great circles are the geodesics of the sphere.

Great-circle navigation is the practice of navigating a vessel (a ship or aircraft) along a great circle. A great circle track is the shortest distance between two points on the surface of a sphere; the Earth isn't exactly spherical, but the formulas for a sphere are simpler and are often accurate enough for navigation.

Useful Links

92 questions
193
votes
9 answers

MySQL Great Circle Distance (Haversine formula)

I've got a working PHP script that gets Longitude and Latitude values and then inputs them into a MySQL query. I'd like to make it solely MySQL. Here's my current PHP Code: if ($distance != "Any" && $customer_zip != "") { //get the great circle…
Nick Woodhams
  • 11,977
  • 10
  • 50
  • 52
21
votes
5 answers

Need a standalone Java library for performing spatial calculations on lat/lon data

I'm looking for a Java library that is capable of performing spatial calculations on sets of lat/lon data. Here are some of the functions that I'm looking for: Calculate the Great Circle distance between two points Determine if a point lies…
Jim Tough
  • 14,843
  • 23
  • 75
  • 96
13
votes
1 answer

World map showing day and night regions

I'm trying to add a daytime/nighttime line to a world map using ggplot in order to indicate day and night regions; something like this: The plan is to animate my map over a 24 hour cycle like this: The above animation is achieved using a sine…
jogall
  • 651
  • 6
  • 21
10
votes
2 answers

Fast python GIS library that supports Great Circle Distance and polygon

I was looking for a geographical library for python. I need to be able to do the following: Get the distance between 2 points (in meters) using Great-circle distance (not liner distance calculation) Check if a point is inside a polygon Perform 1…
asafm
  • 911
  • 6
  • 17
9
votes
4 answers

Great Circle Distance question

I am familiar with the formula to calculate the Great Circle Distance between two points. i.e.
Pax
  • 648
  • 6
  • 12
9
votes
3 answers

Great Circle Distance Formula: T-SQL

So I have a table with a bunch of different addresses in it. I need a proc that will select the addresses in that table that are within a specified distance in miles from the passed in lat/long values. So example of my table: - messageId - lat…
slandau
  • 23,528
  • 42
  • 122
  • 184
8
votes
4 answers

Need help calculating geographical distance

I'm setting up a small program to take 2 geographical coordinates from a user and then calculate the distance between them(taking into account the curvature of the earth). So I looked up wikipedia on what the formula is here. I basically set up my…
Darkphenom
  • 647
  • 2
  • 8
  • 14
8
votes
1 answer

Automating great-circle map production in R

I've taken some of the things I learned in a Flowing Data great circle mapping tutorial and combined them with code linked in the comments to prevent weird things from happening when R plots trans-equatorial great circles. That gives me…
gpe
  • 83
  • 4
8
votes
2 answers

Wrapping great circles with Mercator maps with D3.js, Leaflet, or Mapbox

The question, in short: How can I accurately project a wrapping great circle radius in Mercator using something other than the Google Maps API? The question, in long: So I've got a conundrum. I run a mapping application that uses Google Maps API to…
nucleon
  • 861
  • 6
  • 22
8
votes
1 answer

Great circles Map within a country in R

I am working on a commuter travel Pattern (Origin - Destination) Flow Map in R. The Data i have is daily transaction of commuters (Date,Card,Entry_lat,Entry_Long,Exit_Lat,Exit_Long). The Travel Path might be similar (as they commute to work). I…
Prasanna Nandakumar
  • 4,295
  • 34
  • 63
5
votes
1 answer

How to calculate a longitude and latitude at a given distance along a great circle?

I want to overlay great circle arcs between airports on a map using longitudes and latitudes. I can already get the distance and bearing from the initial and final coordinates but now I need to produce the points on the curve to plot through. What…
Nathan
  • 187
  • 1
  • 3
  • 10
5
votes
1 answer

Weird Great Circle Distance calculation

I have some problems with a great circle distance calculation using a map. Context: http://airports.palzkill.de/search/ The map is supposed to work as a great circle distance search map - you move the circles center marker or the radius marker, and…
Marco P.
  • 153
  • 7
5
votes
2 answers

Is it possible to implement the Haversine formula in Objective-C and call it from SQLite?

As I understand, SQLite doesn't have the math functions to properly implement the Haversine formula in straight SQL. I'm thinking this should be possible using an external function, with the implementation being in C. The goal is to have a SQLite…
brianegge
  • 29,240
  • 13
  • 74
  • 99
4
votes
2 answers

R: Distm for big data? Calculating minimum distances between two matrices

I have two matrices, one is 200K rows long, the other is 20K. For each row (which is a point) in the first matrix, I am trying to find which row (also a point) in the second matrix is closest to the point in the first matrix. This is the first…
Ana
  • 421
  • 3
  • 12
4
votes
2 answers

Point to great-circle segment distance

I want to calculate the distance from a point given by latitude and longitude to a line-segment given by two points (part of a great-circle). All coordinates are given in WGS84. I know how to calculate this in Cartesian coordinates but not on a…
user2033412
  • 1,950
  • 2
  • 27
  • 47
1
2 3 4 5 6 7