blankblank blank


Archive for the 'KML' Category

KML Text Labels For Google Earth

While labeling items in Google Earth, you’re able to modify the font color, size and opacity. But one curious omission is the inability to change the font; you’re stuck with the Google Earth standard:

6-8-2008-4.29.11 PM

The font also stays the same size regardless of how far away you are from the labeled area, which can be useful sometimes. But if you have a lot of labels, this can result in lots of labels overlapping, and cluttering up the image. Label text is also all on one line, which can lead to long labels if you want to include lots of text.

Continue reading ‘KML Text Labels For Google Earth’



An Online KML Validator

A previous post linked to a video on how to add in-line KML validation to the Java-based text editor jEdit. There’s now another KML validation option for those who use their own editor to create KML files. Galdos Systems has created a free online KML validator; just submit a link to an online KML or KMZ file or upload the file from your computer (note: for online files, upper/lowercase matters!). You’ll get back a report page with:

  • The number of errors found, recommendations and suggestions
  • The specific errors found, referenced by line number in the original file
  • A listing of the original KML/KMZ file with line numbers, so you can cross-reference the error specified with the line number

An error doesn’t necessarily mean a fatal error; my test file had three errors, mainly related to spec changes in KML, but works fine in Google Earth. Still, even with a working file, it’s useful to see where it doesn’t conform to specs, and for a non-working file it can help you track down the error.

Via the Google Earth Blog.



Simple Geotagged Photo KML File Creator For PC/Mac

PhotoKML is a small (<300K download) Java application (PC and Mac) that takes a folder full of geotagged photos, and creates a KML file with points linked to moderate-sized thumbnails of those photos. Interface is simple; select a folder containing georeferenced photos, and a folder where you want to save the KMZ file:

5-17-2008-4.24.25 PM

Make sure the “Yes” button is selected at the top. While the program says it’s able to georeference photos using a GPS file, the only format it accepts is the “.trk” format. If you have your track in a more standard format like GPX, good luck finding a program that can convert it to the “trk” format (I couldn’t even get GPSBabel to work). If you want the point icons in Google Earth to be mini-versions of the pictures instead of pushpins, check the box at the bottom.

Click “Generate KML”, and you’ll have your KMZ file in a few seconds; you’ll have to open it manually in Google Earth:

5-17-2008-4.32.24 PM

Nothing fancy, but PhotoKML does the job quickly and easily.



Converting Shapefiles To KML With The gSpatial Toolbar (In Theory)

The gSpatial Toolbar is supposedly another free option for converting shapefiles to KML format. I say supposedly because I’ve been unable to get it to work - I keep getting an ODBC driver manager error every time I try to do a conversion. I suspect you need to have Microsoft Office installed for this to work correctly; I’ve had the same error message pop up on three different computers, none with MS Office installed. But it certainly works on some computers, so you may have better luck - if so, let me know. It also requires a free registration code, which was a pain to get.

From what little I was able to see, the free version has limitations - no attribute-based KML features, and no ability to select a sub-region. Since I couldn’t get it to work, I can’t fully compare the gSpatial Toolbar to another free converter like shp2kml, but the latter definitely does work, and work well.

ht to Tim Beerman, author of the excellent (albeit not free) shapefile to KML converter, Shape2Earth.



Thematic Mapping In Google Earth

On his excellent Thematic Mapping blog (now part of my blog roll), Bjorn Sandvik has been running a series on thematic mapping techniques in Google Earth. Examples have included choropleth maps, bar charts, prism charts, Collada objects, map legends, including examples of animated time series. If you’re into the techy part of this stuff, the series is well worth a look for the ideas you’ll get from it, and the downloadable example files. But for non-techy types, the prospect of learning how to do this might have been a bit intimidating. Heck, I find it intimidating, and I know at least a litlle about this stuff.

But Bjorn has taken his examples to the next level, by creating an online tool that can convert datasets to thematic Google Earth maps on the fly, the Thematic Mapping Engine:

Thematic Mapping Engine

Only Prism maps are supported in this initial release, with other types (Choropleth, Proportional Symbol and Chart) coming in the future. You’re also currently limited in the datasets to 15 worldwide datasets from the UN, but the ability to import your own data is also coming. You can select data for one year, for a time series, or create a time map with a slider that lets you view the chart in animated format as the years roll by. The “colour” scale sets the endpoint colors for the chart, and these colors will be used to generate a legend for the chart. Click on Make KML, and you can download the KMZ file to your computer / open it in Google Earth directly:

globe

In Google Earth, use the slider at the upper right to change the data year, or click on the play button to see it animated.

I did find one minor quirk, but it’s likely a Google Earth bug. On my system, the first time I load one of these Thematic Mapping Engine KMZ files into Google Earth, I often see something like this:

dark

By turning the “sun” on (the View => Sun menu), and then turning the sun back off again, I get the correct view (i.e. the first picture). Resizing the Google Earth view can also create this effect, but the solution is the same.



Converting 3D Objects Into Google Earth Format

OgleEarth posts on SOLA G2, a free program (PC/Mac; free for non-commercial uses) for converting 3D objections in a number of standard formats into Google Earth KML files:

  • Autodesk *.FBX (2006.11)
  • 3D Studio *.3DS
  • Wavefront *.OBJ
  • Autodesk *.DXF
  • Collada *.DAE
  • Should also work with objects created with the free open source 3D program Blender, as long as you export them in a compatible format.

Select a filetype, choose the location, units and orientation, and SOLA G2 supposedly does the rest. I say supposedly only because I don’t have any files to test it out with; feel free to post your results in the comments below. You can also download the legacy version 1.0 of SOLA in case you have problems getting good results with version 2.0.



New GeoPDF Features

I’ve covered the free GeoPDF plugin for Adobe Acrobat and Reader before, but the latest version adds a lot of new features:

  • Create a point on the map, then open and view the corresponding point on Google Maps
  • A lot more coordinate systems supported, including MGRS, Lambert Conformal Conic, Mercator, etc.
  • Import and display shapefiles, re-projecting them on-the-fly
  • Import Google Earth KML/KMZ data; also CSV and GPX files
  • Annotate points with “sticky notes”, or with a GeoStamp symbol in various categories (incidents, infrastructure, operations)
  • Draw rectangles, polylines and polygons, and annotate them
  • Export annotated and imported data in shapefile format (automatically split into points, lines (arcs) and polygons)
  • Export annotated and imported data in KML format for use in Google Earth (another way to convert shapefiles to KML format)

One capability that’s still missing is the ability to export the view in georeferenced raster format, like GeoTiff; hope that’s coming soon.

The TerraGo Technologies tutorials page has a video tutorial on GeoPDF, and brief written tutorial with sample data for you to play around with. You can also download free USGS topo maps in GeoPDF format from the USGS Store’s Map Locater and Downloader. While these are still mostly in raster format, the next generation of USGS topo maps will come in vector GeoPDF format, letting you select from up to 37 different data layers.

Via Directions Magazine.



Using Google Earth Ground Overlays To Display Shapefile Data

The best way to display shapefile data in Google Earth is to convert it directly into vector KML format, and I’ve covered several ways to do that for free or cheaply, including stand-alone programs and online converters. Of all these options, I prefer using either shp2kml or Shape2Earth because of the flexibility they offer in setting display attributes like color and shape. But there’s another option: convert shapefile data into a raster image, and then display it in Google Earth as a ground overlay. This has a few advantages over vector KML format:

Continue reading ‘Using Google Earth Ground Overlays To Display Shapefile Data’