daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Sep 25th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. arcpy.MakeFeatureLayer_management(tempGrid, "temp_lyr")      
  2. arcpy.SelectLayerByLocation_management("temp_lyr", "INTERSECT", "master_lyr")      
  3.  
  4. countOutFC=float(arcpy.GetCount_management("temp_lyr").getOutput(0))      
  5.  
  6. print "Cell size: "+str(cellSize)+"  Count: "+str(countOutFC)      
  7. if countOutFC>x:      
  8.   print "Overshot..."      
  9.   cellSize=prevCellSize      
  10.   inc=inc/2.0      
  11. else:      
  12.   prevCellSize=cellSize      
  13.   cellSize-=inc
  14.    
  15. countOutFC=float(arcpy.GetCount_management("temp_lyr").getOutput(0))      
  16. print "Cell size: "+str(simpCellSize)+"  Count: "+str(countOutFC)      
  17. if countOutFC==x:      
  18.   break
RAW Paste Data
Top