tag:blogger.com,1999:blog-6265571233418601933.post8071650437572662811..comments2024-03-18T21:06:51.584+01:00Comments on Cees's Blog: Quick & easy navigation.Cees Timmermanhttp://www.blogger.com/profile/09503128896817151851noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6265571233418601933.post-87779976732030842842013-01-25T18:04:43.592+01:002013-01-25T18:04:43.592+01:00In SQL Express, it's: square(lat-lat2) + squar...In SQL Express, it's: <i>square(lat-lat2) + square(2 * case when abs(lon-lon2) < 360 - abs(lon-lon2) then abs(lon-lon2) else 360 - abs(lon-lon2) end)</i>Cees Timmermanhttps://www.blogger.com/profile/09503128896817151851noreply@blogger.comtag:blogger.com,1999:blog-6265571233418601933.post-53600455865212084922012-04-05T15:46:57.051+02:002012-04-05T15:46:57.051+02:00That's twice as slow as the spherical law of c...That's twice as slow as the <a href="http://en.wikipedia.org/wiki/Spherical_law_of_cosines" rel="nofollow">spherical law of cosines</a>, though, which is slower (but more accurate, at least near the poles) than my formula.Cees Timmermanhttps://www.blogger.com/profile/09503128896817151851noreply@blogger.comtag:blogger.com,1999:blog-6265571233418601933.post-65611878683148893472012-03-28T16:55:06.243+02:002012-03-28T16:55:06.243+02:00The haversine formula says that Honolulu (21.30694...<a href="http://www.movable-type.co.uk/scripts/latlong.html#cosine-law" rel="nofollow">The haversine formula</a> says that Honolulu (21.3069444, -157.8583333) to Los Angeles (34.0522342, -118.2436849) is 4120 km and to San Fransisco (37.7749295, -122.4194155) is 3854 km.<br />I think <a href="http://www.geodistance.com/" rel="nofollow">this</a> and <a href="http://www.functions-online.com/geo-distance.html" rel="nofollow">this</a> use that.Cees Timmermanhttps://www.blogger.com/profile/09503128896817151851noreply@blogger.com