Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
When you say I'm new to programming, does that mean that you don't have any experience at all? Rather than write the script for you I can give you some pointers, but I need to know that you understand basic control structures and such. An explanation of what you're trying to accomplish would be helpful; it seems like copying shapefiles that intersect into gdb is somewhat arbitrary. –  Roy May 16 '12 at 17:33
add comment

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks a lot Roy. This is definitely something that can benefit me. –  Visceral May 16 '12 at 17:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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