Advanced ArcGIS

Document Sample
 Advanced ArcGIS Powered By Docstoc
					ArcGIS II
Before you begin

Outside of workshop: general GIS resources at MIT are available at http://libraries.mit.edu/gis.

1. You will need an MIT Geodata Repository Account before beginning this exercise
If you do not already have an account you can create one at:
http://libraries.mit.edu/gis/data/repository.html

2. Open the windows command prompt

           a. type: attach –DT gis
           navigate to T:\workspace2\workshops\arcgis2_aug07 and copy the contents of the
           “arcgis2” folder to your f:\usertemp\arcgis2


Introduction

This workshop will lead you through a variety of tools available in ArcGIS 9.2 and is geared toward
the user who is already familiar with the basic functionality of ArcGIS (or has taken ArcGIS 1).
This exercise is set up for educational use only. The data is not to be used for commercial purposes.
In this exercise you will learn to:
    1. Georeference - Align geographic data to a known coordinate system so it can be viewed,
         queried, and analyzed with other geographic data. Georeferencing may involve shifting,
         rotating, scaling, skewing, and in some cases warping or rubber sheeting an image.
    2. Adding tabular data
             a. Geocoding - associating a table of address data with a gis street file to create a point
                 gis layer. You will learn to create a new address locator in ArcCatalog and Geocode
                 a table of addresses in ArcMap.
             b. Adding xy data
    3. change the projection of a data layer
    4. calculate the distance between points in a shapefile
    5. Spatial Join, Dissolve, and Field Calculation
    6. create contour lines from a digital elevation model
    7. create and edit shapefiles
    8. Create a 3D model in ArcScene
             a. extrude buildings to display in 3D
             b. set a DEM as the base layer and drape other layers over top of it
             c. vertical exaggeration
             d. adjusting the image rendering

The Scenario:
Someone has approached you to help them choose a neighborhood/planning district in Boston to
build an educational theater (ET). Once the location is decided upon they would like a 3D model of
the site. The neighborhood chosen should have a high density of schools, be accessible by the T, so
the kids can easily get to it, preferably not have other movie theaters nearby to compete with, and it
should have open space nearby for the kids to try experiments after learning about new ideas at the
ET.

                                                                                                       1
Georeferencing a map
Add the gis file you will use to georeference the image
You found a paper map of the City of Boston Planning districts and decided to scan it and save it as
a .jpg image so you could work with it in ArcGIS and analyze other layers with it.
First you will add a gis file that represents the City of Boston, so you will have something to
georeference your map to.
Do an advanced search in the MIT Geodata Repository on keyword = “Boston” and keyword =
“Border”




   1. Add the Border for the City of Boston to your ArcMap project (ma_boston_f7brdr_2001)
      from the MIT Geodata Repository
   2. Right click sde_data.us_ma_boston_f7brdr_2001 ->select properties-> select the general tab
   3. Change the layer name to “border”

Add and explore the image you will georeference
  1. Add F:\usertemp\arcgis2\bostonplanning.jpg to your ArcMap project
  2. ArcGIS may ask you if you want to build pyramids. Click Yes (A pyramid file will enable
      ArcGIS to redraw your raster more quickly. This is more important for large raster files than
      small ones like this file.)
  3. You may get a warning about the “Unknown Spatial Reference: The following data sources
      you added are missing spatial reference information. This data can be drawn in ArcMap, but
      cannot be projected.” Click ok. (Your next step will be to give this image spatial reference
      information.)
  4. The bostonplanning.jpg file appears as a layer in your Table of Contents but does not draw
      on top of your Boston borders file.
  5. Run your mouse over the Boston border file and notice the coordinates in the lower right
      hand corner of your project.
  6. Right click bostonplanning.jpg and select „zoom to layer‟ then again examine the coordinates
      in the lower right hand corner of your project – the coordinates are different from the border
      file and need geographic coordinates assigned to make it appear in it‟s appropriate
      geographic location.
  7. Right click the border file and select „zoom to layer‟.
  8. Change the symbology of your Boston border file to hollow center, red boundary with a
      width of 1 (so it will be easily distinguishable from your Boston planning map)

                                                                                                       2
Georeference the Boston Planning map using the Boston borders file
   1. Turn on the georeferencing toolbar (right click in the toolbar area and select
      “georeferencing”)
   2. Make sure the layer on the georefencing toolbar is set to bostonplanning.jpg
   3. Click Georeferencing -> Fit to Display
   4. The Boston planning map will appear centered in your data frame.
   5. To georeference one could enter the coordinates of the map (if they are known) or one could
      assign coordinates to the scanned map by clicking on the scanned map then clicking in the
      same place on the gis file, which is what we will do in this exercise.
   6. Click „add control points‟ on the georeferencing toolbar




   7. Find 3 places you can ensure are the same on the scanned map and the gis file and line them
       up by first clicking on the scanned map then clicking on the gis file. The three locations
       chosen should be well distributed places around the map. It can be helpful to zoom in to
       ensure the areas clicked are the same.
   8. Once your Boston planning map is well lined up with your Boston border gis file we will
       save it as a .TIF image so the coordinate information will be permanently stored in the header
       of the TIF file. (This is what is known as a „geotiff‟)
   9. click Georefencing -> rectify
   10. Save Rectifybostonplanning.tif to your F:\usertemp\arcgis2\ folder
   11. Add Rectifybostonplanning.tif to your project and make sure it looks ok

To convert this raster to a vector file you could use the extension „ArcScan‟. ArcScan has limited
functionality and is very particular about how the files are set up so we will not get into it in this
workshop. More information is available in the ESRI Desktop Help.

After you georeferenced your map you discovered there is a BRA planning districts file that shows
the same boundaries and is in vector format on the MIT Geodata Repository, so you don‟t need to
digitize it by hand (which can be very time consuming).

Clear your ArcMap project and turn off the georeferencing toolbar.

Mapping tabular data in a GIS
You found a list of movie theaters in the boston area and their addresses on the internet. You then
saved the addresses as a MS Access database (because this format works more reliably than .txt and
.dbf in ArcGIS). You are going to map them by geocoding.

Geocoding
Geocoding lets you associate a table of addresses with a GIS street file to create point locations on a
map.
                                                                                                         3
Create a new Address Locator file in ArcCatalog:
   1. Open ArcCatalog
   2. Right Click ->new -> address locator




          a. Choose US Streets (File)
                i. (File is for shapefile, GDB would be for geodatabase)




          b. Name the Address Locator „boston‟
          c. In the Primary Table: Reference Data: navigate to
             f:\usertemp\arcgis2\boston_streets.shp.
                  i. The software will fill in the rest of the fields for you with this file because this
                     file‟s source is ESRI‟s streetmap USA. If you are using another file, such as

                                                                                                            4
                      free streets available from the US Census Bureau, you may need to associate
                      the appropriate field names from the file with the appropriate section of the
                      Address Locator.




   Note: StreetMap USA contains detailed streets for the entire US and has Address Locators
   already created. StreetMap USA is available on disk as part of the ESRI Data and Maps Dataset
   in the GIS Lab: http://libraries.mit.edu/gis/data/findingaids/index.html#esri (It is not currently
   available on the MIT Geodata Repository due to its very large size.) For more sources of street
   information check out the transportation page on the MIT GIS Lab website:
   http://libraries.mit.edu/gis/data/themes/transportation.html
            d. Click ok
   3. Right click the “boston” address locator you just created and select copy
   4. Navigate to the f:/usertemp/arcgis2 folder and right click to paste the address locator in your
       folder, so it will be really easy to find later.
   5. close ArcCatalog

Geocode in ArcMap:
In ArcMap
    1. Add f:\usertemp\arcgis2\boston_streets.shp to your project
    2. Add f:\usertemp\arcgis2\movies.mdb -> double click and select the movies table
    3. right click the movies table to open it and note there is a field named „name‟ and a field
       named „address‟
    4. On the top menu bar in ArcMap click Tools -> geocoding -> geocode addresses

                                                                                                    5
5. In the “choose an address locator” dialog box: click add -> navigate to your folder -> select
   the boston address locator




6. click “add” then click “ok”
7. In the Geocode Addresses dialog
       a. Address table: movies
       b. Address input fields: address
       c. Save as type: shapefile, in the folder:
           f:\usertemp\arcgis2\movies_geo.shp




       d. Click ok
                                                                                                   6
       Note: the geocoding options let you adjust things like how similar a record must be to an
       address for it to be called a match

8. Note that 3 addresses matched with a score of 80-100 and 1 matched with a score less than
   80. Check which one had a lower score by choosing the radio button marked „addresses with
   score < 80‟ in the rematch criteria. Then click „match interactively‟




9. The Simons Imax does not have an address number on the central wharf. Since ArcGIS
   wasn‟t sure which of the 2 address ranges to match to, it chose one of the two addresses that
   tied and gave it a lower score matching score. One could modify the address in through this
   dialog box to look for other matches. You could move this “Interactive Review” dialog box
   to the side and click on the different addresses to see where they are highlighted on the map.
   They are right next to each other, so for this exercise we will accept the chosen address
   record.




                                                                                                    7
10. Click close and click done
11. You noticed that the location of the Loews Boston Common mapped in Brighton, instead of
    at the Boston common. You want to review the other address listing options to find the one
    that is on the Boston Common. Click Tools -> Geocoding -> Review /Rematch Addresses-
    >Geocoding Result: movies_geo




                                                                                                 8
12. In the Review/Rematch Addresses dialog box check “All addresses” in the Rematch Criteria
    section.
13. Click “Match Interactively”




                                                                                           9
   14. Click on 175 Tremont and look at the 90 different candidates. Try clicking on the different
       addresses and see where they are on the map highlighted in yellow.
   15. 175 Tremont was selected as the best match on the Tremont street in Brighton because there
       is no 175 address on the Tremont downtown in this street layer. This is an error in our streets
       layer. You can select 173 or 176 Tremont, which you know aren‟t the actual addresses of the
       theater, but show up close enough on the map.




Mapping x, y data
You found a file of schools and their locations listed by latitude and longitude that you now need to
map.

Your x, y data can be latitude and longitude or another coordinate system – make sure you define it
correctly.

   1. Add the file b_schools_xy.dbf to your ArcMap project.
   2. Open the table (right click the file name -> open)

                                                                                                    10
   3. Look at the coordinates and notice they are in Latitude, Longitude.
   4. Click Tools -> add x,y data
   5. Make sure the table you are reading is b_schools_xy.dbf . Use the field named longitude for
      your x data and latitude for your y data.
   6. To define your spatial reference click Edit-> Select -> Geographic Coordinate Systems ->
      World -> WGS 1984.prj
          a. This type of information should typically be included in the metadata (descriptive
             information) for a file. If you are working with data from a GPS unit WGS84 is the
             most commonly used spatial reference system.




   7. Click ok to create b_schools_xy Events
   8. to make this layer permanent export it as a new shapefile (right click b_schools_xy Events ->
      data -> export data
   9. save the file as f:\usertemp\arcgis2\boston_schools.shp
          Note: a common error is to switch the x and y coordinates or leave out a – where
          necessary. These errors will map your data in the wrong part of the world. X,Y data must
          be in decimal degrees (decimal degrees = degrees + minutes/60 + seconds/3600)

Project your movie theater data
The file of movie theater locations you geocoded is unprojected and set to Geographic Coordinate
System (GCS), North American Datum 1983. We can check this by right clicking the file name and
selecting the source tab, where it displays the data source information.




                                                                                                11
We want to project this file to NAD_1983_StatePlane_Massachusetts_Mainland_FIPS_2001 (one of
the most common projections used for the Boston area), so that our next step of calculating the
distance between the movie theaters will be more accurate and so the units will output in meters
instead of decimal degrees!

1. Open ArcToolbox




2. Within ArcToolbox navigate to Data Management Tools -> Projections and Transformations ->
Feature -> Project then double click




                                                                                               12
3. Set the “Project” dialog box to match the picture below:
In the “Output Coordinate System” box navigate to: Projected Coordinate Systems -> State Plane ->
NAD 1983 -> NAD_1983_StatePlane_Massachusetts_Mainland_FIPS_2001
Unfortunately ESRI was not very explicit - the NAD 1983 will set the units to meters, NAD 1983 will
set the units to feet.




                                                                                                 13
Notice that I made my output file name include an abbreviated version of the projection I used so it
will be easy to keep track of later.
    4. Click ok
    5. Upon completion, click close
    6. Repeat this process to project the school data to match the movie file.
            a. Note for the schools you will need to choose a „Geographic Transformation‟ because
                it is in WGS84 and you are changing datums to NAD83. The first transformation
                listed will be fine. For more information about transformations you can look at the
                ESRI desktop help menu – index search “on transformation methods, (see equation-
                based methods)”

Calculate the distance between all the schools and all the movie theaters
In ArcToolbox
    1. Navigate to Analysis Tools -> Proximity -> point distance




                                                                                                  14
   2.    Set the “input features” to: movies_geo_spnad83_meters
   3.    set the “near features” to the school file
   4.    Set the “output table” to: F:\usertemp\arcgis2\movie_school_distance.dbf
   5.    Click ok
   6.    When completed click close
   7.    Switch to the “source” tab at the bottom of the table of contents to see
         movie_school_distance.dbf
     8. Right click movie_school_distance.dbf to open and explore it
Note the column names: the “INPUT_FID” column records match the unique FID records of the
input file, which was movie theaters. The “NEAR_FID” column matches the unique FID records of,
which was schools. The distance column is in the units of measure of the files (it is best to set all
files to the same unit of measure before running this tool, so there is no confusion.)




Which schools and movie theaters are closest to each other?

Note: If you want to calculate the distance between two points along a road (instead of the straight
line distance we just calculated), then you would use the Network Analyst Extension. Learn more
about using Network Analyst in the IAP session later this week:
http://libraries.mit.edu/gis/teach/iap2007.html

Spatial Join and Dissolve to determine the density of schools per neighborhood
We want to choose the planning district that has the highest density of schools. When we open the
planning districts file we see that area is already calculated for us. We open the file properties and
check the source tab to see what units the file is in. We find that it is in meters. (The unit of

                                                                                                     15
measurement for length, area and perimeter will be the same as the units of the file at the time the
calculation is done. If the units of the file are changed the area, length or perimeter will not
automatically change – they would need to be re-calculated.)

From the MIT Geodata Repository add the BRA planning districts
       Basic search: boston
       Select the BRA planning districts (us_ma_boston_g45plnng_2000) and it to your ArcMap
       project

We want to find out how many schools are in each neighborhood and will use the spatial join tool to
do this.
    1. Right click sde_data.us_ma_boston_g45plnng_2000
    2. Choose joins and relates -> join
    3. Choose „join data from another layer based on spatial location‟
    4. Join with boston_schools
    5. And choose the 1st option – Each polygon will be given a summary…
    6. Name the file f:\usertemp\arcgis2\plan_school.shp

Some neighborhoods are represented with more than one polygon in the planning file. We only want
to look at one record per neighborhood, so we will dissolve the file, based on neighborhood name.
    1. ArcToolbox -> Data Management Tools -> Generalization -> Dissolve




                                                                                                       16
    2. Input features: plan_school
    3. Output feature class: plan_school_Dissolve.shp
    4. Dissolve Fields (this will be the field the file will be dissolved by)
         name
         Statistics Field: count
         Statistics type: sum
         Statistics Field: us_ma_bost (this is the area but the field name got cut when we did the
spatial join)
         Statistics type: sum
(note: any field you want to summarize must be numeric)




                                                                                                     17
Calculate the density of schools
   1. Open the attribute table of plan_school_Dissolve.shp
   2. Click options -> add field
   3. Use the field name school_den (since there is a 10 character limit for field names in ArcGIS)
   4. Type: double
   5. Right click the field name school_den to field calculator
   6. In the field calculator enter the formula: [SUM_Count_]/ [SUM_us_ma_] *1000000
   7. Right click the field name school_den and sort

Another note about units: you could check the units of the file the way you did for the movie theaters
(properties dialog box -> source tab). This will tell you the current coordinate system and units of
                                                                                                    18
measure of the file (which is meters for the plan_school_dissolve.shp file). The area column was
previously calculated. The units of a calculated column do not automatically change if you reproject
your data into a different set of units. If you change the file to feet and you want your area
calculated in feet you should recalculate it. It can also be a good idea to recalculate the area if you
are not sure what units the area was calculated in. Updating the area of the file is a simple field
calculation (right click the column name to compute area in, select calculate values, then look up the
formula for calculating area in using „help‟ in the field calculator dialog box.

The elevation file listed in the next section on creating contours is available in the GIS lab as part of
the “Boston area LIDAR data from MASSGIS”. More information about this file and other
elevation data sources can be found at: http://libraries.mit.edu/gis/data/themes/elevation.html

You then do another search in the MIT geodata repository on „boston‟ and find an „open space‟ file
and an „MBTA lines‟ file. You see Back Bay is serviced by the MBTA green line and notice the
Boston Common, Public Garden, Charles River Reservation and Commonwealth Avenue Mall
provide a lot of open space in the area. There is no existing movie theater in Back Bay and it meets
the other criteria listed earlier: the neighborhood chosen should have a high density of schools, be
accessible by the T, so the kids can easily get to it, preferably not have other movie theaters nearby
to compete with, and it should have open space nearby for the kids to try experiments after learning
about new ideas at the ET.

Create contour lines to help choose an area that isn’t too steep for your new building
    1. Add F:/usertemp/ArcGIS2/bare237898.tif to ArcMap
    2. In the main ArcMap toolbar area right click and turn on the 3D analyst extension
    3. In the main ArcMap toolbar area click Tools -> Extensions and make sure there is a check
       mark next to 3D analyst (if the extension is not activated then the tools will be greyed out and
       inaccessible)
    4. On the 3D Analyst Toolbar Select: 3D Analyst -> Surface Analysis -> Contour
    5. Change the contour interval from 1 (meter) to 5 (meters) (The way we know the units of the
       intervals is because we figured out in advance that this Digital Elevation Model is in meters).
    6. Set the “output features” to create a new file in your F:/usertemp/arcgis2 folder. (When
       naming contour line files it is helpful for me to include the intervals in the file name, so this
       file I would name “cont_5m.shp”)
    7. The areas that are steeper are the areas that have contour lines closer together. The Back
       Bay area is not steep, so we are not concerned about building our new site on a steep slope.
Note: The Digital Elevation model session offered later today will go much more in depth about
using DEMs. More information is available at:: http://libraries.mit.edu/gis/teach/iap2007.html

We are interested in existing buildings outlines for Back Bay, for our 3D model. Do another search
in the MIT Geodata Repository on boston and add the “Boston Metro, MA (Building Footprints and
heights from LIDAR, 2002). Select the Back Bay/ Beacon Hill polygon, and do a “select by
location” the same way you did in the ArcGIS 1 exercise:
http://libraries.mit.edu/gis/teach/iap07/arcgis1_iap07.html.




                                                                                                       19
Once you have selected the building footprints for Back Bay/ Beacon Hill right click the file name ->
click data -> export data, and choose only the “selected features” for export to the new dataset.
Name the new file “bldgs_bb.shp”.




                                                                                                  20
Creating and Editing a new shapefile
You are going to create a new building for your site, in shapefile format.
Create a new shapefile in ArcCatalog
1. In ArcCatalog
2. Navigate to F:\usertemp\arcgis2\ -> right click in the folder -> select “new” -> “shapefile”




3. Set your shapefile to match the information below:
        Name: site
        Feature type: polygon
        Spatial reference: edit -> import -> movies_geo_spnad83_meters.shp
        (This will make your file the same as the movies_geo_spnad83_meters.shp, which is
        NAD_1983_StatePlane_Massachuesetts Mainland, units = meters)




                                                                                                  21
4. Click ok
5. Close ArcCatalog

Edit the shapefile in ArcMap
In ArcMap
       1. Add the high resolution aerial photo file f:\usertemp\arcgis2\BackBay.tif (you will use
           this as a background layer to trace a building)
       2. Add the empty shapefile “site.shp” to your ArcMap project
       3. Right click in the toolbar area of ArcMap and turn on the editor toolbar
       4. Click editor -> start editing
       5. Choose the F:\usertemp\arcgis2\ folder to edit in
       6. Choose a site in Back Bay to build your new building
       7. Start by selecting the pencil on the editor toolbar, have task set to „create new feature‟,
           have target set to „site‟
               Each click creates a new vertex until you double click to close the polygon
               Right click and explore the options that appear such as setting a specific distance,
               angle or location
       8. Modify your building by clicking on the black arrow to the left of the pencil, change your
           task to modify tasks -> modify feature
               this will enable you to do a variety of things including:
               move each vertex individually
               add or delete vertices
               move shapes around
               copy and paste shapes
       9. Once you have created your new site you will want to update your attribute table and add
           a name for it and the number of stories so it can be modeled in 3D.

                                                                                                  22
       10. Open the attribute table for site.shp
       11. Note the options -> add field is greyed out. This is because you are in an edit session.
       12. On the editor toolbar click editor -> stop editing and save your edits
       13. In your attribute table click options -> add field
       14. Name your field „name‟ and choose type: text
       15. Create another field with the name bldg_hgt and type: integer
       16. Start an edit session again for site.shp from the editor toolbar
       17. In the field name, type Educational Theater (ET)
       18. In the field bldg_hgt type 300 (The tallest part of the John Hancock center lists with a
           height of 224 feet – this way your site will be taller than the tallest building in New
           England!)
       19. Stop editing your file and save your edits
       20. Save your arcmap document and close it.

Create a 3D model of Back Bay
From the Start Menu open: All Programs -> ArcGIS -> ArcScene
Add bldgs_bb.shp, BackBay.tif, bare237898.tif, and your new site.shp
Bare237898.tif is a high resolution (0.5 meter) digital elevation model (DEM), which was derived
from LIDAR data. You can use this file for the base layer for your model, but it is larger in size and
could slow things down. It is a good idea to have the computer create a pyramid layer for this file
due to its larger size. You can add the dem to your scene, then make it not display, but still use it as
a base layer so things will refresh more quickly.

Extrude the buildings and your site so the tall buildings are distinguishable from the short
ones.
   1. Right click on the bldgs_bb.shp and open it‟s properties
   2. choose the extrusion tab
   3. click “Extrude features in layer”
   4. click on the calculator to bring up „expression builder‟ window and double click on ROOF
   5. click ok
   6. click ok




                                                                                                      23
   7. Next extrude your site.shp by the bldg_hgt column.
   8. navigate the scene to identify buildings you are familiar with, such as the Prudential and John
      Hancock buildings

Drape the buildings and aerial photo over the DEM
   1. Right click the bldgs_bb.shp -> select properties
   2. On the “base heights” tab click the radio button to “obtain base heights for layer from
      surface: F:\usertemp\arcgis2\bare237898.tif”




                                                                                                  24
3. Repeat the process for setting the base heights for your site, and the BackBay.tif image.

Changing the vertical exaggeration
  1. In the main ArcScene menu select View-> Scene properties
  2. Change the vertical exaggeration of the scene from “none” to “calculate from extent”
  3. Click ok and look at the changes
  4. Repeat this step and this time use a vertical exaggeration 10 times the amount automatically
      calculated and notice the difference

Additional notes:
You may have noticed the BackBay.tif image looks much more grainy than it did in ArcMap. The
default rendering in ArcScene is lower so things can draw more quickly. You can adjust the
rendering
        Right click BackBay.tif -> properties
        Choose the rendering tab
        You will find options for visibility, effects and optimization on this tab
The option to make your layers partially transparent is on the display tab.
ArcScene has animation tools and lets you create movie fly throughs. Be aware movie files can
grow quickly in file size.



                                                                                                25
Note: A variety of things will take up more memory and make ArcScene work more slowly. A few
common examples include: making the ArcScene display larger, using large files, changing the
rendering to make the picture look more clear.




                                                                                               26

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:106
posted:4/29/2010
language:English
pages:26