I have two shapefiles of NYC--one of city council districts and another shapefile of the census blocks inside NYC. I want to merge these two shapefiles so that I can see what blocks lie inside of each census district in NYC.



Ideally, I want to merge them in a way that results in a shapefile with an attribute table that has both the blocks and districts listed. Here are the current attribute tables:

block attributes

district attributes

When I tried to simply merge them using vector>data managementment>merge vector layer I get a shapefile that includes both geometries, but only displays districts, and the resulting attribute table is full of null values.

Here is that attribute table:

enter image description here

1 Answer 1


The simplest would be a spatial join, Vector->Data Management Tools->Join Attributes by Location. I think this would accomplish your needs. The information you want can be seen by using the Identify Tool, or the Attribute Table, or by exporting a new layer with the attributes you want.

Another option is either Intersect or Union. This is a bit messier and would probably need some cleanup to deal with sliver polygons, etc. As a secondary action Dissolve would clean it up if you want to simplify them afterwards, but I'm not sure this is what you are looking for.

  • The spatial join worked perfectly. Thank you so much! I'd been tearing my hair our for a few days. Commented Nov 19, 2021 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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