A rather geeky first post for the New Year, but that’s no bad thing.
So the launch of an interesting if niche extension to the Google Maps javascript api, you can read Thor’s blog post here, but as of today you can now use a new library of functions as an addition to the javascript api to carry out spherical geometry calculations.
The world is no longer flat !
This has for a long time been a blind-spot, as with many api’s a flat euclidean coordinate system was used, which is OK for most applications covering relatively small areas or not requiring coordinate geometry calculations. Now with the new library extending the v3 API it is possible to use functions based on spherical geometry (assuming a sphere of radius 6378137m) giving more accurate area, distance, heading and general coordinate geometry functions.
For most users of Google Maps and the API this will not be relevant however, for the geo-geeks this is hardcore..
When represented on a projected map, the difference between the “flat” rhumb (red) and the spheric geometry based great circle lines (purple) are clear, but also misleading as the actual difference is less than a thousand kilometres between London and San Francisco and the rhumb line is actually longer !
So next time you take out the G-V you can at last accurately estimate fuel load (only joking !!)
It’s also of note that this new functionality is being delivered as an extension library which needs to be loaded in addition to the core v3 api, thereby making sure the core v3 api remains as small as possible for potential mobile use.
3 replies on “Because the world is not flat..”
[…] This post was mentioned on Twitter by Sam Vekemans,
Nicolas Helleringer. Nicolas Helleringer said: Because the world is
not flat.. –
http://edparsons.floo-net.com/2011/01/because-the-world-is-not-flat/
[…]
That is very nice, Ed! I particularly like the idea of extensions, does this mean there will be more in the future, or even that some of the core library will be pushed out as extensions, making it just that bit lighter?
On a slightly related topic see here
http://wtp2.appspot.com/warpdemo.htm
for a demo of in browser map reprojection.
You can even walk the Google Streetview pegman on to an OS map.