jlosgar
Joined: 18 Jul 2007 Posts: 347
|
Posted: Wed Jan 16, 2008 9:24 am Post subject: Batch geocoding devices for importing into InterMapper. |
|
|
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. There is a Batch Geocoding website (http://batchgeocode.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:
- 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.
- 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.
- 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.
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.
Click Validate Source: this checks that your entered data has the right format.
If it's OK, click Run Geocoder. This outputs the same data, with latitudes and longitudes appended to each line.
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
|
|
|