1

I have a shapefile of the 8830 election precincts in Texas as of the 2016 election. I also have shapefiles of the Texas US House districts and the Texas Senate and House districts. I want to generate tables that match the election precincts with the districts that they are contained in.

Using the functions available (Within, Contains, Touches, etc) all see to either produce too many rows, or too few. One problem I identified is when an election precinct is matched with a district because they share a border, although the election precinct is in another district. As far as I know, no election precincts cross any district border.

I got this far using QGIS and SpatiaLite. I'm a newbie at GIS. This is my first project. Apologies if I have left out any critical information.

4
  • 1
    It sounds like the shared boundaries aren't a perfect match. There are two ways to try to avoid this issue: Buffer the House Districts by a negative value to shrink them to totally within gis.stackexchange.com/questions/61284/… or generate centroids (points) gis.stackexchange.com/questions/45243/… and intersect these to create your overlap table. Jun 12 '17 at 3:17
  • I wanted to avoid centeroids due to considerations with using other vector layers for additional analysis (e.g. city limits). I tried setting the election precincts to a -15 buffer. Now I have election precincts with no geometry that seem to be falling on the House District boundaries.
    – jpolache
    Jun 16 '17 at 20:19
  • Try the centroids, just for this one operation. If your table doesn't have a unique id (not FID) then it would be best to add one, create centroids and intersect then attribute join the unmodified polygons to their matching centroids by unique id and field calculate the field... now you have unmodified geometries intersected without ambiguity. Jun 18 '17 at 20:36
  • I tried again using a -10 for the election precincts. I turned up 4 precincts that has errors I was able to correct editing by hand. I then used that "unbuffered" layer to do a "contains" comparison with the txsenate layer. This returned a result that had about 30 precincts that had invalid geometries. All but one had registered voter counts of 0. The other one had a count of 150, but I could not find in on any map, so I wrote it off as invalid. The "contains" query seems to be accurate for the remaining 8804 precincts. So it looks like I have my solution.
    – jpolache
    Jun 19 '17 at 23:03

Your Answer

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

Browse other questions tagged or ask your own question.