1

I'm a new Python student looking for some help regarding a homework problem. I need to analyze wells with each county in a state. So I have the wells shapefile and a counties shapefile for a state. Not sure how to combine the data so I have a list of wells in each county.

I thought I'd use following:

arcpy.MakeFeatureLayer_management("wells", "wells_lyr")
arcpy.SelectLayerByLocation_management("wells_lyr", "INTERSECT", "counties", "", "NEW_SELECTION")

But this does not give me the wells in each county. Hope this is not too vague; not looking for exact code, just the high level process.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Feb 4, 2016 at 16:21

1 Answer 1

4

The "Select Layer by Location" tool will select all wells in the existing layer that intersect any county. You're on the right track with the "intersect" operation: you'll find that you get the results you want by using the actual "Intersect" tool, which will create a new output feature class that contains attributes from both of the overlapping input features.

answered Feb 4, 2016 at 16:37
1
  • Perfect! I knew I was missing something simple. Commented Feb 4, 2016 at 17:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.