blankblank blank

Automating The Google Earth Caching Process

In a previous post, I described how to manually create a Google Earth disk cache file for an area. For small areas, this is probably the fastest approach, but for larger areas, doing it manually can get tedious. I’ve found three programs that can automate this process, but before reviewing them, it might be useful to go through common factors for all of them.

All three programs work by creating a KML file for a particular location, and then updating that file on user-specified schedule, typically every 5-10 seconds, with a new location. You need to create a Network Link in Google Earth to this KML file that updates on a regular basis as well; as the KML file is updated on a regular basis, the Network Link picks this up, and moves the Google Earth view to the new location, where imagery is downloaded and added to the cache.

To create a Network Link in Google Earth:

1. Open up Google Earth, and from the Add menu choose Network Link.

2. Click the Browse button, and select the KML file used by the cache automation programs (CashBild.kml in the example below):

Network link Google Earth

3. Select the “Periodically” option for the Time-Based Refresh, and then set the refresh time to 5-10 seconds (more on this shortly).

4. Check the “Fly to View on Refresh” box; this tells Google Earth to move to the updated location in the Network link file.

When the location is updated in the network link, Google Earth will fly to that location, download the imagery and display it. But if the speed with which it flies to the location is too slow, then the location may shift to a new one before all the data is downloaded. To make sure this doesn’t happen, go to Tools => Options, Touring tab, and set the “Fly-To Speed” to a higher value than the default of 0.180:

Google Earth fly to speed

Here I’ve set it midway, which should be fast enough for caching, but not too fast for regular fly-to operations. You can experiment with this setting to find the one that works best for you.

The caching programs I’ll be reviewing have the following options:

  • Set the bounds of the area you want to cache. Two of them require you to specify the NW corner of the area in latitude/longitude, and the east and south bounds of the area from that point in distance (meters or kilometers); the third requires the E/W longitude and N/S latitude bounds. Because of how they work, they don’t function directly over the poles, or across the 180W/180E longitude transition (essentially the International Date Line)
  • Set the spacing for successive points. This sets the distance that the view moves between one point and another. It would be convenient if the programs calculated the correct value for you, so that every bit of imagery in your designated area was covered, but they don’t. You have to set this manually, and the correct value will depend on the altitude the views are downloaded at (i.e. the image resolution).  Set it too small, and you won’t miss any imagery, but it will take longer; set it too large, and you might miss some areas. I’ve found that a reasonable rule-of-thumb is to set the spacing about 10-15% smaller than the altitude you set (see the next item), and then watch the first few Google Earth views to see if you’re getting enough overlap between successive views. If you’re getting too much overlap, increase the spacing; no overlap, decrease the spacing. You can also set the eye altitude you plan to use manually in Google Earth, and then use the Ruler tool to manually measure the field of view in both E/W and N/S. Take the smaller of the two values, decrease it by about 10-15%, and that should be a satisfactory spacing
  • Set the altitude. Two of the programs let you set the altitude/elevation over terrain (Eye alt – elev in Google Earth), while the third requires you to set that manually. The lower the altitude, the higher the resolution of the imagery downloaded to the cache, but the more time it will take and the larger the final cache size. For some areas with very high resolution imagery, the eye altitude will need to be no more than a few hundred meters to capture the highest resolution imagery. For other areas where only Landsat imagery is available, this could easily be set to a kilometer or two. If you want the cache to contain the imagery appropriate for varying heights, you’ll have to run these programs with different eye altitudes for the same area. For GE Cacher, you’ll need to
  • Set the update time.Two of the programs update the KML file with a user-defined time interval. The longer the time interval, the longer it will take, but too short an interval may not give Google Earth enough time to download all the data. The appropriate interval will depend on your Internet connection speed, and how fast the Google Earth servers can provide the data. Start with about 10 seconds, and then adjust it up or down based on whether all the data for a view is downloaded before it moves to a new view. Important: You should set the Network Link Time-Based Refresh interval to be no longer than the update time, otherwise you might miss some of the position updates. You might even try the shortest refresh interval available, one second, and see if that works for you; too often shouldn’t cause a problem, too seldom will. For the third program with a fixed update interval, GE Cacher, you should definitely set the Refresh to one second.

Once everything is set up, all the programs will have the option to start the caching, and manually pause or stop it before it’s completed if you want. As with the manual caching process, you might want to empty the current disk cache before starting, and set the memory cache as small as possible. When you’re done with a caching session, you should either uncheck or delete the Network Link to the KML file; otherwise, next time you run Google Earth, it will go to that file’s location/view and keep returning there regardless of where you want to see. If you want to save the cache data, copy the files from their location to another one for safekeeping.

Next up: reviews of the Google Earth cache automation programs.

Looking for something else? Enter some keywords below, then click "Search".    

2 Responses to “Automating The Google Earth Caching Process”

  1. 1 baby

    is it possible to increase disk cache more than 2GB?

  2. 2 Leszek Pawlowicz

    No – the Google Earth cache limit is set inside Google Earth, and can’t be changed.

Comments are currently closed; feel free to contact me with questions/issues.