I'm trying to intersect the shapefiles for US congressional districts and US counties. I can intersect manually (Vector->Geoprocessing Tools->Intersect) or with python (
processing.runalg('qgis:intersection', input, input2, output)). Here's a picture of my goal:
My problem is that my output file seems to have rows for each boundary intersection, eg. between the left triangle and the square. I get duplicates in the output file, where the area of the intersection is really tiny, and sometimes a county has the state name of its neighboring state (with which it shares a border).
I don't want to keep line intersections like this, only the polygon intersections. How can I do this in QGIS?