Converting a Google Maps screenshot to Google Earth

Yesterday we looked at a problem with the Street View layer of Google Earth. We thought it would be interesting to compare the Street View coverage as shown in Google Earth with that shown in Google Maps. However, it is not very easy to compare them side by side due to the different formats.

So, we decided to finally try out something we have long considered doing but not got around to: get a screenshot of a Google Map into Google Earth. We started by capturing a screenshot of the current coverage of Street View in Google Maps at a resolution of 4096×4096 pixels using this file that uses the Google Maps API. Next, we took a screenshot using this screen capture plugin for Chrome.

Google Maps uses the Web Mercator Projection, but Google Earth overlays need to be in the Equirectangular Projection as we mentioned in this post. We found an open source library called GDAL that can convert between different map projections and using suggestions from this page on GIS StackExchange we were able to get our screen shot into the correct projection. We had to use the free image editing program GIMP to convert our initial screen shot to a tiff image, but apart from that there were no difficulties.

All that was left was to create a global overlay from the image and this is the result:

To try it out for yourself, download this KML file.

Also try adjusting the transparency of the image overlay as seen below:

About Timothy Whitehead

Timothy has been using Google Earth since 2004 when it was still called Keyhole before it was renamed Google Earth in 2005 and has been a huge fan ever since. He is a programmer working for Red Wing Aerobatx and lives in Cape Town, South Africa.






PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.



PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.