How to output to a table a specified attribute from selected polygons and the source layer's line feature name or ID that intersects each selected polygon? Basically trying to get a table that lists each well and the expiration dates for each leased parcel a well crosses.
1 Answers
You'll want to perform an Overlay operation on your two layers.
Intersect and Union are Overlay tools that should get you a set of well lines that have the attributes of their overlaid polygons. Identity is also an option if you have an Advanced license, and is probably the most suitable for your end goal. Basically you want to cut up the well lines into segments for each polygon they fall within so you can see the expiration date attribute of the polygon as part of the line's attributes. Spatial Join is another option, though it might be a bit messy in this particular use case.
Note that Intersect only returns areas of overlap, Union returns all areas from both layers, and Identity will return all areas from one layer but cut up according to the other. The attribute format/output from each tool varies and one may better suited to your problem. All three should respect a selection, meaning if you select a group of polygons before running it, the tool will only take those leased parcels into account and not any others.
You'll end up with multiple lines for each well ID, one for each parcel. The attribute table may be sufficient for what you want, or you may have to play with some formatting depending on how you want the list to look. Summary Statistics, using well ID as a case field might help simplify down the table. There's also the Pivot Table tool (if you have Advanced), or the data could be taken into Excel to use that software's Pivot too. Those are covered at the following two questions:
Getting a table with one row per well and a bunch of attribute fields for each expiration date in ArcGIS might be more involved/messy/require code or calculations/time consuming than just using Excel to simplify and format the table (you can export the attribute table to a csv to bring into Excel and go from there).