blankblank blank


Archive for the 'KML' Category Page 5 of 16



Embed Voice Annotation In Google Earth Placemarks

Digital Geography suggests a neat way to quickly add voice annotation to Google Earth placemarks. Record your message at Vocaroo.com, and when you’re done, click on the “Post on the internet” link. You can then copy and paste the HTML code directly into the placemark Description section: right-click on the placemark, choose Properties, click on the Description if it isn’t showing, then directly paste the Vocaroo code there. When you click on the placemark, the pop-up balloon will display a Flash player for your audio message.

For more advanced annotation, it would probably be better to record and edit your message in MP3 format, upload it to a web location, then try one of the free embeddable Flash MP3 players described on this page. For example, for the Google Reader MP3 player, take the code:

<embed type=”application/x-shockwave-flash” src=”http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=MP3_FILE_URL” width=”400″ height=”27″ allowscriptaccess=”never” quality=”best” bgcolor=”#ffffff” wmode=”window” flashvars=”playerMode=embedded” />

Note: Don’t copy and paste the above code, as that doesn’t work – copy and paste it from the code box on this website. Replace the “MP3_FILE_URL” section with the full link to your uploaded MP3 file, and then copy and paste the code into your placemark’s description section (same as above). Clicking on the placemark will bring up the balloon showing the MP3 player:

12-1-2008-9.50.34 AM

Just click on the play button to hear the message.




KML Interactive Sampler

Want to learn KML by example, or see examples of the features you can display in Google Earth? The Google Geo APIs team has developed a KML Interactive Sampler page that uses the Google Earth Plugin to demonstrate various features, while simultaneously displaying the KML code used to create the feature:

KML interactive sampler

Always wondered what “tesselated”meant …

Modify the code in the text window and click on “Update Earth!”, and the displayed feature will be updated to reflect the new code. You can copy the text from the window, and then save it as a KML file locally on your computer.

Doesn’t support time yet, but neither does the Google Earth Plugin.




Export Microsoft Access Records To KML

Don’t have access to Access (ha ha), but stumbled across this and thought some might find it useful: a VBA macro for Microsoft Access that exports a table/query with latitude and longitude to Google Earth’s KML format. The original code has disappeared, but a page that offers explanations and augmentations to the original code can be found here.

Also tucked away in my bookmarks was this link to a Google Earth community post offering an XSL-based tool for exporting from Access to KML. The link to the downloadable file seems to be missing, but I snagged it at the time, and you can download it from this link.

As I said, haven’t tried any of these – use at your own risk/discretion.




Geocode A Google Docs Spreadsheet And Plot It In Google Maps/Earth With map a list

This is one of the neater online mapping applications I’ve seen in a while. Create a list of addresses and related information in a Google Docs spreadsheet, and map a list will geocode the addresses (convert the address to latitude/longitude), and plot the location and data in a Google Maps interface:

map a list example

You can also export the data as a KML file for use in Google Earth.

  • User-selectable icons
  • Also plots latitude/longitude locations
  • Includes data in other spreadsheet columns in the data bubble
  • Lets you embed images and hyperlinks as well
  • Data can be public or private
  • As you update the spreadsheet, the map data is updated as well (daily, or on demand)
  • Not a lot of documentation, but it’s fairly easy to use, and a healthy number of example spreadsheets will show you how it’s done (scroll through the list at the bottom, and click on the link to see the sample spreadsheet for each list item)
  • Completely free (though they’ll take donations, and offer premium consulting services for a fee)

Definitely worth bookmarking.




Graphical Front End For The ogr2ogr Vector File Converter

ogr2ogr is a simple command line utility that converts between supported vector file formats. For those who don’t like dealing with command line programs, and need only limited conversion capability, Inventis has written a simple Windows front-end for ogr2ogr called ogr2gui:

og2gui front end for ogr2ogr

Documentation is limited, so it’s not clear which input formats are fully supported. For example, input shapefiles work, but I had problems getting E00 files to convert (see this post for an E00 to shapefile conversion process that does work). Hopefully documentation will improve with time along with functionality (this is already the fourth release).

Output formats are limited to:

  • Shapefile
  • MapInfo
  • KML
  • GML
  • CSV

Converting shapefiles to Google Earth’s KML format works as long as the shapefile is in latitude/longitude format, WGS84; attribute table data added to the placemark pop-up for point shapefiles, but not lines or areas. There are better converters for shapefiles to KML conversion like shp2kml, but this is a good choice for converting other less-well-supported vector formats into the supported output formats..




Placemark Creator For Google Earth Updated

Placemarker, a custom placemark creator for Google Earth, was covered on this blog a few weeks ago. Valery Hronusov, one of its authors, writes to say that additional features have been added, and it’s pretty much complete. The new features include the options for linear gradient, crosshatch and custom backgrounds:

Placemarker 03.10.2008 13333

Color 03.10.2008 13437.bmp

Color 03.10.2008 13408.bmp




Displaying Datasets In The Google Earth Plugin With Earth Atlas

Bjorn Sandvik, creator of the Thematic Mapping Engine for generating thematic prism/choropleth/bar/proportional symbol KMZ files, has just announced the first version of his Earth Atlas, an augmented viewer for the Google Earth plugin (Windows only for now). A tile on the right lets you choose one of 6 internal thematic demographic datasets to display in the globe, or two external ones (icecover and recent earthquakes). But you also have the option to enter the URL for multiple external KML or KMZ file, and have them added to the display as well. Here’s an external KML file from the Google LatLong blog showing photo overlays of flooding in the Kosi River region in India:

Google Earth plugin display with Earth Atlas

Note: you may have to manually scroll to the area covered by an overlay to see it.

In his announcement, Bjorn says “…to be continued!”, and based on his improvements to the Thematic Mapping Engine since its original release, that probably means a lot more capabilities will be available soon.




Easy Ways To Get Latitude/Longitude For A Screen Point In Google Earth

In the lower left-hand corner of Google Earth, there’s a latitude/longitude readout that shows the position at the cursor position:

9-21-2008-9.02.12 PM

But if you want to record this position, the screen readout is graphical, so you can’t copy the numbers directly from Google Earth using a copy-and-paste operation; you have to write them out manually. One way around this is to create a placemark in Google Earth, and drag it to the desired location; the latitude and longitude will show up in the placemarks properties window, from which you can copy and paste them into a different app:

9-21-2008-9.06.51 PM

Another option is to use David Tryse’s Google Earth Position application. No installation, just run the program at the same time as Google Earth:

9-21-2008-9.15.26 PM

With Auto checked, it will update the position at the center of your Google Earth display continuously; unchecked, you’ll need to click the “GetPos” button to update the position. Clicking on the various “Copy” buttons copies position data into your clipboard for pasting into various programs:

Copy LatLong: 34.756012    -111.495048

Copy LookAt: 34.756012    -111.495048    0    812729.99    0.00    -9.43

Copy LatLong KML: <coordinates>-111.495048,34.756012,0</coordinates>

Copy LookAt KML: <LookAt>
<longitude>-111.495048</longitude>
<latitude>34.756012</latitude>
<altitude>0</altitude>
<range>812729.99</range>
<tilt>0.00</tilt>
<heading>-9.43</heading>
</LookAt>

With Auto unchecked, you can also enter a position into the Latitude and Longitude boxes at the top, and “FlyTo” that position in Google Earth. The numbered boxes at the bottom can save a current location (Shift-Click on the button), fly to a saved position (click on the button), or recall a saved position without flying to it (Alt-Click).

One big problem: there’s no center cursor or marker in Google Earth to indicate the center of the screen, so finding the position of a specific location might be difficultFixed in the latest version. But here’s a simple little KMZ file that puts a crosshair overlay at the center of the Google Earth screen, getting around this problem:

9-21-2008-9.24.55 PM

David’s website has several other apps worth a look. Google Earth Photo Tag lets you use Google Earth to embed location information into JPEG pictures (note: requires the Exiv2.exe command-line program in the same directory) . While I prefer Picasa for this task, GE Photo Tag does let you modify the balloon style for KML image files, which Picasa doesn’t. LatLong Conversion converts from degrees-minutes-seconds to decimal degrees and vice-versa, supporting more formats for the input data than other similar converters.