I am trying to help you solve the original problem, .......Here is an example that is close to your problem. It is an OD matrix of 13,000 routes. ......I have access to all the routes with from and to IDs, a unique name for each route and the total length. What else do you need?
Don't know if it would help you in this case, but in the past I have made a "look up" reference table that includes the road segment IDs that each of my routes traverse... that way I can just make a "view" of my routes for summary/analysis purposes on-demand instead of keeping the actual spatial data for each route (which after a point becomes impractical). The routes are composed of the original road segments anyway - so it begs the question for the need to store redundant spatial data.
Per your original bug assertion, here's some code to test where arcpy.ListFeatureClasses breaks... I got up to 5000+ FC's able to be listed before I killed it... I was using the in_memeory workspace though for speeds sake... FGDB is way slower.
Yes..yes. sorry to be so confusing.Again, can we please get past the issue of what I should or should not have done programatically to reduce the number offeature classes? I've already fixed that for future runs 🙂 But what's done is done and I am trying to access the geodatabase, just like someone else who may be dealing with a file geodatabase with 20k+ feature classes...which is the real issue here.The total size of the gdb is ~20GB
import arcpy arcpy.env.overwriteOutput = True arcpy.env.workspace = arcpy.env.scratchGDB #I used in_memory instead to test it loopCount = 1 fcName = "fc_" + str(loopCount) arcpy.CreateFeatureclass_management(arcpy.env.workspace, fcName, "POINT") fcListCount = 1 while fcListCount > 0: loopCount = loopCount + 1 fcName = "fc_" + str(loopCount) fcListCount = len(arcpy.ListFeatureClasses()) arcpy.CreateFeatureclass_management(arcpy.env.workspace, fcName, "POINT") fcListCount = len(arcpy.ListFeatureClasses()) print "At loop count = " + str(loopCount) + " there were " + str(fcListCount) + " featureclasses listed..."
arcpy.env.workspace = "path_to_gdb" # essential print arcpy.env.workspace # just to check listOfOne = arcpy.ListFeatureClasses("thefirstfile") print listOfOne If this works, then maybe you could make a wild card listing of a subset listOf2k = arcpy.ListFeatureClasses("image1*") print len(listOf2k)
for n in range(20000): fc = "image"+str(n) if arcpy.Exists(fc): process(fc) else : print "Oops, guessed wrong",fc
desc = arcpy.Describe(gdb) lstChildren = desc.children print len(lstChildren),"featureclasses in ",gdb, "from",lstChildren[0]," to ",lstChildren[-1]
import glob listOfShapefiles = glob.glob(*.shp")
Kimo, thanks for the reply.however I don't know of a better way to acquire the information that is required. Because arcgis does not do route analysis for an OD Matrix (it only provides a cost report), if I am wanting to show/analyze all of the streets that are involved in, say a 70x300 OD Matrix for (a very large city)
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.