0

I have two polygon shapefiles (ShapeA and ShapeB) that share some areas. The shapefiles have one attribute in common (CODE) and I would like to do a selection, where I select all the polygons in one shapefile one by one and the corresponding polygon in the other shapefile based on same attribute value to get the intersection. Is this possible in some meaningful way using Arcpy?

intersecting areas

closed as off-topic by PolyGeo Sep 14 '18 at 6:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    When you say "intersect" do you mean spatial intersect? – Kirk Kuykendall Sep 10 '18 at 18:20
  • @Kirk Kuykendall, that's right, I want to spatially intersect say CODE_2 from ShapeA with CODE_2 from ShapeB. Does it make sense? – AtlantisNaranja Sep 10 '18 at 20:45
  • 1
    Please Edit the question in response to requests for clarification. It's not fair to those who would answer to need to mine the comments for critical information. Please also specify which GIS software stack you intend to use. – Vince Sep 10 '18 at 23:02
1

Here would be my workflow:

Merge your two polygons together into a single feature class.

Dissolve the merged feature class by field CODE. multi_part should be set to SINGLE_PART.

  • sorry for the delay, holidays in the middle. Thanks for this, that actually solved my query. – AtlantisNaranja Sep 20 '18 at 10:14

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