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.

  • 2
    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. – user2856 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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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