Hot answers tagged arcpy
You can try this, it requires saving your layers out to a lyr file on disk before adding it to the second map. In map one, run this code: arcpy.SaveToLayerFile_management("yourlayerinmap", r'youroutputlocation') In map two, run this code: mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd) layer = ...
1) You create a SearchCursor object which is assigned to the variable cursor: # place all the rows from the feature class into a search cursor cursor = arcpy.SearchCursor("IndCases") But then you try to access this using the variable cur, which doesn't exist: for row in cur: Try using for row in cursor instead. 2) See the arcpy.da.SearchCursor help ...
Consider using Dissolve. This will write the output to a new feature class but it may be more efficient. In my experience dissolve operations have taken less time than merge. Run a benchmark to determine which is faster. There may be some issue with merge/dissolve wrt to performance and dissolving circular arcs (such as results of buffering points, ...
You should just install the 32 bit version of Anaconda.
You're using a 64 bit version of Python in your Anaconda installation and ArcMap's Python is 32 bit. You'll need to install some 64 bit ArcGIS build (either 64 bit Background Geoprocessing or ArcGIS for Server) and point to that instead, or install a 32 bit Anaconda instance instead and try again. See the downloads page and get the 32 bit installer.
The answer which I found yesterday, and PolyGeo referenced in his comment above, was to use the full path to the sde instead of the relative path. I still don't understand why the IDLE GUI/shell can't use the relative path when the ArcMap python window can.
Thanks for all the great ideas. Unfortunately I was stuck using arcGIS as getting admin privileges at my workplace is near impossible. Basically what I ended up doing was appending 100 files at a time rather than 1 at a time. This reduced the runtime to just over 24 hours.
Only top voted, non community-wiki answers of a minimum length are eligible