0

My real-world problem is that I want to combine state House and Senate legislative districts so that a user can pick a region (not a point) on a map that is included in both their House and Senate districts, to identify who their legislators are.

I have shapefiles for both House and Senate districts. I'm looking for a library that will, given the two sets of shapes, emit a minimal set of shapes for which, by selecting one, a user may identify both their House and Senate district. I can imagine how to do it myself by doing lots of intersection and difference operations, but also can imagine problems that others hopefully have solved.

I'm working in Javascript, have looked in turf.js, and not found this operation there.

My first problem is that I can't search for something to do this operation because I don't know what it's called.

Does it have a commonly-used name?

2

I believe you are looking for a Union tool. This would create a new dataset that preserves the geometry and attributes of the inputs. Areas of overlap would have attributes of both datasets. For ArcGIS, see https://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/union.htm. I don't know enough Javascript to be able to help you more specifically, though.

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.