Import UTM coordinates from Excel to Google Earth

Data Format Requirements for Importing Data to GeoMapApp

Data Tables

The first row in each file must contain text column headings. The column headings can be whatever you want, but the terms 'latitude' and 'longitude' will be automatically recognised. In the Config dialog box, you will be asked to confirm the correct latitude and longitude columns by selecting the headings used in your data table. Location must be expressed in decimal degrees, with negative values for southern and western hemispheres. Do not use N,E,S,W letters. The file may include a column which specifies the comma-separated RGB color code for each data record.

Data may be imported from local files or from remote URLs. The accepted formats are:

Microsoft Excel tables:

  1. Simple embedded formulas in cells such as addition, subtraction, multiplication and division only. For spreadsheets containing more complicated formulas, we strongly recommend that you save the spreadsheet as a comma- or tab-separated text file and import that.
  2. No special formatting - it may not be properly translated.
  3. If you are assigning a color to each table entry by including a column of Red,Green,Blue values in your table, you must be sure the R,G,B column is formatted "text". If it is formatted "number" the value "255,255,255" will be interpreted as 255255255 and will not work correctly.
  4. All decimal places are shown by GeoMapApp, even if hiddden in Excel.
  5. No size limit.

Ascii (text) tables:

  1. One row per line of ascii text.
  2. Columns may be tab-, comma- or pipe-separated.
  3. Select tab-separated, comma-separated or pipe-separated from the pull-down box in the upper-right part of the "Imported Data Tables" window.

A table copied from a spreadsheet can be directly pasted into the text box window and manipulated provided it has columns of latitude and longitude.

Data can also be typed directly into the text box window. Data in the text box window can be edited.

Shapefiles

Shapefiles can be imported from your local disk or by specifying a URL. Shapefiles must be in geographic coordinates (Latitude and Longitude). Shapefile import in UTM coordinates has not yet been implemented. When importing a shapefile, select the *.shp file name but ensure that the *.dbf and *.shx components exist in the same directory. So, for example, to import a shapefile called "worlds.shp" the associated files "worlds.dbf" and "worlds.shx" must be located in the same directory as "worlds.shp".

Similarly, if importing a shape file using the URL option, only the *.shp file needs to be specified but all three files must reside at the URL.

Image Overlay Files

Images may be imported from local files. The accepted file formats are:

  1. *.jpg, *.tiff and *.png files. You will be prompted for geographic bounding coordinates.
  2. *.kmz and *.kml files, as from Google Earth. Only simple, uncomplicated files are supported.

Grid Files

Grids may be imported from local file systems (see note about disk location, below). The accepted grid file formats are:

  1. GMT3 legacy .cf (.grd) format and GMT4 default .nf (.grd) grids.
  2. ESRI ASCII (*.asc)
  3. ESRI Binary (*.hdr / *.flt)
  4. GRD98 (*.G98, Big-Endian format only)
  5. ASCII Polar (*.asc)

Choosing a Disk Location for your Grid Files

The grid import process creates a number of tiling directories and related files that are used for internal purposes. To avoid having these internal files and folders scattered about on your computer we strongly recommend that, before importing a grid, you place it a new folder. The tiling folders will be created in that same space. When importing several grids at the same time, place all of the grids in one folder. When importing individual grids one at a time, place each in its own folder otherwise the tiling directories will be overwritten each time.  

Grids - Out of Memory Problem

There may be limitations on the maximum grid size that can be imported depending upon the memory allocation of your computer. If an out-of-memory error occurs or if the import process seems to hang, it is likely that more memory has to be allocated. For that, the .jar version of GeoMapApp needs to be run from the command line. Linux/Unix installations are already .jar files. Mac and Windows users need simply go the GeoMapApp download page and select the Linux/Unix download - the GeoMapApp.jar file will be downloaded. Once the .jar file is available, open a terminal command window, as follows. For Windows 7 users, go to the Start menu, type "cmd" in the search box and select the "cmd" program from the list. For Windows XP users, go to the Start menu, select "Run" and in the Run window type "cmd". For Mac users, go to Finder > Applications > Utilities > Terminal. In the terminal command window, change directory to the location of the GeoMapApp.jar file (if it was downloaded to your Desktop, simply type "cd Desktop"). Then, type "java -jar -Xmx512m GeoMapApp.jar" and press enter. The -Xmx option specifies the maximum memory that can be used by the program being run. If that still is not enough memory, try using the -Xmx1024m option. By using this memory allocation approach, grids up to 800 MBytes in size have been successfully imported to GeoMapApp.

I have a spreadsheet with three columns containing a Description, a Northing and an Easting in UTM. Instead of entering the points in by hand, I want to find a faster method.

1



One of the features offered by Google Earth Plus is the ability to import data in spreadsheet format, specifically the CSV format: Comma-Separated Values a simple text format where data values are separated by commas, and each set of data is in a different line. But Google Earth Plus has a limit of 100 points for data import. When you consider that there are free options that will convert spreadsheet data into Google Earth’s KML format without this size limitation, then it’s not all that much of a “Plus”.

There are two different kinds of data that can be imported into Google Earth:

1. Data with geographic positions already determined. The data needs to be in latitude and longitude position in the WGS84 datum, Google Earth’s native coordinate system. I’ll be talking about coordinate converters at length in an upcoming series, but if your spreadsheet position data is in a different datum, CorpsCon is capable of reading it in and converting it to NAD83 in the US, which is almost identical to WGS84 (for worldwide conversions, try GeoTrans). Don’t know which datum your data is in, or is all this talk of datums going over your head? Don’t worry too much about it – plot the data, and see if the plotted positions are reasonably close to the features in Google Earth, within GE’s limits of error. If they are, and they probably will be, then your data is most likely in WGS84. Don’t forget that in Google Earth, positions have to be entered in decimal format, e.g. 30.5 degrees, not 30 degrees 30 minutes.

2. Data with street addresses. The Google Earth Plus spreadsheet import can convert these into geographical coordinates, a process known as “geocoding”, but there are some free options for this to be covered in a follow-up post.

Starting off with importing spreadsheets that already have geographic coordinates in them:

csv2kml (freeware; Windows only)

Note: I’ve received a report that the last version of this program doesn’t work correctly; if you have this problem, I’ve uploaded an older version here.

There are at least two other programs with this name, but this is the one to have. Converts all the data in .csv text format into a KML file. The file name needs to have .csv as the suffi; to confuse things, some programs want CSV files to have a .txt suffix, and you’ll have to rename the file extension with those. The first line of the .csv file should be the names of the data fields, separated by commas, then every successive line should have a set of data in an order that corresponds to the order of data fields in the first line. Here’s a screenshot:

Import UTM coordinates from Excel to Google Earth

You specify the data fields that correspond to latitude and longitude, elevations if it has that data in meters (otherwise it pins the point to the ground, which you can also require by using the checkbox), and the name you want the point to have when displayed in Google Earth. Latitude should be positive for north, negative for south; longitude is negative for West, positive for East. Checking a data field name under “Description” will include that data in the info that pops up when you click on a point. “Linestring” creates a path, while “Individual points” creates …. individual points.

Most spreadsheet programs will allow you to open, edit and save data in .csv format. Looking for an editor designed specifically to work with files in CSV format? Try CSVed or CommaWorks.

Excel2GoogleEarth (free)

If you have a copy of Microsoft Excel, you can use this free spreadsheet macro; it uses VBA, so macros have to be enabled, and OpenOffice won’t work. The biggest advantage of this spreadsheet is that if your data is in UTM coordinates, it can automatically be converted into the required latitude and longitude in the KML file. Open up the spreadsheet, click on the button that says “Create KML File”, and a window will open up. The first order of business is to select the column order in which the data appears in the spreadsheet. Click on the columns order arrow, and you’ll get a dropdown box showing you the only possible combinations of data columns:

Import UTM coordinates from Excel to Google Earth

And that’s the biggest limitation for Excel2GoogleEarth – the only sets of data that can be converted to KML are ones that conform to these sets of data columns. Got more data than can be fit into the maximum number and types of data columns available? Tough. Note also that “Easting” comes first in all of these; for geographic coordinates, this means that the longitude column should come first, before the latitude (“Northing”) column.

To select the data you want to convert into KML, first click on one of the Sheet tabs at the bottom, and then enter or copy the data into the spreadsheet, with the data in the order specified by the Columns Order dropdown selection. Then click on the horizontal bar at the right of the Data box:

Import UTM coordinates from Excel to Google Earth

A small window will appear, with the misleading title “Create A Google Earth File?”. What you actually do is go to the sheet with your data, select the spreadsheet cells you want to convert, then click on the button at the right in that small window. As in the window above, you will see the selected data cell description now in the Data box. Other options allow you to set the default symbol for display (though you can also set this with one of the data columns), use the Altitude to plot the data relative to the ground, include Description data in the data pane for the point in Google Earth, etc..

If you’re wedded to Excel, have to convert from UTM coordinates, or you need to specify different symbol types for every point, Excel2GoogleEarth might be a good choice. Otherwise, you’re probably better off using csv2kml.

GPS Visualizer (website; donations accepted)

The GPS Visualizer website can also accept text data, either in CSV or tab-delimited format, and convert it to a KML file. Be sure to read the tutorial on how to create and format text files for waypoints; a similar tutorial for tracks is “coming soon”.

Coming soon here: converting spreadsheet data in street address form to KML, aka “geocoding”.