Posted Thu, 01 Jan 2015 06:00:00 GMT by Portal Admin

Q. Is there a way to easily geocode (assign geographic coordinates to) a list of devices contained in a spreadsheet? I want to import the devices into InterMapper with associated latitude/longitude values.

A. The BatchGeo website provides a batch geocoding facility (http://batchgeo.com) that will take a spreadsheet of address information and add columns for latitude and longitude. Here is a recipe for using it with InterMapper:

  1. Export the devices from a map to a tab-delimited file. To do this, use File -> Export -> Map data... Choose the following fields:

    - Map Name
    - Id
    - Comment
    - Latitude
    - Longitude

Note that the latitude and longitude fields of this file will be empty.  

  1. Edit the resulting text file to place the address information in the Comment field. This is a free-form address, so you can enter a full street address, or just "City, State" or "State" or even a country name. Address information must be on a single line.
     
  2. The batch geocoder needs to know which column of data contains the address. Add a new line after the #format line like this:
     
    Code:
    Map<tab>Id<tab>Address


    See the Sample Data File at the end of this note.
     
  3. Copy everything after the #format line (including the header line just added), and paste it into Step #2 of the form on the http://batchgeocode.com site.
     
  4. Click Validate Source: this checks that your entered data has the right format.
     
  5. If it's OK, click Run Geocoder. This outputs the same data, with latitudes and longitudes appended to each line.
     
  6. Paste the geocoded information back into the text file, then import it into InterMapper. InterMapper will match up the data and place the icons in the proper X-Y location



Sample Data File

The following data shows the exported tab-delimited file, after inserting the header line. Copy all but the #format line and paste them into the Batch Geocoder:

 

Code:

#format=tab table=devices fields=MapName   ,Id   ,Comment ,Latitude   ,Longitude
Map               Id              Address
European Cities   g47a32998-r19   London, UK
European Cities   g47a32998-r21   Paris, France
European Cities   g47a32998-r23   Madrid, Spain
European Cities   g47a32998-r25   Moscow, Russia
European Cities   g47a32998-r22   Rome, Italy
European Cities   g47a32998-r26   Prague, Czech Republic
European Cities   g47a32998-r24   Berlin, Germany
European Cities   g47a32998-r20   Stockholm, Sweden

Note that the latitude and longitude fields of this file will be empty.
 

You must be signed in to post in this forum.