Sunday, 17 April 2016

Google Earth navigation offline

There is an excellent description of the technique of getting Google Earth images and importing them into a laptop so you can use them when out of range of the internet.

KAP files 
KAPs are a form of raster chart, so they're pictures of chart information, with geo‑reference info for the corners embedded so they can be accurately positioned.  The KAP file format was originally developed by MapTech, but it's now an open standard, so it's relatively easy to construct correctly formatted KAPs, and most navigation programs know how to display KAPs.  The object of the exercise here is to take screen‑shots of accurately positioned GE information and turn them into accurately geo‑referenced navigational KAPs.

GE2KAP Program
The GE2KAP program is the heart of this operation.  It drives GE to defined locations, waits for the images to download from the GE Servers, takes a screen‑shot, converts that screen‑shot to a navigational KAP file, puts in the geo‑referencing information, and then moves on to the next location to repeat the whole process.  In short, it does all the work of creating a series of slightly overlapping geo‑referenced KAPs.  GE2KAP is a program written in the Rexx programming language by Paul Higgins. Unfortunately it is only available for Windows machines, not Mac. Download GE2KAP here. 


The KAP files, however, can be run on Open CPN, which has a Mac version. Available here.

There are some problems running GE2KAP with different versions of GE. They can be handled by this. Fix_GE_API  

Use the password = phiggins to unlock the Zip file. Read the README.txt

Since GE Pro is now available free (previously $400 per year!) I use GE Pro.

Download it here. When challenged for ID and password, enter your Gmail email address and the password = GEPFREE.

The current version of GE Pro is

Terminate GE or GE Pro if it its running.

1. Open a command prompt in Administration mode. 

2. In the command prompt window change to the directory you unzipped, eg: cd C:\FIX_GE

3. Enter: FixIt   (then press enter)

4. If it works successfully start GE2KAP or the OpenCPN GE Plugin. The new version of GE will start and work.

5. If you started GE2KAP press the Help button and follow the instructions in the Configuring Google Earth section.

Installing the Programs:
To use GE2KAP, you'll need to download and install the following programs on your computer.  They're all free downloads off the web.  OpenCPN isn't strictly necessary, if you prefer using a different navigation program that reads KAPs.  GE2KAP can only be run on a Windows computer, but OpenCPN will work on many operating systems, including Android devices.  KAPs will work on any device if the application knows about KAPs.
OpenCPN: You can use your own nav‑program, or download and install the latest version of OpenCPN here.  It's under constant development, and new versions come out every year or so.  Make sure you select the correct version for your operating system.
You can also download several plugins for OpenCPN.  None of them are necessary, but take a look and download whatever you think you might want.  You will not need the Google Earth plugin, but you can download and install it if you want.  Plugins are installed by running the downloaded file, and then Enabling each plugin on the Plugins page of the Options toolbox (looks like a wrench on the OpenCPN toolbar).
GE2KAP: Download and install the latest version of GE2KAP from Paul's website.  This will also install the necessary ooRexx interpreter if it's not already installed.  Note that you should only install the 32‑bit version of the ooRexx interpreter, even if you're running a 64‑bit system.  GE2KAP will not run with the 64‑bit ooRexx interpreter.  If your computer has a fast solid‑state drive, installing GE2KAP and ooRexx on that SSD will dramatically improve GE2KAP performance.  An SSD is usually much faster at large file manipulations than a spinning disk.  We generally install both GE2KAP and ooRexx under a C:\GE2KAP folder, and not in the C:\Program Files (x86) folder.  This lets us put all of our routes and KAPs nearby as well.  If GE2KAP doesn't run correctly, run the Check.rex program (in the C:\GE2KAP\GE2KAP.Vxx.x.x.x folder) to check your installation.  A Changelog.txtfile in that same folder describes the most recent program modifications.
Google Earth: Do not install the latest version of Google Earth!  Google has disabled the GE programming interface in recent versions.  Both GE2KAP and the OpenCPN GE plugin require that programming interface.
  • If you already have GE v7.1.2 or earlier installed (in GE, check under Help, About...) then you should probably just keep it.
  • If you've installed a later version, Paul has some software that might re‑enable the programming interface.
    Unzip the download (the password is phiggins) and follow the README instructions after installing GE2KAP.
  • If you haven't installed GE before, you can download and install GE v7.1.2 from Paul's website.

The excellent GE2KAP Help, with screen shots
The excellent GE2KAP Help, with screen shots
Preparing Google Earth:
GE2KAP will have to start and stop GE several times, so make sure to uncheck Show Tips at Startup.  Since GE2KAP is taking screen‑shots of GE, GE should be maximized, with minimal extra display clutter (which will show up on your charts).  You can start GE2KAP, click the Help button, and go to Configuring Google Earth to see these steps in more detail.  The GE2KAP help system is very good, with ample screen shots.  It's well worth reading through it, especially if you don't understand something.
  • Under View, turn on the Sidebar and then turn off most items (we only leave Borders and Labels turned on).
  • Under View, make sure that everything is unchecked (Toolbar, Sidebar, etc) except the Status Bar.  GE2KAP needs the status bar to see when the image has finished downloading from the Google servers, and will turn it on if it's off, but it will cut the status bar off when it makes the KAPs.
  • Also under View, set Show Navigation to Never.
  • Under ToolsOptions, on the 3D View tab, set the Elevation Exaggeration to as small as possible (.01).
  • On the Navigation tab make sure Do not automatically tilt while zooming is selected.
  • Google changes GE now and then, so you should probably check the rest of the Options to make sure they're set reasonably.
Important: Then go to your Control PanelPower Options and make sure your screen never blanks or goes dim, and your computer never automatically goes into hibernate or sleep, even if left unattended for extended periods.  Turn off all power saving options while you're making KAPs or the screen‑shots could suffer.  You can re‑enable your power saving options after you finish making your KAPs.
All 3 panes of GE2KAP. Cursor shows route-file location. Click for full size.
All 3 panes of GE2KAP. Cursor shows route-file location. Click for full size.
Preparing GE2KAP:
The most reliable way to start GE2KAP is to open a Windows Explorer window, navigate to where you installed GE2KAP, and double click the GE2KAP.rex file.  Creating a shortcut to this file doesn't always work.  Starting GE2KAP will start a Command (DOS) window for the ooRexx interpreter.  This sometimes displays error messages, but otherwise can be ignored.  GE2KAP will start GE and verify that it can control it, which sometimes takes a few moments.  Once GE2KAP is running:
  • Click on the right edge (twice) to show all 3 of GE2KAPs panes.
  • In the rightmost pane, click the Typing Test button.  This lets GE2KAP verify how fast it can drive GE (how much delay GE needs between instructions).  You should only ever need to do this once.
  • In the middle pane, up at the top, click the [<<] button to the right of the Polygon Path: box and select where your Route files are stored.  This can be changed later.
  • In the left pane, click the [>>] button to the right of the Chart Location\Name: box and select where you'd like the KAPs put.
  • Check the rest of the settings, maybe look through the Help, and shut GE2KAP down ([X] in the upper right corner).  This should also close the ooRexx Command window.
Once you have started GE2KAP and shut it down for the first time, it will create a GE2KAP.Options.txt file.  These steps are completely optional, but if you edit this file in Notepad, you can:
  • Change AUTORESTART to 0 (zero).  GE will slow down if its programming interface is used too much.  GE2KAP detects this slowdown, which usually comes about every 60 KAPs, and will restart GE to speed it up again.  The default is to wait 30 seconds before restarting GE, but changing AutoRestart to zero will restart GE immediately.
  • Change CROPAMT to about 103.  GE2KAP uses CropAmount to cut off the Status Bar at the bottom of GE, so it doesn't clutter up each KAP.  If you want to see what elevation the KAPs were made at, you can set CropAmt to 0 (zero).  Or, if you want your KAPs to be pure satellite imagery, without even the copyright data or the Google earth logo, then set CropAmt to about 103.  This setting is somewhat screen dependent, and is what we use on our 1920x1080 pixel screens, so you might have to experiment a bit if your screen is very different.

No comments:

Post a Comment