Creating Links to PDF's of boring logs in Google Earth

This is a copy of a post from the old gINT forum so some of the information may be a bit dated but most should still be applicable. It is relevant to some of the current discussions in the forum.

Just wanted to relate some of my experiences in setting up place marks for test borings in Google Earth that contain a hyperlink to a PDF of the boring log stored on a local server.  This can then be used as a convenient boring log retrieval system.  All the boring locations are displayed in google earth as a place mark. When the place mark is clicked in google earth the pop up balloon displays a link to the bring log.  Clicking on this link displays the boring log in acrobat reader.

First, a note on google earth versions

  • Version 4.2 allows access to local files and works fine
  • Version 4.3 does not allow access to local files at all (in the name of security)
  • Version 5.0 allows limited access to local files, but not by default.

Thus to make this work, you need to do the following:

  • Upgrade to Goggle earth 5.0 if you have an earlier version
  • Start Google earth and Under Tools, Options, General tab, make sure the following are checked:
  • Display box - "Show web results in external browser"
  • Placemark balloons box - "Allow placemark balloons to access local files and personal data"
  • click Ok and exit google earth

1. To create the pdf files of the boring logs, use the create pdf button in the output tab of gINT but select the option to create individual files from each data set.  Use the default file name expression as <<Point.PointID>> and check the option to replace spaces with underscores (more on this later).

2. You will need to create a field in your points table that contains the description for the kml file.  This field needs to contain the following text:

<a href=”[pdf file name]”>Link to Typed Boring Log</a>

Where [pdf file name] is the actual name of the pdf file created of the boring log.  This is a simple html hyperlink anchor.  You can get fancier if you want.  There are several ways to create this field.  The simplest way I have found is to copy all the Point ID’s from gINT to excel (or export them), write a formula in excel to build the text string, and paste the resulting text strings back into gINT. If you have pasted the boring names in column A of excel, the following formula in column B will create the required text string.

=”<a href=”””&A1&”.pdf””>Link to Typed Boring Log</a>”

The triple and double quotes are required to create a single quote within the quoted text string.  If the boring names contain spaces, you will have to first search and replace the spaces with underscores.  This is required because google earth’s parser does not seem to recognize spaces in file names properly. (remember that we already created the pdf files with spaces replaced by underscores)

This could also be done using a simple gINT rule.

NOTE: If you are creating PDF's from multiple projects to be combined into a single kml file you will need to add a unique project identifier to the PDF file name and the link created above must be modified to include this unique project identifier.  This is required beacause the method described requires all PDF files to be placed in the same directory and if two projects have a boring with the same name (for example "TB-1.pdf") there will be a conflict.

3. Now configure the goggle earth setup in gINT to use the created field as the icon description under the Icon and description tab.  Configure any other options you need or want as well.

4. Create a kml file by selecting view borings in google earth.

5. Place the created kml file in the same directory as the pdf files of the boring logs.  This can be a local directory or a directory on a LAN server.  The kml file must reside in the same directory as the pdf’s to avoid file path issues in the links (note the link created above does not contain any path information).

6. Finally create a shortcut on your desktop to the kml file

Clicking on this shortcut should launch Goggle Earth with the borings displayed and the links in the pop up balloons working.  Clicking on a boring will display the pop up balloon that contains the Hyperlink text “Link to Typed Boring Log” (see picture below). Clicking on the “Link to Typed Boring Log” text in the pop up balloon will launch your browser with the pdf file.  Your browser will then display the pdf file using acrobat reader.