Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 20265

A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

1 vote

How to use Arcpy UpdateCursor to update a field?

You can always use "with" that allows objects like files/cursores to be used in a way that ensures they are always cleaned up promptly and correctly. But it needs the table/fc field names to be passed …
neverMind's user avatar
  • 211
1 vote
1 answer
2k views

Geographic Transformations using ArcPy vs. Coordinate Systems used by ArcGis online basemaps

I then need to transform it to WGS_1984, so I've used: import sys, arcpy #globals set env.workspace and other used paths import globals as g def main(): # set local variables inDataset = ["rede_Coimbra_node.shp …
neverMind's user avatar
  • 211
1 vote
1 answer
1k views

Avoiding setting env.workspace and other paths/settings too often in ArcPy?

I have some scripts that are constantly setting env.workspace of arcpy. Usually, I have a caller script(script1.py) that may call some other script (script2.py). … import globals as g from arcpy import da arcpy.AddMessage("Importing arcpy outside ArcMap took %s seconds." % (time.clock() - t_start)) from cProfile import run def main(): .... …
neverMind's user avatar
  • 211
0 votes

Importing ArcPy taking many seconds and code is really slow for GeoProcessing Tools 64-bit (...

I've tracked the import time for arcpy...it takes more than 23 seconds and the code only around 7s! … I think it's interesting: import time import sys t_start = time.clock() import arcpy from arcpy import env, da arcpy.AddMessage("Importing arcpy outside ArcMap took %s seconds." % (time.clock() - t_start …
neverMind's user avatar
  • 211
3 votes
3 answers
4k views

Importing ArcPy taking many seconds and code is really slow for GeoProcessing Tools 64-bit (...

I've installed ArcGIS10.1 SP1 and whenever I import arcpy (on Pywin console or Eclipse PyDev) it takes aprox. 15-20seconds. Is this normal? I don't think so... … ''' # Import system modules import arcpy, sys from arcpy import env print "Running against: {}".format(sys.version) def do_search_by_cursor(table,searchString): count = 0 count += cursor_search_count …
neverMind's user avatar
  • 211
2 votes
1 answer
2k views

Creating a layer after using SelectLayerByAttribute_management

Only this code works for me: import arcpy from arcpy import env # Set workspace env.workspace = "S:/workspace/MSc_git/ArcGis/estagio_db.gdb" workspace = "S:/workspace/MSc_git/ArcGis/Layers" in_feature …
neverMind's user avatar
  • 211