Discussions and Opinions about Internet Mapping and GIS using Open Source software (MapGuide, UMN Mapserver, MapBender), Oracle, and Data Warehousing.

Thursday, October 18, 2007

Google Maps: Is the Earth a Sphere or Ellipsoid?

Google Maps sees the Earth as a Spheroid, not an Ellipsoid. This came up through a discussion on the PROJ mailing list and I thought it was interesting to point out how Open Source can even handle projected lat/long systems (such as Google Maps) using a very familiar tool called cs2cs.

Christoper Schmidt wrote about it on his blog and also on his blog he points out the EPSG code to use. The magical number for the Google Mercator Projection (of a lat/long grid based on a sphere) is: 900913

Now onto the fun, showing how we can use Open Source to have our data show within a KML project and Google Maps. Quoting from Frank's FAQ, he provides an excellent example, we see the following the use of cs2cs:

Because we are dealing with a sphere, the Y values will be greatly different from those on an ellipsoid (30 to 100 metres or more).

Quoting Frank again:

"In this case, and many other cases using spherical projections, the desired approach is to actually treat the lat/long locations on the sphere as if they were on WGS84 without any adjustments when using them for converting to other coordinate systems. The solution is to "trick" PROJ.4 into applying no change to the lat/long values when going to (and through) WGS84. This can be accomplished by asking PROJ to use a null grid shift file for switching from your spherical lat/long coordinates to WGS84.

As you can see the value of Open Source and the mailing list and Open Source software is that people are sharing knowledge - whether it be via blogs, lists, or some other means of communication. There is a community out there that supports each other. These are actual users facing everyday problems and looking for solutions. The answers do exist, just the question has to be asked, and the community comes together to help.

Advertising, Sponsorships & Donations

This blog is maintained by Dean C. Mikkelsen, who searches the web and keeps in contact with people involved the Open Source and the latest software and tools being used in this digital world. He hopes to move the blog soon to a new site, but this requires your help - the reader. So any donations are welcome to maintain this blog and provide interesting reading. Also, if you are interested in advertising or sponsoring the blog, feel free to contact Dean C. Mikkelsen and he'll get you up and running make sure that your help is appreciated in maintaining a high standard and quality.

About Me

Dean C. Mikkelsen, B.Sc., P.Eng., Director, Terra ETL Ltd., has consulted and worked overseas in Africa, Europe and the USA within the Oil & Gas industry, Mining, and Forestry industries. He is a Surveying Engineer by trade and has specialized in software, large databases, and geodetic problems. He was a founding member of the America's Petroleum Survey Group in Houston. This group specialized in geodetic problems worldwide as it applied to the E&P industry and was the sister organization to European Petroleum Survey Group (EPSG).