id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	state
1680	Add  Great Circle distance function	openlayers	tschaub	"I noticed that the current distance calculation function distanceTo() is based on the Pythagorean theorem, but a better method would be to calculate Great Circle distance instead.

I've written some code to do this and attached it to this ticket. Please consider it to be a donation to the OpenLayers project.

This would add two constants and one method (geoDistanceTo) to the OpenLayers.Geometry.Point class. It provides more accurate distance calculations than Pythagorus, especially over long distances.

The one restriction is that the point coordinates must be in decimal degrees. If they are not, then a user must first call transform() to convert them.

Another issue is that the constant Point.EARTH_RADIUS is in miles, so geoDistanceTo returns distances in miles. An alternative might be to supply a radius in whatever units you like as a parameter to the function. That way you would get the units desired as well as allowing distance calculations on spheres with different radii."	feature	closed	trivial		Geometry.Point	2.6	wontfix	distance, great circle	bthoen@…	
