1 / 15

Fun with Spatial Joins

Learn how to join two tables based on spatial relationships, such as features inside another or features closest to each other. This lecture covers both inside and distance spatial joins with examples using geology wells and hospitals. Understand the importance of choosing the right projection and cardinality for accurate results.

debrat
Download Presentation

Fun with Spatial Joins

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mini-lecture on a different type of join. • Join two tables based on a common spatial relationship • One feature inside another • One feature closest to another Lecture 6: Fun with Spatial Joins Please note that portions of the material in this lecture come from Maribeth Price, author of your text.

  2. Spatial join (inside)(what kind of geology is present where I have wells?) Join each well record to the record of the geology polygon that it falls inside.

  3. Spatial join (distance)(what hospital is closest to a county?) Join each county to the hospital that is nearest it. Each county features gets name of closest hospital and the distance.

  4. Distance join units The source data was in a GCS with units of decimal degrees. • Distances are given in stored map units • Decimal degrees cannot be easily converted to miles or km because the conversion factor varies with latitude • Better to use a projected coordinate system…

  5. Using a GCS or distorted projection may yield incorrect results. Setting the data frame CS is not enough—the source data must be in the right projection. A B B A C C Distance joins and the CS Distance join with GCS source Distance join with UTM source Use source data with a projection that conserves distance!

  6. Spatial Join Cardinality The Rule of Joining applies to spatial joins also! • Simple joins • One-to-one or many-to-one cardinality • Summarized joins • One-to-many or many-to-many

  7. Simple Summarized Inside Schools  Counties Counties  Schools How many schools in each of the counties? Which county is each school in? Distance Hotels  Attractions Hotels  Attractions Which attraction is closest to each hotel? How far is it? How many attractions are closest to each hotel?

  8. Summarized join Destination table is counties. Source table is schools. Output table gives total schools located in each county. Count field is always generated automatically. User can optionally choose a statistic to calculate, for example, to sum the total number of students in each county.

  9. Distance joins only Simple? or Summarized? Point to point joins Depends on the question being asked… Which attraction is closest to each hotel? Enforces a one to one cardinality… How many attractions are closer to one hotel than another? One to many cardinality…must use summarize

  10. How to join Right-click destination table Set Join type to spatial Choose source table Choose join type Specify output file

  11. Setting up a join • Sketch the layers • How do I want the output layer/table to look? • Which is the destination layer? • Is this a distance join or an inside join? • What is the cardinality? • Do I need a simple join or a summarized join?

  12. Example #1 • Find all congressional districts that have had more than 10 earthquake deaths. • Which is the destination layer? • Is this a distance join or an inside join? • What is the cardinality? • Do I need a simple join or a summarized join?

  13. Example #2 • Develop a pollution risk index for rivers based on the total number of people in the adjacent counties. • Which is the destination layer? • Is this a distance join or an inside join? • What is the cardinality? • Do I need a simple join or a summarized join?

More Related