I have two polygon shapefiles. One is post codes, the other is provinces (in China). I'd like to add a "Province" field to the post code database (i.e. DBF file). This field would indicate the province for each post code. Note - post codes never cross province boundaries.

How would I do this? I'm using QGIS.


I would probably do the following:

  1. Vector > Geometry Tools > Polygon Centroids... on your Province shapefile.
  2. MMQGIS > Combine > Spatial Join on your Postcode and Province centroid layers and select which fields you want to keep in the output:

MMQGIS Spatial Join

Note that you may need to download/install the MMQGIS plugin from Plugins > Manage and Install Plugins....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.