gis lab 1gis.yohman.com/up206a/files/2010/11/lab4_w12.docx · web viewgis lab 4. geocoding and ....

18
GIS LAB 4 GEOCODING and BUFFER TOOL—Heavy Air Polluters in Los Angeles County Overview In this lab, you will: Create an address locator Geocode address information Match unmatched point data Create a buffer around a data set Join data spatially to a shapefile Calculate Area In this lab we will map the high polluting facilities and will examine income around these facilities. To streamline the process, the Census data for poverty has been downloaded and prepared which you can download from the Prepared Files. This uses the Census 2000 data which is outdated. It is highly recommended to use the 2005-2009 American Community Survey data for current analysis. Readings An overview of coordinate systems PART I: PRELIMINARIES ASSEMBLING SHAPEFILE DATA 1. Download and extract the Prepared Files (LA_County.shp, pltloc.xls andPovertyLATracts.xls) to your lab4 folder. Make sure you are using the LA County file from this folder and not from Lab 3. Page 1 of 18

Upload: lenhi

Post on 07-Mar-2018

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

GIS LAB 4

GEOCODING and BUFFER TOOL—Heavy Air Polluters in Los Angeles County

Overview

In this lab, you will:

Create an address locator

Geocode address information

Match unmatched point data

Create a buffer around a data set

Join data spatially to a shapefile

Calculate Area

In this lab we will map the high polluting facilities and will examine income around these facilities. To streamline the process, the Census data for poverty has been downloaded and prepared which you can download from the Prepared Files. This uses the Census 2000 data which is outdated. It is highly recommended to use the 2005-2009 American Community Survey data for current analysis.

Readings

An overview of coordinate systems

PART I: PRELIMINARIES

ASSEMBLING SHAPEFILE DATA

1. Download and extract the Prepared Files (LA_County.shp, pltloc.xls andPovertyLATracts.xls) to your lab4 folder. Make sure you are using the LA County file from this folder and not from Lab 3.

2. From ESRI’s data page , download “Line Features - Roads” forLA Countyand extract them to your lab 4 folder.

Page 1 of 14

Page 2: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

SETTING YOUR COORDINATE SYSTEM

1. Open ArcCatalogClick START>All programs>ArcGis>ArcCatalog

Note: As mentioned in lab 3, ArcCatalog is a companion program to ArcGIS. It allows you to organize your data at a meta-level, moving folders and files around, letting you preview shapefiles without adding them to the map, and recording metadata, which can let others know information about the files you create.

2. OpenArcCatalog. Navigate to you Lab 3 folder and to the Census Tract 2000 shapefiles that you downloaded and used during lab 3.Right click on it: Properties and then under theXY Coordinate system check to see that the GCS_North_American_1983 is listed. If not, click on Select>Geographic Coordinate Systems>North America>North American Datum 1983.prj.

3. Navigate to the Roadsshapefile. Set the coordinate system as described in step 3. Rename the file LA_Streets (Very important)

4. In ArcCatalog, clip the California Census tracts (caliTracts) from Lab 3 using the LA_County.shp that you just downloaded. Name the resulting file LATracts.shp and save to your lab 4 folder (Geoprocessing>>Clip).

5. Now repeat step 4 but, clip LATracts.shp using the CaliDetail.shp from LAB 2 Prepared files. Name the resulting file LATracts_Clip and save it in your Lab 4 folder.

If you do not set the coordinate system, ArcGIS orients to the coordinate system of the first layer you add to the map. It will transform the coordinate system of subsequent layers. You should really not take my word for this stuff. ESRI is a more definitive source:

Note:When ArcMap is started with a new, empty map, the coordinate system for the default data frame is not defined. When you add data with a defined coordinate system, ArcMap will automatically set the data frame's projection to be the same as that of the data. The first layer added to an empty data frame sets the coordinate system for the data frame, but you can change it if necessary . . .

As you add subsequent layers, they are automatically transformed to the data frame's coordinate system as long as there's enough information associated with the layer's data source to determine its current coordinate system. If there isn't enough information, ArcMap will be unable to align the data and display it correctly. In this case, you'll have to supply the necessary coordinate system information yourself.

6. Now we are going to project the Census Tract shapefiles so that we can calculate area and measure distance in a later step in this lab. You may be asking why we can’t just calculate area and measure distance using geographic coordinates. The answer, taken directly from ESRI (the link provided at the beginning of this lab):

Page 2 of 14

Page 3: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

Latitude-longitude [geographic coordinates] is a good system for storing spatial data but not as good for viewing, querying, or analyzing maps. Degrees of latitude and longitude are not consistent units of measure for area, shape, distance, and direction

7. In ArcCatalog, open the ArcToolbox. Navigate to: Data Management Tools>Projections and Transformations>Feature>Project. Double-click to open the “Project” tool. In the “input dataset or feature class” add your LATracts_Clipshapefile. In the “output dataset or feature class” save the output shapefile in your lab4 folder and name the output file LATracts_UTM. Click on the button that looks like a hand holding a piece of paper next to “output coordinate system”. Under the XY Coordinate System tab, click on “Select” and then under the Geographic Coordinate System click on Select>Projected Coordinate Systems>UTM>NAD 1983>NAD 1983 UTM Zone 10N.prj

For information about the Universal Transverse Mercator (UTM) projection, visit the USGS web-site.8. Click close when the projection tool finishes. Don’t worry about the message (in green)

that appears in the box saying “The output resolution is larger than the input feature class resolution”

Note: We are not going to project the entire roads files because it takes a long time on the lab computers (about 5 minutes). We will just project what we create from it later, which will take less time.

Page 3 of 14

Page 4: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

PART II: CREATING AN ADDRESS LOCATOR

In order to geocode points, we must first create an Address Locator. This tool instructs GIS on how to search for the correct places to position points. For instance, the address locator instructs the program to use a specific street file. Without an Address Locator, ArcGIS would not know whether to locate Main Street in San Francisco or Los Angeles or some other city (virtually every city has a “Main” street). The Address Locator also allows you to find a location by an intersection with a corresponding 5-digit or 9-digit zip codes.

1. In the left field of file trees, navigate to your lab4 folder. Right-click on your lab4 folder and point to the arrow next to “New” from the pop-up menu. Click on “Address Locator” to create a new address locator in your lab4 folder.

2. In the next window, you will select the parameters for your address locator. First click the folder next to address locator style. Today, we will use “US Address - Dual Ranges” Scroll down, select it from the menu and click OK.

If you examine the LA_Streets attribute table, you will see the data is formatted as left side and right side (Addresses and zip codes). Therefore, the address locator is looking for dual ranges. If you do not have left and right fields, select the US Addresses with Zip. You can also download address locators from UCLA mapshare. These are very large files.

3. The next input is the reference data, in this case the LA_Streetsshapefile. After selecting this file, the field map will automatically populate. Scan through and check that the fields match for the field name and alias name.

4. Select the location for saving the locator, name it LA_locatorin your lab 4 folder. 5. Select OK. The computer will take some time to create the locator.

Page 4 of 14

Page 5: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

Note: File names and locations are slightly different in the screen shot than as directed in this document.

6. Once the address locator is created, double click to open the file. 7. Change the Spelling Sensitivity to 60 (On the Right side). 80 is rather high and makes it

hard for the locator to find matches, especially in more remote locations where data isn’t that strong.Click OK.

OPENING ARCGIS AND ADDING DATA

1. OpenArcGIS and save your project as “Lab4_YourLastName” in your lab4 folder.2. Add the Clipped shapefileLATracts_UTMfor LA County to your map.

PART III: GEOCODING DATA

1. Add the “pltloc” (pltloc$.xls) worksheet from your Lab4 Prepared files folder. Make sure you open the sheet pltloc$

2. Right click on “pltloc” in your table of contents, and click on “Geocode Addresses”, with the mailbox icon.

Page 5 of 14

Page 6: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

Note: You must be in the Source panel of your table of contents because “pltpoc” is an Excel spreadsheet and not a shapefile yet.

3. A window will open asking you to choose an address locator. You want to add the locator you just made. Click on “Add,” and navigate to your locator. Highlight your locator and click OK.

4. Under the first input field under Street or Intersection, select “pltaddr.” “Zip” should default next to the zip field and others will auto-populate.

5. Change the output file to save the geocoded addresses to your lab4 folder. Name it something you can easily remember, like “LA_PolluteGeocoded” Then click “OK.”

6. 50% of the points in the database were not located. Click on “Rematch.” If you accidently breeze past this screen, you can view the geocoding toolbar and access the review/rematch screen.

7. The address locator is very exact in its search process. There should be 624 matched, 1tied and 632 unmatched.

Click on standardized addresses to get more details.

On the drop down menu at the top of the screen for “Show results” select Unmatched

Scroll down to record with FID 52— You will see a list of candidates for this address. It appears the problem is the direction S in the address. Remove that from the address and press Enter. Now highlight the first candidate in the record and click match. The address will now be matched. Scan along this record to see the changes the computer has made.

Page 6 of 14

Page 7: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

Scroll to Record with FID 86—Remove the W direction from the address on the left and press Enter. Highlight the first record and select match. The record should now be matched.

Scroll to Record with FID 103 – Delete the suffix ST and replace it with AVE. Highlight the first candidate and select match.

Click “Close”.

Now we will project our geocoding results. This is a lot faster than projecting the entire roads file.

8. Open ArcToolbox and navigate to Data Management Tools>Projections and Transformations>Feature>Project (not the define projection tool). Double-click to open the “Project” tool. In the “input dataset or feature class” add your geocoding result. In the “output dataset or feature class” save the output shapefile in your lab4 folder and name the output file LA_PolluteGeocoded_UTM. Click on the button that looks like a hand holding a piece of paper next to “output coordinate system”. Under the XY Coordinate System tab, click on “Select” and then under the Geographic Coordinate System click on Select>Projected Coordinate Systems>UTM>NAD 1983>NAD 1983 UTM Zone 10N.prj

Click OK for everything to run the tool. Make sure to add the result. You can remove LA_PolluteGeocoded layer (the unprojected one from your map).

Selecting the Heaviest polluters

1. Right click on the LA_PolluteGeocoded_UTM and open the attribute table2. We want to create a selection of records that were successfully geocoded and are in the

top 20 polluters for Carbon Dioxide. We must create a query (select by attributes) which reflects these parameters.

3. At the top of the attribute table, click the “Select by attributes” button. Hovering over the buttons will display an explanation as well.

4. In the dialogue box, click the status field name to be inserted into the query statement. Click the equals sign. Click get unique valuesand insert the M (this is the status for matched entreies.) Insert the ANDoperator click the field name CO use the greater than symbol > and type 28.5 (This is the threshold for the top 20 CO polluters) The final statement should be the following: "Status" = 'M' AND "co" > 28.5

Page 7 of 14

Page 8: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

5. If the statement worked correctly, you should have 20 records selected. 6. Right click on the LA_PolluteGeocoded_UTMand click select “data” and then “export

data”. Save this shapefile as Heavy_Pollute_UTMin you Lab 4 folder.

PART IV: USING THE BUFFER TOOL

1. Now you have the top polluters in LA County located. We want to examine the demographic/socio-economic characteristics of the areas within 1 mile distance from each location which would help us to find who is most affected by these polluters. Therefore, we are going to create a 1 mile buffer around these locations.

2. OpenArcToolbox by clicking on the red toolbox icon.3. In the top menu geoprocessing list, click the menu and select the buffer tool. You can

also get here by navigating to Analysis Tools>Proximity>Buffer. 4. In the Buffer window that opens, click on “Show Help” for a graphical representation of

the tool.5. For the input field, drag or open-and-navigate to the geocoded file

Heavy_Pollute_UTM.”6. Name the output field, “Pollute_Buff” and save it to your lab4 folder.7. Under “Distance [value or field]”, click on the radio button next to “Linear Unit” and

then enter “1” in the first field below “linear unit” and choose “Mile” from the field next to the distance value.

8. Keep all other defaults (i.e. keep “Dissolve Type” as “None” and do not check any of the “Dissolve Fields”). Then click “OK” to run the tool.

PART V: JOINING DATA

Now you’ve mapped the Polluter locations, and you’ve demarcated a 1 milebuffer around each. Let’s add a policy question, like…“What are the characteristics of those that live around the highest CO polluting sites in LA County?”

1. Add the PovertyLATracts.xls(shee0$) file to your map (It’s in your Lab4 prepared files.)2. Add the LaTracts_UTMShapefile3. Right click on “LATracts_UTM.” Roll your mouse over Joins and Relates and click on

“Join.”4. We will join the GEOID field of the Census Tracts shapefile to the GEO_ID2 field of the

PovertyLATracts.xls file (Sheet0$).5. After you’ve set up the proper connections in the Join window, click “OK.”6. Export the joined layer to your lab4 folder. Name the file “LATracts_Poverty”. Add the

layer to your map. You can remove the layer LATracts_UTM once you verify that your exported shapefile is joined correctly.

Calculate Area

Page 8 of 14

Page 9: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

1. Open the Attribute table (Right Click on the just created LATracts_Poverty and select attribute table) for the joint layer “LATracts_Poverty.” Click on the options button and double click on “Add Field”.

2. Name the new field as “SqMile.” Choose “Double”: Type 5 for Precision and 2 forScale. Click Ok. A new field adds to your table.

3. Right click on your new field and double click on “Calculate Geometry.” Click Yes on the warning.

4. For the “Property” field make sure that “Area” is selected. 5. Select Square miles US for the “Unit” field. Click Ok. The area of each census tract is

calculated. 6. Repeat the add field steps for your Buffer layer (Pollute_Buff). To calculate the

geometry of the buffers. Make sure to choose a different name for the new field such as: “SqMileBuff.”

PART VII: PERFORMING A SPATIAL JOIN TO EXTRACT INFORMATION FROM WITHIN THE BUFFER

It is possible to attach data to locations using a spatial join. In this way, we can extract information from within a buffer. You can do this to create new fields that can be shown as in a map, graph, etc. Here we will extract information and use it create an index of poverty levels within 1 mile of the highest polluters in LA county.

1. Right Click on the Pollute_Buff layer, click join and select “join data from another layer based on a spatial location” from the drop-down box “What do you want to join to this layer?”

2. In the first step (“Choose the layer to join to this layer, or load spatial data from disk”), add the “LATracts_Poverty” layer and click “OK”

3. In the second step (“You are joining…”), select the firstradio button “Each polygon will be given a summary of the numeric attributes of the polygons in the layer being joined that intersect it, and a count field showing how many polygons intersect it.

4. Under “How do you want the attributes summarized” checkthe box“Sum”.5. In the third step, save the output shapefile to your lab4 folder andname the file

“Pollute_Buff_SpatialJoin”.6. Now open up the attribute table “Pollute_Buff_SpatialJoin”. You will find the spatial data

attached to each feature.

PART VII: Pro-rating the data

1. The Spatial join function added up all the data for poverty andnumber of families for all the census tracts that intersect with each buffer and put them in the Pollute_Buff_SpatialJoin attribute table. However, we want to examine the demographic and socio-economic characteristics of only the area under the buffer.

Page 9 of 14

Page 10: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

Therefore we need to pro-rate all the population data based on an index such as area for the buffer layer.

2. Add a new field named “Pov_Buff” in the attribute table of thePollute_Buff_SpatialJoin layer (Double, Precision 5, Scale 0).

3. Right click on the Pov_Buff field and from the pop-up box double click on “Field Calculator.” In the Field Calculated dialog box type: ([SqMileBuff] / [Sum_SqMile]) * [Sum_FamBel]

4. Click Ok. This field now shows the pro-rated number of Families below the poverty line within a 1 mile distance of each heavy polluting facility.

5. Repeat 1-3 for the Total Number of Families. Choose an appropriate name for the new field such as: “Fam_Buff.” The syntax would be: ([SqMileBuff] / [Sum_SqMile]) * [Sum_TotalF]

6. We want to calculate the Percent Families Below the Poverty Line within a 1 mile distance of each heavy polluting facility. Add a new field with an appropriate name such as “PCTBELOW” Choose Double (Precision: 5, Scale: 5). Calculate the percentage by dividing “Pov_Buff” by“Fam_Buff” and multiplying the result by 100.

NOTE: "Precision is the number of digits in a number""Scale is the number of digits to the right of the decimal point in a number" Precision of 10 should store numbers with max 10 digits: 1234567890 Precision of 10 and Scale of 5 should store 12345.12345

PART VIII: CREATING A LAYOUT

1. Go into the properties of the LATracts_Poverty layer and select symbology. Make a graduated color map. For the value field, select Totalfamand for the normalization field, select SqMiles(this will make a proportion with the denominator being the normalization field and Population being the numerator). Choose the best classification method. Pick a color ramp you like. Then click “OK.”

2. Go into the properties of the Pollute_Buff_SpatialJoin layer and select symbology. Make a graduated symbol map. For the value field, select “PCTBELOW.”.Choose the best classification method. Pick a color ramp you like. Then click “OK.”If you can still see a larger buffer around the graduated symbol, change the background of the symbol.

3. Notice that we can’t see through the buffer. So let’s adjust the transparency. Go to properties and the display tab. Adjust the transperancy percentage and click apply to see what the appropriate transperancy level is.

4. Let’s show the location of heavy polluters that we geocodedon-top of all the other layers. DragLA_PolluteGeocoded_UTM to the top of the layer list (When you do this, make sure that you are in the “Display”tab in your table of contents. If you are in the “Source” tab, you won’t be able to do this until you switch on theDisplay tab).Search for factory or another keyword that would work for displaying polluters. You may have to click on style references and turn some of the lists on for the search function to work properly. Select an appropriate

Page 10 of 14

Page 11: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

symbol (one that is more than a dot, triangle, square, etc) and size it appropriately for the map.

5. Save your map and go to File>Export Map. Save file as “YourUCLAIDLab4” and within the “Save as type” drop down menu select “AI”.

6. If you finish early you may want to add the highway or roads layers. Of even clip the buffers you created by using calidetail. (You will notice that some of the buffers along the water front no long extend out into the water.

Page 11 of 14

Page 12: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

PART IX: EXPORTING TO ADOBE ILLUSTRATOR

Create a Layout

1. Start Adobe Illustrator. (If you do not see the icon for the program on your desktop it is located within the folder “Adobe Design Premium CS5” folder. 2. Open the AI file you just exported 3. Your tool bar should already be on your screen. If you do not have a tool bar that appears like the one to the left, go to “Window” and select “Tools”4. Now we need to bring up the Layers menu. Go to the “Window” tab at the top of your screen and then click on “Layers”. (Shortcut: F7) This menu should show up on your screen:

7. Your layers from GIS should show up within the Layer Menu. We need to add text, so to keep things organized we need to create a new ‘Text Layer’. Create a new layer by clicking on the pull down menu that is circled in red in the image above. Select “New Layer” and when prompted, name your layer Legend ‘Text’.8. If you want to rename any of your layers,double click on the layer’s name and rename the layer. 9. Look through the list of layers and make sure you do not see any ‘lock’ symbols. If any appear, click the lock symbol until you see none.

Page 12 of 14

Page 13: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

10. Now, using the black arrow in the tool bar select your image layer and scale it to the desired size on your page. (Hold shift while you are scaling your image so it scales proportionally).11. Lock your all layers except the ‘text’ layer by clicking into the empty box immediately next to each layer’s name. The small lock should appear to indicate that the layers are locked. 12. Select the Text layer. You will know it is selected if it is highlighted in blue (this indicates that the text you are about to create will be created within that layer)13. Select the “T” symbol in the tool bar and click and drag your mouse within your paper space. A rectangle should appear with a blinking cursor. 14. Name your map and move the text to its proper location. 15. Use the text tool to name your Sources and add text to your legend and to add any additional labels you want. You can manipulate the text properties at the top of your screen. If you do not see the text attributes at the top of your screen go to Window>Type>Character and a window will appear on your screen allowing you to manipulate your text. 16. To create a north arrow select the line or pen tool in your tool bar and draw a line within your paper space.18. Now we need to open the Stroke menu to add the arrowhead. Go to Window>Stroke and you should see this menu:

19. Next to “Arrowheads” select the arrow head you desire. 20. In order to make sure everything is neat and lines up, you will need to turn on your ruler and grid background. Go to View>Show Grid, then View>Snap to Grid.21. You may need to change the transparency of your “Image” layer to see the grid behind. To do this, select and unlock the “Image” layer. Select the image and at the top of your screen next to “Opacity” type in 50.

22. Now use the grid to drag each of your elements into place.

Page 13 of 14

Page 14: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4_W12.docx · Web viewGIS LAB 4. GEOCODING and . ... The first layer added to an empty data frame sets the coordinate system for the

23. Play around with the other items in the tool bar and the list of tools under the “Window” at the top of your screen until you are satisfied with the image.24. Export as a jpeg when you are finished and post to the website.

Page 14 of 14