Thursday, November 20, 2008

Geocoding addresses and loading them into your GPS

What does "geocode" mean and now is it going to help me? Geocoding is the process of converting an address (like 123 1st St) into a set of coordinates (expressed in Latitude and Longitude). I suppose that's not really correct, though. There is no "conversion" going on. Goecoding really finds a set of coordinates for a given address. In my testing I found it to be fairly accurate - at least close enough for me to get where I need to go.

How it will help you depends on what you're trying to accomplish. In my case, I work with the youth group at my church. Sometimes I provide rides to or from various activities and have to pick them up or take them home. I know these kids and their families very well, but that doesn't mean that I know how to get to all of their homes. I also don't know their addresses off the top of my head so just typing their address into the GPS isn't always an option, either.

So with the problem in mind I set out to find a solution. This article describes what I found.

As I thought about the problem I came up with a basic set of steps that I thought I would need to do.

1. Get the address data I needed
2. Format the data into proper format - whatever that meant
3. Geocode the addresses
4. Create a GPX file to load into the GPS.

Seemed pretty simple, I guess. At first I thought it would be fun to break out the coding skills and write something that did this for me. However, after a few hours with Google, testing a few things, and throwing some things away, I put my coding skills back on the shelf and came up with a fairly straight forward process for "Geocoding addresses and loading them into your GPS."

I tested the process with the Garmin line of GPS's. I tried it with a Garmin Nuvi 660, eTrex Vista HCx, GPSMap 76 CSX, and other eTrex units. I didn't have access to other brands to test but assuming they can deal with GPX files this should work just fine.

Once you've created the GPX file you can either load it onto your GPS as waypoints or you could even load it as points of interest. Points of interest act differently than waypoints so feel free to experiment with it until you get a format that you like. For this article I'm going to load the data as waypoints.

You should also take into account how may waypoints and/or points of interest your GPS can handle. In the Garmin line there are some that can handle 500 waypoints while others can have 1000 or more. Just make sure you consider how many you have and how many you're going to try and load.


1. Get your list of addresses - electronically of course unless you like typing.

2. Format the list into columns with the following structure (Excel works well). Make sure the first line is a column heading. You can use the example below to get it started.

Address City State Zipcode Name Description Symbol

Address = The street address of the person. "2400 Pennsylvania Ave"
City = The city. Try and be specific. "Coon Rapids"
State = The 2 letter abbreviation for the state: "MN"
Zipcode = The 5 digit US zip code "55432"
Name = The name of the waypoint you want in your GPS. I like the families last name for this. Keep in mind your GPS limitations on the length of a waypoint name. You'll also want to make each name is unique. Think about this one - don't just jump in with any old name.
Description = This will show up in the waypoint "comments" in the GPS. Keep in mind the max length your GPS will take. It will usually truncate it for you but you never know.
Symbol = The name of the icon you want to use in your GPS.

Here's an example of what it might look like (the lines may wrap)

Address,City,State,Zipcode,Name,Description,Symbol
123 1st St,Landen,MN,82520,Macfarlane,123 1st St 952-555-1212,Residence

You can see that I also decided to add the phone number to the Description field. That way I'll have their address and phone number in the GPS if I ever need it. Be creative and try various things with the name and description. You can't break it and anything you add can always be removed if you don't like it.

Here's a hint while you're testing... In the example above I used "Residence" as the Symbol (GPS Icon). The Garmin line of GPS units allow you to delete waypoints by symbol. So, if you use a unique symbol, say something like "Diver Down Flag 2" you can easily delete all the waypoints you just added by removing only the "Diver Down Flag 2" symbol. This will allow you load and delete the data as many times as you want without harming any of the existing data on your device.

Same logic should be applied to Points of Interest. Make sure you use a separate POI file just for these addresses. That way you can easily reload your other POI files if needed. I'm not going to go into details about POI files for the Garmin units but you can find ton's of information by Google'ing "Garmin POI"

3. Assuming you used Excel in step 2, save the file as a CSV file. If you didn't use Excel and just used a text editor, that's fine, too.

4. Open the CSV file in a text editor (wordpad or notepad) - NOT Excel!

5. Highlight all of the text. Press CTRL-A for a quick way to highlight all.

6. Press CTRL-C to copy it to the clipboard. You can also choose File | Copy from the menu on most text editors.

7. Open a web browser and go to the following URL http://www.gpsvisualizer.com/geocoder/
This web site is going to do the rest of the work for you. You can read all about what it's doing by visiting the web site.

8. Click in the white box labeled "Input" part way down the page.

9. Press CTRL-P to paste the address you created earlier into the "Input" box. You should see all of your address in the box. If nothing showed up, go back to step 4 and try again.

10. In the "Type of data:" dropdown box, select "Tabular (columns & a header row)"

11. Press the green "Start Geocoding" button to the right.
It will read the addresses in the "Input" box, lookup the latitude and longitude of the address, then create a set of formatted data in the "Results" box located below the input box.

12. If you want to keep the latitude and longitude data around for some reason you can copy can paste it into a new text file. I don't save this data. It can always be obtained again if needed.

13. Just to the right of the "Results" box is a button labeled "Create a GPX file" Press the button to create a GPX with all of your address in it.

14. Once the "Create a GPX file" button is pressed, it will create the GPX and open a new web (depending on the number of address you converting it may take a little longer). At the top of the page you can download the GPX file. In the middle you'll find the contents of the GPX that you can cut and past if you wish. Save the GPX file to your computer.

----- Note: From here you should check with your GPS documentation to see how to load data from a GPX file. The following steps will describe one way to load waypoints to a Garmin GPS by using the Garmin Mapsource software.

15. Start Mapsource and open the GPX file you saved.
You should be able to see all the waypoints for the addresses you used on the web site. You should also see the correct symbol/icon you used (eg "Diver Down Flag 2")

16. To send them to your GPS as waypints:
a: Connect your GPS to your computer and turn on the GPS
b: Select "Transfer | Send to Device" from the Mapsource menu.
c: Select Waypoints under the What to Send section.
d: Press the Send button to send the data to your device.

That's it. You now have all your friends loaded as waypoints on your GPS. Assuming your GPS has turn-by-turn navigation, you can now easily navigate to a an address by searching for the waypoint.

Questions and comments are always welcomed!

Note: I am not affiliated with GPSVisualizer in any way. They control the web site and may change it. In order to support the development of free tools like GSPVisualizer, feel free to contribute to them by using the links on their web page.

6 comments:

Anonymous said...

You can skip steps 3 through 5: just copy (Ctrl-C) the data directly from Excel to GPS Visualizer's form.

Sokratz said...

Adam is correct. I added steps 3-5 to remove any cut and paste issues. Excel is often persnickety with cut and paste. But if you're familiar with Excel, do the direct cut and paste as Adam suggests for a short process.

Sokratz said...

I've used this process many times and finally decided to load the data as Points of Interest instead of Waypoints. For the Nuvi line, the data is formatted much better as POI's. For the eTrex units, POI's don't take up precious waypoint space (I need all the waypoints I have for Geocaches!).

I loaded 144 families with names, address, and phone numbers. I've used it many times over the holidays!

Devin Guy 13 said...

here is a web sit that does this for you. input the address in to the center map around on the right hand side. http://www.satsig.net/maps/lat-long-finder.htm

Anonymous said...

Thanks for this post. I have been typing this stuff into my GPS by hand!

PS great ministry with the youth.

Thanks<><
Barry

Anonymous said...

Hello! If you ever need a reliable online tool for converting gpx to kml format or the reverse, I suggest to check out this one: http://gpx2kml.com/ It might help.