How to Geocode Addresses with MapViewer 7

MapViewer 7 has the ability to geocode addresses. Geocoding is the process of assigning X and Y coordinates to known street addresses. This feature can be used to find the exact location of addresses and then used to mark these locations on a map. There are many reasons for mapping the location of addresses such as representing or finding distances between addresses, showing directions from one address to another, and determining the best place for meetings or new buildings.

In order to geocode addresses you are need three things; a list of the addresses you want to geocode in a data file, the US-Streets file for which ever state you are geocoding in, and the USRoads file. Both the USRoads and US_Streets files are on the MapViewer 7 disk and on our web site at http://www.goldensoftware.com/boundary.shtml. If you download the files from our web site you will need to unzip them with unzipping software.

The first thing you need to do before opening MapViewer is to create a data file with the addresses you want to geocode. If you use an Excel file be sure to save it as a [.XLS] file, Excel 97-2003 Workbook, because the newer Excel format [.XLSX] will not work with MapViewer 7. The data file can be set up in two ways to work with MapViewer. One way to set up the file is to have five columns with the name of the address in the first column (this can be the name of a building, the name of the person living in a building, or a letter representing an address), the actual address in the second column (street address), the city in the third column, the state in the fourth column, and the zip code in the fifth column. The other option for setting up your Excel file is to have two columns with the name of the address in the first column and the address (street address, city, state, and zip code) in the second column. You don’t have to have a column with the name of the address, but it makes it easier to separate the different addresses and it allows you to add the name as a label in the map later.

The second thing you need to do before opening MapViewer is to place the US_Streets file, for the selected state, and the USRoads file in one folder. This folder can also contain your Excel file, but this is not necessary. The reason for putting these files in one folder is because MapViewer will use the address information from this folder to determine the exact location of the addresses you are geocoding.

Sample Map using the Geocoding Command

One use for geocoding is determining the precise location of addresses. A great example of this is geocoding ski areas to determine which ones are closest to your home in order to determine which type of ski pass to buy. By goecoding the ski areas’ addresses it is simple to see on a map where the ski areas are in relation to your home or main highways. In the example below you will see how to geocode Colorado ski areas based on their addresses in order to mark them on a map of Colorado with the major roads and highways.

  1. Download the CO.exe file from http://www.goldensoftware.com/public/boundary_mv7/US_Streets and the US Roads.zip file from http://www.goldensoftware.com/public/boundary_mv7/USRoads.
  2. Unzip and save both of these files in a folder on your desktop.
  3. Create an Excel [.XLS] file with the ski areas’ names in Column A, street addresses in Column B, Cities in Column C, State in Column D, and Zip code in Column E.

    Address data file
    Image of the ski area Excel file set up with the addresses separated.

  4. Open MapViewer, click Tools | Geocode and when the MapViewer dialog pops up asking Would you like to load a data file now onto layer Layer 1? click "Yes."
  5. Load the Excel file which will open the Assign Latitude/Longitude Coordinates dialog.
    (All steps below are done in the Assign Latitude/Longitude Coordinates dialog)
    1. In the Specify the folder path containing all [.STR] subfolder and files: open the folder that was just created for the streets and roads on your desktop.
    2. Check the box City, state and Zip code are in separate columns.
    3. Change the Address: to Column B, the City: to Column C, the State: to Column D, and the ZIP code: to Column E.
    4. Indicate that Longitude should be added to Column F and that Latitude should be added to Column G.
    5. Check the boxes First row as label, Display Interactive Geocoding dialog when necessary, and Use closest match if exact match can’t be found.
    6. Click "OK".

    Assign Lat/Long Coordinates dialog
    Image of Assign Latitude/Longitude Coordinates dialog
    and options that were used in step 5.

  6. After clicking "OK" in the Assign Latitude/Longitude Coordinates dialog the Interactive Geocoding dialog will open.
    1. In the Interactive Geocoding dialog select the addresses in the Address field and replace them with similar addresses from the Further Info field
    2. If there are addresses that don’t show up in the Further Info field change all other addresses and the click the button Geocode Above Records And Assign ZIP Centroid If No Match.

      Interactive Geocoding dialog
      Image of Interactive Geocoding dialog with the addresses that were not
      found on the left and the closest matching addresses on the right.

  7. After closing the Interactive Geocoding dialog the Geocoding Report dialog will open and ask Would you like to open Pin Map dialog? And you should click "Yes."
  8. After clicking "Yes" the Pin Map dialog will open, change the Locating method to Coordinate, the PID to Column A, the X coordinate to Column F: Longitude, the Y coordinate to Column G: Latitude, and click "OK."

    Pin Map dialog
    Image of the Pin Map dialog using the options from step 8.

  9. All of the addresses for the ski resorts will now be added to the map but because the symbols are very small you may not be able to see them so select all of the data points in the Object Manager by clicking on the points while holding the shift key or by selecting the layer with the addresses and clicking Edit | Select All, change the Fill Color to Blue, the Line Color to Blue, the Size to .31 in, the Show ID to "Yes," the Alignment Method to "In relation to bounds," and the Horizontal Alignment to Left.
  10. In order to change the font size you will need to select the layer with the addresses, click Edit | Select All, and in the Property Inspector change the Points to 20.

    Symbol Properties
    Image of the Property Inspector with
    the options from steps 9 and 10 selected.

  11. Now you can add a base map of Colorado to the pin map.
    1. Add a new layer by right clicking in the Layer Manager and selecting New.
    2. Select the new layer in the layer manager by double clicking on it, click Map | Base Map, and load the Co2000.gsb file from the MapViewer7 Sample folder.
    3. Click "OK" to load the map and click "Yes" in the MapViewer Warning dialog.
  12. Now you can add the main roads and highways in Colorado.
    1. Add a new layer by right clicking in the Layer Manager and selecting New.
    2. Select the new layer, click Map | Base Map, and load the CO_Roads.gsb file from the Roads and Highways folder in the folder you created in step 2.
    3. Click "OK" to load the map and click "Yes" in the MapViewer Warning dialog.
    4. Select the layer with the roads, click Edit | Select All, and change the line Color to Red in the Properties Inspector.

      Final Map of Ski Resorts in Colorado
      Sample Map of Colorado Ski Areas Created
      Using MapViewer 7 Geocoding Command.


Back to Newsletter Index

 

Home * Products * Gallery * Support * About Us * Register * Order * Demos * Sitemap

Privacy Policy