Eyes in the Sky II > GIT Web Course > Module 2 > Week 7 > Getting to Know Spatial Querying in GIS > Getting to Know Spatial Querying in My World

Week 7: Investigating Earthquake Activity

top of page

Getting to Know Spatial Querying in My World

So far in this course, you have practiced querying, classifying, and symbolizing data. All of these efforts helped you to sort and organize the data displayed on the map so that you could look for relationships and patterns in data. Now you will use spatial and database querying to sift out even more details about the earthquake events of 2009.

top of page

Launch My World and Open the Earthquakes Project

My World Icon



top of page

Add Earthquake Data From 2009

If you worked through the "Introduction to Mapping Tabular Data" section, then you can use the Add Layer from File button to bring up the previously mapped earthquake data. Otherwise, you'll need to use Import Layer from File to map the 2009 earthquakes.

Choose ONE of the following two options to add 2009 earthquake data to the map.
top of page
  1. Add 2009 earthquake data as a shapefile

    • Click the Add Layer from File button add layer from file .
    • Navigate to the EarthquakesMW folder. (Path: Applications/My World /data/EarthquakesMW)
    • Choose the 2009EQ.shp shapefile that was created and saved in the previous section. My World will ask if the file is in the correct projection, it is so click OK.
    top of page
  2. Map 2009 tabular earthquake data by longitude and latitude coordinates

  3. To map the 2009 earthquake events using Longitude and Latitude coordinates:

    • Choose File > Import Layer from File. add layer from file Single click to select the file, 2009EQ.csv and then click Open 2009EQ.csv. (Path: Applications/My World /data/EarthquakesMW/csv_files).
    • In the Import Text Data dialog window check that the fields for your data are set to display Latitude and Longitude properly. It is set up correctly, so click OK. My World GIS imports the tabular data, places it on the map and saves a copy in the My World "data" folder on your computer.
    • The new data layer should now be visible on the map and in the Layer List. Drag it to the map and make it the Active layer and click the Zoom to Active Layer zoom to active layer button in the toolbar.
    • Edit the appearance of the layer to display medium-sized blue circles.
    1. Choose File > Import Layer from File..
      file import layer from file
    2. Locate the .csv file in the un-zipped folder you that downloaded. Single click to select the file, 2009EQ.csv , and then click Open.
      locate file
    3. In the Import Text Data dialog window check that the fields for your data are set to display Latitude and Longitude properly. It is set up correctly, so click OK. My World GIS imports the tabular data, places it on the map and saves a copy in the My World "data" folder on your computer.
    4. .
      check lat long
    5. Save the newly imported csv file as a new file.save as new file
    6. Save it to the EarthquakesMW folder.
      16 save as new file 2
    7. Edit the appearance of the layer to display medium-sized blue circles.
      symbolize as blue circles

The 2009 Earthquakes will now be displayed on the map.


top of page

Think Spatially about Earthquake Data

Begin by brainstorming questions that could be asked when thinking spatially about earthquakes. Some examples of questions you might ask:

top of page

Carry Out a Simple Spatial Query

On September 30, 2009 a Magnitude 7.5 earthquake struck Sumatra, Indonesia. The quake originated at a moderate depth of 81 kilometers. At the surface, over 1100 people were killed and 2650 buildings were damaged in the earthquake and subsequent landslides. Power and communications were disrupted. The earthquake was felt over a wide area and produced a small tsunami.

Imagine that you worked for an international disaster aid organization, and wanted to quickly identify Indonesian World Cities that might have been close enough to the quake to need your help.

top of page

Select the Sumatra earthquake

The Sumatran earthquake should be highlighted and centered on the map.


top of page

Set a buffer distance

A buffer is a zone drawn around a given map feature or features, measured in units of distance or time. A buffer can be drawn around points, lines, or polygons as well as groups of pixels in raster data. Buffering, or the process of creating a buffer, is a commonly used proximity function. Once the buffer is drawn, it defines what is inside or outside of the given space.

Buffering involves complex mathematical computations, which can use a lot of computer processing power and time. It is best to buffer simpler shapes rather than highly complex ones, such as the Louisiana Soils or Elevation > 2km layers.


13 buffer dialog window

To create a set of concentric buffers around the earthquake:


top of page

Use the results to answer a spatial question

Now, you'll go back to your original scenario of identifying major Indonesian World Cities that might be affected by the earthquake. To do this, you will add a World Cities layer and use the Select ... > by Spatial Relationship ... > by Containment option to select any World Cities within each of these radii.

  1. In Construct mode, select the World data library to access a World Cities layer. Click and drag the layer to add it to the map.
  2. 15 drag cities to map
  3. Double click the World Cities layer and open the Edit Appearance window. Symbolize the World Cities as medium-sized red squares and close the Edit Appearance window.
  4. 16 edit appearance of world cities
  5. Switch to Analyze mode and select the Select... > By Spatial Relationship... > By Containment option.
  6. In the Analyze window, choose Select Records from: World Cities from the list of layers. Which are Completely Contained by Buffer of 600 miles of Sumatra Earthquake. analyze cities within 600 miles
  7. Accept the default results name and click the OK button. The World Cities within the buffer zone should be highlighted on the map.
  8. Click on the World Cities layer and open the Table of Layer. Scroll to the bottom of the table to find out how many World Cities were selected. In this case, 6 World Cities were selected.
  9. Return to Analyze mode and, change the Buffer Distance and repeat the procedure for 100 miles and again for 300 miles.

  • Distance within 100 miles - 1 city is selected.
  • Distance within 300 miles - 2 World Cities are selected.
  • Distance within 600 miles - 6 World Cities are selected.

Movie Icon

Click on the movie to start playing.

loading the player

Before going on, you'll need to clean house a little:

top of page

Carry Out a Containment Query

A containment query finds all the features within a given boundary, such as all of the Tamarix plants in the State of Arizona or all of the lakes in Canada.

How would you select all the earthquakes in a given country? For example, say you wanted to find all the earthquakes in Chile.

top of page

Locate and select Chile

You'll use the Find tool to locate and highlight Chile.


Use the Find tool to locate and highlight Chile.

  1. Make Countries the active layer. Open the Table of the Layer.
  2. Click the Find button find button to open the Search Layer Table. window.
  3. In the Find field enter Chile.
  4. Click the Find Next button. One record (Chile) should now appear in the highlighted on the table. Close the Search Layer Table window.
  5. 18 Find Chile
  6. At the top of the Table of Layer window, click the make Selection from Rows button, Enter the name for the new selection, "Chile" and click OK.
    19 make selection from rows
  7. The map will display Chile highlighted in yellow. Click the Zoom to Selection button to zoom in to Chile.
    20 chile selected and zoomed in



top of page

Set a buffer to select all the earthquakes within Chile

Now you will use a Buffer buffer icon to select the 2009 earthquakes that occurred in (or very near to) Chile:

  1. In the Analyze mode, choose Make Buffer Around...
  2. Create a Buffer of Chile that is 1 Mile Outside with interior . Select the Dissolve All Buffers radio button. Use the default Result name and click OK to make a new Buffer layer.
  3. The buffer layer of Chile's boundaries will be displayed on the map.
  4. Return to Analyze mode and select the Select... > By Spatial Relationship... > By Containment option.
  5. Choose Records from 2009EQ Which Are at Least Partly Contained By, Records in 1 Miles Buffer of Chile.
  6. Click the OK button. The 2009 earthquakes that occurred in or within 1 mile of Chile will now be highlighted on your map. To see them turn off the buffer layer and choose Color Selected Magenta in the Highlight Mode drop down menu.

top of page

Show the results of the spatial query

  1. Single click the 2009EQ at least partly contained by 1 Miles of Chile selection and open the layer's Table of Layer. Scroll down the attribute table. The selected records are highlighted in blue. How many records were selected?
  2. Result: 190 earthquakes are selected. (Hint: Look at the top of the attribute table window for the total number of records selected.)

    23 Table of Selected

Movie Icon

Click on the movie to start playing.

loading the player

Time to do housecleaning again before the final spatial query:



top of page

Carry Out a Proximity Query

Proximity is how close one object is to another object. In this case you will learn how to find all the earthquakes that are within a set distance of a given type of plate boundary.

top of page

Select features of interest (transform boundaries)

  1. Click and drag the 2009EQ layer below the Plate Boundary Types layer in the Layer List.
  2. Turn on and make the Plate Boundary Types layer active.
  3. Click the Analyze tab. Set up a database query to select the Transform boundaries.
    Whose: Margin Type matches Transform.
  4. Analyze Window
    25 boundary type is transform
    Map of results. 26 boudary type is transform on map


top of page

Set the buffer distance to select earthquakes that are within a specified distance

  1. In the Analyze mode, set the Select > By Spatial Relationship > By Distance.
  2. Select Records from 2009EQ that are Less Than 50 Miles from records whose Margin Type is Transform. Accept the default result name and click OK.
    Analyze window.
    27 distance query
    Results on the map, note the "Hide Unselected" option has been chosen to make it easier to see the location of the selected Earthquakes. You may also want to turn off the Plate Boundary layer.
    28 distance query results

top of page

Show the results of the spatial query

  1. Single click the 2009EQ layer and open the layer's Table of Layer. Scroll down the attribute table. The selected records are highlighted in blue. How many records were selected?
  2. Result: 671 earthquakes were within 50 miles of a Transform boundary. (Hint: Look at the top of the attribute table window for the total number of records selected.)

    29 query results table

Movie Icon

Click on the movie to start playing.

loading the player

top of page

Create and Explore More Spatial Queries

Practice spatial queries using combinations of select features, buffering, containment, and database queries
Try the following:
  1. Use the earthquakes layer and the Latitude and Longitude lines on the map to answer the question:
    Find all the earthquakes in the Northern Hemisphere.
    1. Use the Marquee selection marquee selection tool to drag a rectangular selection around the Northern Hemisphere. The Northern hemisphere will be highlighted yellow.
    2. Click the buffer button, set the buffer distance to 1 mile, and use the buffer to select the 2009 earthquakes from within this containment.
    3. Open the earthquakes attribute table. We got 4152 earthquakes selected, but your number may vary depending on where you defined the Northern Hemisphere.

  2. Use the earthquakes layer and a database query to answer the question:
    Find all the earthquakes of a Magnitude greater than 7.
    1. Click the Analyze tab to open the Analyze window. Choose Select by Value....
    2. Set up the following query statement: (Magnitude >= 7.0 ).
    3. Click OK.
    4. Open the earthquakes attribute table. We got 17 earthquakes of magnitude 7 or higher.

  3. Use the earthquakes layer and a database query to answer the question:
    Find all the deep earthquakes.
    1. Click the Analyze button to open the Analyze window.
    2. Set up the following query statement: (Depth > = 400 ).
    3. Click OK.
    4. Open the earthquakes attribute table. We got 234 earthquakes equal to a depth of greater than or equal to 400 km.

  4. Use the earthquakes layer and the plate boundaries layer to answer the question:
    How many earthquakes are there at each of the boundary types?
    1. Repeat the given in the example above, but change the initial data base query to (Margin Type matches 'Convergent' ) and (Margin Type matches 'Divergent').
    2. Result: 2708 earthquakes were within 50 miles of a Convergent boundary; 902 earthquakes within 50 miles of a Divergent boundary; and 657 earthquakes within 50 miles of a Transform boundary.

  5. Use the earthquakes layer and the World Cities layer to answer the question:
    How many National Capital World Cities were within 20 miles of an earthquake in 2009?
    1. If necessary, add the World Cities layer from the World Data Library.
    2. Open the attribute table of the layer, take a look at the Capital Field.
    3. Set up and execute the database query (Capital = 'Y'). Result: 164 World Cities are selected in this query.
    4. In Analyze mode set the select by Spatial Relationship > by distance to select records 2009 earthquakes that were within 20 miles of capital city.
    5. 21 earthquakes are selected pretty impressive.


top of page

Build Your Own Spatial Query and Take a Screenshot

Set up and execute a spatial query of interest to you. Use the data in the Data Library or add another "add event theme dataset" from the folder provided and use the new layers to complete a spatial query. Add other layers of interest to your map and symbolize the layers.

Take a screenshot. Post this screenshot along with a description of the layers you used and the query you made. This is the screenshot that is needed for your required weekly activity.

The EarthquakeMW Data Library includes many datasets to explore that don't follow the seismology theme. Here are just a few of the possible combinations there are many more!


top of page

Explore More If You Have Time

Take the time to read more about the additional latitude / longitude data sets on the website links where they were downloaded from. The following PDF contains more information (Acrobat (PDF) 48kB Mar25 10) and links to the data sets.

top of page

Resources


Sumatra Earthquake Information

top of page

Movies on this Page

top of page

How to download movies

top of page

Flash Video Versions

Download these versions to play on your computer. You'll need an appropriate movie player to view the file, such as Flash Player, Real Player (Mac / Win), or Adobe Media Player.

Movie Icon Performing a Spatial Query in My World

Movie Icon Performing a Containment Query in My World

Movie Icon Performing a Proximity Query in My World

top of page

iPod Versions

Download these version to play on your iPod or iPhone.

Movie Icon Performing a Spatial Query in My World

Movie Icon Performing a Containment Query in My World

Movie Icon Performing a Proximity Query in My World


« Previous Page      Next Page »