Business GIS at WCU Header

Geo325: Business Geographics
Lesson 4 ~ Geocoding and Creating An Inset Map Using ArcMap

Lesson Overview:  Today we will geocode business locations and create an inset map as we did in Lesson 3. This time, however, we will use ArcMap, a GIS package made by ESRI. ArcMap is robust and powerful and also a bit more complex.

We will start by loading data layers, setting a correct projection for our map, and selecting appropriate symbols for our layers. We will then geocode a business location file. We will then create a second map that will serve as our inset map. We will visually connect the inset map to the main map using a box and leader line.

Before you begin, prepare for this lesson as you did for previous lessons. Create a folder on your storage disk. Name it Lesson4 or similar. Connect to \\Geographia and map \\Geographia\Work as your W: drive. Select a business location file from w:\geo325\attributedata\ that you'd like to geocode, either one you have already geocoded or you can use a different one. Copy it to your flash drive under the new Lesson4 folder on your flash drive.

As with MapInfo, in ArcMap you'll work with different types of windows: maps, tables, layouts, etc. You'll add layers to your map, control the order in which they are drawn; change the colors and symbols used to draw them; open the attribute tables that are part of the layers, label features using data from the tables, and so on. You'll create a layout and add text, scale bars and graphic elements to a layout. The concepts are the same, but the mechanics are different.



Part 1. Getting Started With ArcMap

Start ArcGIS 9 by clicking on the ArcMap icon on the desktop. At the prompt, choose the option to start using Arcmap with a new empty map. Select File, Add Data on the menu. Navigate to the W:\Geo325\SpatialData\ folder and click on the layer named CCSTREET.shp. Select Add. You've just added a layer to your map.

Your ArcMap window should now look something like below. The largest area is dedicated to the map, where the spatial data are displayed.

ArcMap Application Window, Streets Added

You have all sorts of tools at your disposal along the top and the bottom of the application. We'll learn about these tools as we go.

Layer Control. In MapInfo, we controlled our layers by clicking the layer control icon on our main tool bar, (remember   ?) and then working in a dialog box. In ArcMap we have direct control of our layers through the list of layers, just to the left of the map area (where it says Layers.) ArcMap gives us direct access to our layers through this window area.

By default ArcMap calls this map "Layers". Let's rename it. Click once on the word "Layers" in the layers area of ArcMap. Now click once again. You can now begin typing. Change "Layers" to "Main Map." This step is not necessary, but will help eliminate confusion later in this exercise.

You can turn a layer off and on by simply unchecking or checking the box   in front of the layer name. Try that now. Turn the streets layer off and then back on.

You can easily rename a layer. Click once on "CCSTREET." Now click once again. You can now begin typing. Change CCSTREET to Streets.

Let's change the symbology of a layer. Symbology means how features are drawn, including colors, patterns, line widths, shading, etc. When you first add a layer, ArcMap just grabs any color. In the example shown above it drew the streets green, an illogical choice for streets. We will now change how the streets are drawn.

Below the layer name in our list of layers is either a point, a line or a polygon, depending on what sort of layer it is. For CCSTREET it is a simple line. Change how streets are drawn by double-clicking the symbol (the simple line). On the Symbol Selector that opens, click on the Color option box. Change the color to black, a better color for roads. Click OK.

Arcmap Streets Symbology

 

Projections

We will now set the projection in ArcMap. Projections are an important concept for any map. For the previous three lessons, the projection had already been set for us, but this time we will set it.

Setting a projection is especially important when you geocode. Why? When you geocode you are creating a new data layer of points. The points have actual coordinates, either latitude and longitude values, or x-y coordinates. If you don't set a projection before you geocode, the points could end up anywhere! On this map they would look fine, but if you try to add them to other map documents, who knows where they will be?

Let's set the projection. Click on View on the menu and select Data Frame Properties. On the window that opens, select the tab at the top that says Coordinate System. (It may already be selected; see image.)

Setting the Data Frame's Projection

 

Notice that ArcMap is telling you that it thinks the coordinate system is GCS-Assumed Geographic. GCS stands for Geographic Coordinate System, which means the data are stored in latitude/longitude values. Click on the small plus sign in front of the Predefined folder in the Select a coordinate system area. Then click on Projected Coordinate Systems, then UTM, then NAD 1983. Select NAD 1983 UTM Zone18N from the list. This projects our data frame to a relatively common projection system for our 'neck of the woods' in southeastern Pennsylvania. Click Ok, then Click Yes to the Warning Message.

Note that you did not actually reproject the streets layer. The shapes inside the Streets layer are still stored in latitude/longitude values. We simply told ArcMap to draw them in a way that is more appropriate for Chester County.

Part 2. Geocoding In ArcMap

We will now geocode in ArcMap. Open ArcMap's ArcToolbox. Select Window on the menu, and then select ArcToolbox.  ArcMap's Toolbox Icon Your window should then look something like the one pictured below.

Arcmap Application Window

Click on the plus sign in front of Geocoding Tools in your ArcToolbox and then double-click Geocode Addresses. This will launch the Geocode Addresses dialog box.

To geocode, you'll tell ArcMap three things: what business locations you want to geocode (your input table); what geocoding engine to use (the address locator); and where to store the new layer that is created (under the output feature class).

(In MapInfo, we only had to select the input table. The geocoding engine was defined behind the scenes. MapInfo simply stored the new layer in the same folder as the input table.)

Working in the Geocoding box:

Step 1. Set Your Input Table. Click the Browse button    next to the Input Table text box. Now navigate to your flash drive folder for this lesson. (If your flash drive doesn't appear in the list, ask a lab assistant for help.) Select the business location file you copied at the start of this lesson.

Step 2. Select an Address Locator. You'll now select an Address Locator. An Address Locator includes all the rules for how to find and match your business file to the streets layer. Click the Browse button    to the right of the Input Address Locator text box. Click the drop-down button in the Look In box and make sure it says Address Locator text box. Arcmap should find the Centrus Geocoding Service and it should appear as an option. If it does not appear as an option, ask a lab assistant for help.

Step 3. Set the Location Where the New Layer will Be Saved. The geocoding process creates a new layer. You'll need to make sure this new layer is saved on your flash drive. First, make sure the dialog box is large enough that you can see the very bottom, where it says Output Feature Class. Confirm that the new layer will be saved on your flash drive, not on the local computer.

Your Geocode Addresses box should now look like the one below.

Geocoding Snapshot


Much like MapInfo, ArcMap allows us to geocode either automatically with little help from us, or interactively, stepping through each entry. For ArcMap we will just geocode automatically. In the Centrus Geocoding Progress window, click on Batch. Watch the progress window. Once it gets through all your entries (it will report 9 of 9 complete, or 15 of 15, or 77 of 77 complete; also it will say Geocoded: 100% ), click Finish. If a geocoding log report opens take a minute to see what it says, and then close the file (File, Exit). Then close the final geocode Address dialog box that is open. You should now see a new point layer in your map, representing your geocoded business locations. Yay!

Change the symbology for your new business locations layer. Choose a symbol that you like (maybe a star or a circle) and a bright color that stands out against the streets layer.

Part 3. Making a Layout in ArcMap

We'll now create a layout in ArcMap. Click on View -> Layout View on the menu. This is analogous to the step in MapInfo where we selected Window on the menu and then New Layout Window. Like MapInfo, this is where we will create a layout for printing, with text, scale bars, neatlines, etc., added to our map.

Let's change the page layout from portrait to landscape; this would fit well with Chester County's proportions while leaving space to the side for our legend and other graphics. On the menu, select File, Page and Print Setup. First, make sure that the option to Use Printer Paper Settings is checked. This step ensures that ArcMap and the printer are 'talking the same language.' Also, make sure the option to Show Printer Margins on Layout is checked. This step will show a light gray dotted line on the layout. This  is the largest area that the printer can print and will help you keep everything on your layout inside this dotted line or it will be cut off when you print. Finally, set the Orientation (middle of the box) to Landscape.

The next step is to make your map frame fit nicely on the page. Click on your map frame to select it. You will see a rectangular box appear around it. Use the small black squares in the corners and sides to resize the box. Move your cursor toward the middle of the box (the cursor will change to this ArcMap Cursor When You Are Moving Objects to indicate you are moving it, not resizing it.) Click and drag to position it where you want it.

Save Early, Save Often

We've just completed a bit of work so now would be a good time to save it. On the menu, click File, Save. Navigate to your Flash drive and your folder Lesson4. Give your file a descriptive name, such as Lesson4. Be sure that the extensions remains ".mxd."

Part 4. Create a New Map for Our Inset Map

We will now create a new data frame that we'll use for our inset map. Click on Insert on the menu. Click Data Frame in the drop-down menu. A new data frame or map is created. Set the projection for this new data frame; see steps above.

Let's rename this data frame. Click on Layers in the table of contents. Click on it once again. Change "New Data Frame" to "Inset Map." Again, this step is not necessary, but helps us be clear about which is which.

We need to add the streets and the geocoded businesses to this map. You could go through the "Add Data" process and then set the symbology as above. Or, you can easily copy layers between data frames. Select the Streets layer in the table of contents in your main map. Now right-click and select Copy. Click on the text "Inset Map" in the table of contents for your new data frame. Right-click and select Paste Layer(s). You just copied streets from the Main Map to your Inset map. Now it will appear in both. Do the same with the business location layer, copying the layer from the main map to the inset map.

Now zoom in on the inset map to show a nice cluster of points. You want a nice cluster of businesses, maybe 3 to 10 locations, to appear in your inset map. Some businesses don't have a tight clustering of locations. For example, the golf courses in Chester County are pretty spread out. Just find the best concentration of businesses you can with your selected business.

Label Features From Data in the Table

We will now label several of your businesses on your maps. To label locations using a value from the data (for example, the name of your business) you must be in Data view, not Layout view. On the menu select View, Data View.

Also, we will label several business locations on both our main map and on our layout map. The Inset Map is currently activated. We'll put labels on the Inset Map first.

Find the label tool on your Drawing Toolbar. By default ArcMap puts the Drawing Toolbar along the lower edge of the application. A portion of it follows.

ArcMap Drawing Toolbar

Click on the drop-down arrow just to the right of the text button  . From the options that appear select the label tool. Accept the default style and placement by dismissing the window that opens. Now click near one of your business locations. A label should appear that shows the name of that business. Label several more of your points.

Now activate your main map (click on it in your layout). Now go to data view and add several business location labels on your main map.

We now have two maps on our layout that show different areas of Chester County. We will now visually connect the larger map and the smaller map on our layout so readers can see what area our inset map comes from. Go back to your layout. (On the menu, select View > Layout View).  Move the inset map frame to the upper left corner of your layout. Make it smaller, maybe one-quarter the size of the larger map, by clicking on it and resizing it using the corner squares.

Make your first data frame the active frame. To do this right-click on "Main Map" in your list of layers and select Activate. You can also simply select it from your layout. You can tell which of your data frames is the active frame by looking at its name; it will be bold if it is the active frame.  Right-click again, select Properties, and then select the Extent Rectangles tab on the window that opens. (See image below.) In the Other data frames area move your inset map data frame to the right column by highlighting it and selecting the arrow  to move it to the Show extent rectangles for these data frames column. Check the box for Show Leader. The dialog box should look like this.

ArcMap Inset Dialog

Click Ok. You should now have a colored rectangle on your main map representing the geographic extent and location of your inset map. You should also have a line drawn between that rectangle and your inset map.  By default the rectangle is red, but you can change that by clicking on the Frame... button. Also the Leader symbol can be customized if you wish.

Legend, Scale Bar, North Arrow, Title and Neat Line

Legend

To insert a legend, click Insert on the menu. Then click Legend in the drop-down menu. ArcMap's wizard lets you customize every detail of your Legend. We will accept most of the defaults. Click Next through almost everything in the legend wizard except in the third window of the Legend Wizard; you will add a simple border around the legend. Click the Border dropdown, and add a 1-point border. Click Next through the rest of the wizard. Then click Finish. Move the legend by clicking on it and dragging it to the lower right corner of the layout.

Scale Bar

Let's set our map scale and insert a graphic scale bar. As we discussed in last week's lesson, it's important that our scale value be relatively simple, that the scale units (e.g., feet, miles, kilometers) are appropriate to our map, and that the length of one unit on the scale bar is exactly one inch on the paper. We will achieve that by following these steps: decide what scale our map should be; set the map to that scale; and then create a scale bar.

Step One. Decide on your Map's Best Scale

Look at your main map, showing all of Chester County. Zoom in or out to make sure you can see all of Chester County and that it is roughly centered in the map frame. Be sure you are in a layout, not a map view, as that will affect the scale.

Now find the map scale indicator at the top of your ArcMap window.It looks something like this.   Your scale value might be different but follow along the demo using that number. This box tells us that one unit on the map represents 355,823 units on the earth's surface. This is called a representative fraction scale. It will always show in ArcMap and will change every time you zoom in or out or change scale in any fashion. It will always reflect the map's current scale.

A representative fraction scale ALWAYS works, no matter what units you are working in: feet, inches, kilometers, monitor pixels, perches or fathoms. It can be read in any language: English, Chinese, Farsi, etc.) And it's always correct, even if the map has been enlarged or reduced.

See why we love representative fractions?

What scale is 1:355,823?

Well, 355,823 inches is 5.61589 miles (355823 inches divided by 5280 feet per mile and then again by 12 inches per feet). So the current map scale is one inch = 5.616 miles.

We could simply let this be our map scale. But that would be unprofessional.

Let's choose a reasonable scale, say 1" = 5 miles or 1" = 6 miles that is fairly close. We don't want to change it too much because then our map might be too big to fit on the page or too small to allow for good detail. The scale should be close to 1" = 5.616 miles.

Look at the following table. You'll see some commonly found map scales and their corresponding representative fraction. Look down the leftmost column and find the two options we are considering (1" = 5 miles and 1" = 6 miles.)

Scale

Math

Representative Fraction

1" = 2000 feet

= 24,000 inches / 12 inches per foot

1:24,000

1" = 4 miles

= 253440 inches / 12 inches per foot / 5280 feet per mile

1:253,440

1" = 4.5 miles

= 285120/5280/12

1: 285,120

1" = 5 miles

= 316800/5280/12

1:316,800

1" = 6 miles

= 380160/5280/12

1:380,160

1" = 7 miles

  and so on...

1:443,520

1"=50,000 feet

=600000 inches / 12 inches per foot

1:600,000

1" = 100,000 feet

=100000 feet * 12 inches per foot

1:1,200,000

Now read to the right to find their representative fractions.

Now we are going to set the scale of the map in Arcmap to exactly the scale we want. Click on the representative fraction box in ArcMap.  ( )

Type in the first option, 316,800. You just set your map's scale to exactly 1" = 5 miles. Look at your map. Did any map features get cut off the edge of the frame? Now type in your second option, 380160. Look again at your map and make sure nothing got lost. You can now choose which you like best. Both work well and are acceptable.

Step Two: Insert & Configure a Graphic Scale Bar

To add a scale bar click on Insert on the menu. Select Scale Bar. A scale bar selector will appear.

In MapInfo we had only one style for our scale bar. In ArcMap, the scale bar selector includes a variety of predefined styles.  Different disciplines, such as engineering, landscaping, planning, geology, etc., have their favorite styles. For this lesson, let's all use the same style; later on in the course you can work with different styles. Choose the top style. Now click on the Properties... button.

Now, in this order, do the following:

1. In the middle of the Properties box, under When resizing, click the drop-down and select Adjust Width.

2. For the division units set the units to whatever units you decided upon above. If your map scale is one inch = 10 kilometers, you would choose kilometers. If you used 1" = 2000 feet, you would use feet. We decided on miles when we set our map scale above. Select Miles.

3.) Now, the final step. Under Division value, set the value to the map scale you wanted. Click Ok.

Our map now meets high cartographic standards related to scale! The map scale is a simple value. The units are appropriate to our geographic extent of Chester County. And the length of one unit on the scale bar is exactly one inch. You can measure it when you print it out!

Not all mapmakers meet this standard and not everyone insists on them. But now you know that you can make a scale bar that says exactly what you want it to, and in a very professional manner. Again, here are the steps.

  1. Set your map scale. Zoom in or out on your map so that the map shows the geographic extent you want to show. Look at the representative fraction in the map window. Using a reference table like the one above, or performing some quick calculations, decide on the best scale for the map. Calculate that scale's representative fraction. Set your map to exactly that scale using the representative fraction area of ArcMap. Double check that your layout shows the area you want and does not clip off data.

  2. Insert and configure your graphic scale bar.
North Arrow

To add a north arrow you will also go to the Insert menu and select North Arrow. Choose one of the north arrow styles that you like. Move and resize the north arrow and scale bar so they fit nicely above the legend.

Neatline

ArcMap adds a border to our data frames. Since we sized our map frame to fit the entire page, that border can serve as our neat line as well.

Title

To add a title for the map, go to the Insert menu and select Title. A text box will be created and you can immediately begin typing the text you want for your title.

Now add text to your map showing your name, class, date and lesson number. To add text click on the large A on the Drawing Tool Bar (see below). Add your name, lesson number, date and section in the lower right corner. Also, add text directly underneath and outside your inset map explaining where it is from, for example, "West Chester Area," "Spring City," etc.

ArcMap's Drawing Tool


 

Save Your Work

Click on File in the menu bar, then go to Save.  Navigate to your storage disk. Type a project name in the File Name box (ex. : Chestercounty.mxd) then click OK. You should have at least five files on your flash drive: an .mxd file, the original business location file (.dbf) and three files together that comprise your new geocoded business file (e.g., golfcourses.dbf, golfcourses.shp and golfcourses.shx.)

Lesson documentation updated 06/03/08; Ellen Bryson.
The Center for Geographic Information Systems and Spatial Analysis at West Chester University