15
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 (pltloc.xls and PovertyLATracts.xls) to your lab4 folder 2. From ESRI’s data page , download “Line Features - Roads” for LA County and extract them to your lab 4 folder. Page 1 of 15

GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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 (pltloc.xls and PovertyLATracts.xls) to your lab4 folder

2. From ESRI’s data page , download “Line Features - Roads” for LA County and extract them to your lab 4 folder.

3. Make sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from the ESRI website.

Page 1 of 11

Page 2: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

SETTING YOUR COORDINATE SYSTEM

1. Open ArcCatalog Click 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. Open ArcCatalog. 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 the XY 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 Roads shapefile. Set the coordinate system as described in step 3. Rename the file LA_Streets (Very important)

4. In ArcCatalog, clip the LA County Tracts using the CaliDetail.shp from LAB 2 Prepared files. (In ArcToolbox > Analysis tools > extract > Clip). 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.

5. 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 11

Page 3: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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

6. 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_Clip shapefile. 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.7. 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 11

Page 4: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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 Addresses Dual Ranges” Scroll down, select it from the menu and click OK.

If you examine the LA_Roads 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_Roads shapefile. 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_locator in your lab 4 folder. 5. Select OK. The computer will take some time to create the locator.

Page 4 of 11

Page 5: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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. Open ArcGIS and save your project as “Lab4_YourLastName” in your lab4 folder.2. Add the Clipped shapefile Census Tracts UTM for 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 11

Page 6: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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, 1 tied 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 11

Page 7: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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” and then click “Done”.

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 values and insert the M (this is the status for matched entreies.) Insert the AND operator 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 11

Page 8: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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

data”. Save this shapefile as Heavy_Pollute_UTM in 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. Open ArcToolbox 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 mile buffer 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_UTM Shapefile3. Right click on “LATracts.” Roll your mouse over Joins and Relates and click on “Join.”4. We will join the STFID field of the Census Tracts shapefile to the GEO_ID2 field of the

PovertyLATracts.xls file.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 once you verify that your exported shapefile is joined correctly.

Calculate Area1. 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”.

Page 8 of 11

Page 9: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

2. Name the new field as “SqMile.” Choose “Double”: Type 5 for Precision and 2 for Scale. 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 first radio 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” check the box “Sum”.5. In the third step, save the output shapefile to your lab4 folder and name 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 and number 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. 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 the Pollute_Buff _SpatialJoin layer (Double, Precision 5, Scale 0).

Page 9 of 11

Page 10: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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 Totalfam and 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 geocoded on-top of all the other layers. Drag LA_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 the Display 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 symbol (one that is more than a dot, triangle, square, etc) and size it appropriately for the map.

5. Export the map as a JPG. Name it lab4.jpg and save it and post to the website.

Page 10 of 11

Page 11: GIS LAB 1gis.yohman.com/up206a/files/2010/11/Lab4-1.docx  · Web viewMake sure you have the LA County census tracts from Lab 3. If not, download the “Census Tracts 2000” from

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 11