Intersect does not fully process

المشرف العام

Administrator
طاقم الإدارة
Goal: Use python script to find overlap between various shapefiles in folders

Inputs: folder 1 with multiple shapefiles and folder two with multiple shapefiles

Method:

#First intersectionfolder1_shp1 = "C:\..."folder2_shp1 = "C:\..."arcpy.Intersect_analysis(folder1_shp1 + ";" + folder2_shp1,OutputFolder + "/Intersection 1.shp","ALL","#","INPUT")#Second intersectionfolder1_shp2 = "C:\..."folder2_shp2 = "C:\..."arcpy.Intersect_analysis(folder1_shp2 + ";" + folder2_shp2,OutputFolder + "/Intersection 2.shp","ALL","#","INPUT")#Third intersectionfolder1_shp3 = "C:\..."folder2_shp3 = "C:\..."arcpy.Intersect_analysis(folder1_shp3 + ";" + folder2_shp3,OutputFolder + "/Intersection 3.shp","ALL","#","INPUT")#Forth intersectionfolder1_shp4 = "C:\..."folder2_shp4 = "C:\..."arcpy.Intersect_analysis(folder1_shp4 + ";" + folder2_shp4,OutputFolder + "/Intersection 4.shp","ALL","#","INPUT")Problem: So you can see it's a pretty simple code, and it works. However, when I run it and I check the output shape files, some of the output files look like they haven't been fully processed. .

So I have to go back in and manually use the intersect tool on that particular intersection.

I use this code on many folders and there is no pattern as to which intersect won't fully process. It could be the first intersection, the second and the forth, all of them. The code doesn't throw an error and it proceeds to the next intersection where it may or may not fully process that one. I have tried rerunning the code (get different output scenario where some intersections processed more, some less) and adding in time breaks between intersections (no change). I have to do these intersections for hundreds of folders so checking each output and manually fixing them is pretty awful. Any thoughts would be helpful.



أكثر...
 
أعلى