Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written a script which selects all files that are within or subset by an area of interest polygon. This works fine but when the file list it's working has more than 150 records it stops comparing the extents after the 150th file. Does anyone know why?

the log files and script are here in googledocs as they are very long.

FileList = is a log of all 450 files which the program uses to iterate through. This is generated by FileList = arcpy.ListRasters()

NoSubset – is a log of files which aren’t subset by the AOI. Note it finishes at 150

Success-Subset – is a log of all files that subset –note nothing beyond file

Success-Within – is a log of all the files within the AOI. 20 files are logged when there should be 54.

The ESRI log clearly shows that it stops processing beyond a certain point. I have included the tbx in the zip.

Any suggestions for improving the coding would be appreciated as well. Note that I have turned the copy file and subset file functions off and am just using the generated csv's (link to files) rather than creating gigs of new files.

share|improve this question
Just a suggestion... Ignore your complete script for while. Start again and write a completely minimal test script that demonstrates the problem. You may even figure out the answer yourself whilst doing so. But you are FAR more likely to get an answer if people don't have to puzzle through 100+ lines of unrelated code. – Luke Aug 26 '11 at 5:40
thanks, the issue with this is that the errors come while trying to compare the extents, and the rest of the code is necersary for this. – GeorgeC Aug 26 '11 at 7:07
up vote 1 down vote accepted

Figured out that it was an issue with projections. It's all fine now. Give me a shout if anyone would like the code.

share|improve this answer

Your Answer


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.