Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://gis.stackexchange.com/questions/12904/alternatives-to-arcgis-10-functionality/
- import os, sys, arcpy, time
- from arcpy import env
- env.workspace = 'D:/s/default.gdb'
- scratchDB = 'D:/s/'
- #point fc, 3938 points
- #from http://www.yukongis.ca/Data/Yukon_Place_Names, in file-gdb.
- geom = 'Z://no_scale.gdb/placenames_comprehensive'
- def createGeom(geom, scratchDB):
- filetime = (str(time.time())).split(".")
- outfile = "fc" + filetime[0]+filetime[1]
- outpath = scratchDB + "default.gdb/"
- outFeatureAggClass = outpath+outfile +"_Agg"
- try:
- arcpy.AggregatePoints_cartography(geom, outFeatureAggClass,"124000 meters")
- except:
- print arcpy.GetMessages(2)
- for i in range(1,700):
- start = time.time()
- createGeom(geom,scratchDB)
- end = time.time()
- elapsed = end - start
- minutes = elapsed / 60
- print 'Iteration %s took %ss (%smin)' % (i,elapsed,minutes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement