[GIS] Testing if shapefiles intersect from a list using intersect: ArcGIS

arcpybasic-license-levelclipintersectionstatistics

I am new to programming and scripting in general, so please bear with me. I have generated a list of the location of all the shapefiles for my workplace. The files are all placed in folders, no geodatabases are used. I am trying to create a tool which queries which of the shapefiles intersect another shapefile. I would like to use the list as one of the inputs for the intersect parameters. I want to:

  1. Calculate the area of the intersected features
  2. perform stats
  3. If area of intersect > 0, convert the original data to feature layer
  4. clip the feature layer and save as new fc in target location.

I would really appreciate some python script examples as to go about this task.

I am using arcGIS 10 with an arcView license.

Thank you.

Best Answer

When I was picking up Python for ArcGIS, I came across the PSU Master's in GIS Open Courseware. This particular lesson covers spatial queries with feature layers. I highly recommend the whole course, though, it covers syntax, loops, conditionals, functions, cursors, etc.

The courses also include exercises (with answers & video explanations) so you can practice using the queries and update attribute tables with cursors.