Questions tagged «arcview-3»

4
ArcView 3.x Avenue位图(Tabs?)与ArcView 10 Python光标
注意:尽管这个问题有答案,但是对优化游标过程的其他提示将不胜感激。我将监视任何更新。 目前,我的老板(在Avenue工作)和我(在Python中工作)都试图解决同一问题。相反,我们都解决了这个问题,但是至少可以说,我们的解决方案的运行速度是不相干的。他的脚本在2个小时内所处理的内容最多可能达到6个。语法和逻辑实现方面的唯一真正区别在于3.x的位图和10.x的游标。我们两个: 1)存储表1中的值 。2)使用这些值查询表2中的一行 。3)存储表2中的值,作为新行插入表3中。 在这两个脚本中,这些过程都是在两个嵌套循环中完成的。在我开始探索代码优化的美好世界之前,将Avenue脚本性能与Python进行比较时,是否会发生这种情况?在操作时间方面,这并不是他的脚本第一次超过我的脚本,因此我想知道在为恐怖的脚本而钉死自己之前是否应该注意一些事情。 这是我的脚本,没有多余的地方: import arcpy import time import sys import os def recordfindcopy(inFile,query,outFile): findRecord = arcpy.SearchCursor(inFile,query) for record in findRecord: copyRecord = arcpy.InsertCursor(outData) # <--- D'oh! (See answer) field = record.FIELD copy = copyRecord.newRow() copy.FIELD = field copyRecord.insertRow(copy) StreetsFileList = [r"Path", r"Path"] for sfile in StreetsFileList: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.