Join by Location (aka Spatial Join)

Overview
A common GIS task is to join the attributes from one spatial data layer to another. 

In this example we will join attributes from a polygon layer to a points layer, based on which polygon contains the points.
The following exercise uses data from:
1. Workshop Data 2015-03 PART THREE Taiwan
Prepare Target Points Layer
  1. For this exercise, we'll use a set of points showing power plant sites in Taiwan from the CARMA database
  2. Add Vector Data, set UTF-8 encoding, and browse to part_three/Taiwan_CARMA_Xian80.shp
  3. Right click on the Layer in the Layer List and the General tab, to check the Coordinate Reference System (projection) for this layer
  4. Note that it is in Projected CRS, EPSG:2333. Cancel the Properties Dialog window.
  5. Target Points layer should be ready for the join
Prepare Join Layer
  1. Add Vector Layer and browse to the part_three/tw_pop_xian80.shp layer, encoding = big5
  2. Click on the tw_pop_xian80 layer in the layer list and drag it below the Taiwan_CARMA layer. Now the points should be on top of the polygons in the Map View
  3. Right click on the tw_pop_xian80 Layer in the Layer List and the General tab, to check the Coordinate Reference System (projection) for this layer
  4. Note that tw_pop_xian80 is in the Projection: CRS EPSG 2333, Xian 1980 Zone 19
  5. This is the same projection as the target layer, so we can proceed with the Spatial Join
  6. If the Join layer was in a different projectiion we would need to reproject the join layer first, as illustrated in the following step
Reproject Join Layer
  1. Add Vector Layer and browse to the part_three/tw_pop_xian80.shp layer, encoding = big5
  2. Click on the tw_pop_xian80 layer in the layer list and drag it below the Taiwan_CARMA layer. Now the points should be on top of the polygons in the Map View
  3. Right click on the tw_pop_xian80 Layer in the Layer List and the General tab, to check the Coordinate Reference System (projection) for this layer
  4. Note that tw_pop_xian80 is in the Projection: CRS EPSG 2333, Xian 1980 Zone 19
  5. This is the same projection as the target layer, so we can proceed with the Spatial Join
  6. If the Join layer was in a different projectiion we would need to reproject the join layer first, as illustrated in the following step
Proceed to Spaital Join Instructions