|
If you'd like more control of Google Earth animation, than this toy code sample is for you! In GE's normal user interface you can place numerous placemarks in a folder and then tell that folder to animate the flight through the placemarks. You don't have many options through the GUI, so if you're pythonically inclined, you can get more control of the animation, like setting a variable time for looking at a location, or much more. See the the GE COM API spec at: http://earth.google.com/comapi/interfaceIApplicationGE.html The code below is pretty linear, but you could roll up a function and then pass in the arguements. If you had a feature class with attributes for lat, lon, alt, range, tilt, seconds, etc, then you could use a search cursor to slurp up all of this data and shoot from ArcGIS to Google Earth, but you'd get your set up work done in ArcGIS... If you look REALLY close, you may see me in the last stop on this tour!
import time import win32com.client ge = win32com.client.Dispatch("GoogleEarth.ApplicationGE") while not ge.IsInitialized(): print "waiting for GE to start up"
#http://earth.google.com/comapi/interfaceIApplicationGE.html
#SetCameraParams ([in] double lat,[in] double lon,[in] double alt,[in] AltitudeModeGE altMode, #[in] double range,[in] double tilt,[in] double azimuth,[in] double speed)
# AGRC ge.SetCameraParams( 40.777, -111.8882, 0.0, 1, 500.00, 40.00, 0.0, 0.1) time.sleep(30) # SLC C&C ge.SetCameraParams( 40.7594, -111.8868, 0.0, 1, 500.00, 40.00, 130.0, 0.1) time.sleep(15)
# Mt Superior ge.SetCameraParams( 40.5856, -111.6538, 0.0, 1, 2000.00, 60.00, -30.0, 0.1) |