Google Earth API

Get geo-referenced GE image and points

GoogleEarth is a great tool. It provides images, coordinates as well as elevations. As references, all this information is very useful for Engineering Design. Google Earth can save the image, but the saved image is not geo-referenced, also no world file is provided. We have to get the coordinates or elevations manually. To xref the images into drawings with correct direction and scale can be challenging.

With AutoCAD 2012, AutoDesk provides a tool called "GoogleEarth Extension" (which is from Civil 3D 2012 I think) to import the GE image and surface mesh into AutoCAD. It is very handy, but it was stoped with the 2013 version, and since the 2014 version, AutoDesk changed to using images from BingMap instead of GoogleEarth. To the old GE users like myself, this is really inconvenient.

[sorry, I removed this video from youtube (17/10/2016)]

Then this GoogleEarth API is developed. Technically, it is base on GoogleEarth's EarthLibrary. It saves the GE image (black/white) with world file, and it can get coordinates and elevations and save these points to txt file for Civil 3D users to generate surface and contours. Compared with "GE Extension", this development is just part of its magic and not as powerful as GE Extension was, but it still is a very useful tool and worth of development. Used with another development "Load Image API" as shown in above video, it saves a lot of time and makes the work much easier.

Datum must be selected before saving an image or save points. GoogleEarth uses WGS84 projection, and GDA94 should be used in Australia. WGS84 and GDA94 are very close but are still different. After an image is saved, the information, such as the image pixel size and covered area, is shown on Image Info area. The image is rectangular but it has a small error in it. Because of the projection, the real covered area in fact is not rectangular, like in Image Info

Area, the four edges are not equal in pair. Hope these infos gives you a brief idea that how small the error to the saved image is.

When an image is saved, a world file will be saved too, also another file is a points file for four corners. This file will be very useful if you use Raster Image tools to correct the image. To get more points, just adjust the Grid value, then the columns and rows will be given. GoogleEarth will slow down the process if too many points were required. I know how to develop another tools to produce the contours with these points in AutoCAD, but I have Civil 3D, and it does not seem necessary for me to spend time on it.

The last thing needs to be explained is that "Cam" checkbox. When you move the view of GoogleEarth, you may rotate the view or make an angle of elevation to the view. If an image is saved like that, it is not correct. "Cam" actually is the shortened name of "GoogleEarth Camera" and if it is ticked, the tilt and compass will reset before saving.