1,035 reputation
311
bio website
location Mankato, MN
age 27
visits member for 2 years, 3 months
seen yesterday

2d
revised Performing a 'far analysis' using ArcGIS for Desktop?
added 317 characters in body
2d
revised Performing a 'far analysis' using ArcGIS for Desktop?
added 14 characters in body
2d
revised Performing a 'far analysis' using ArcGIS for Desktop?
added docstring so it can be referneced via help(nearPoints)
2d
answered Performing a 'far analysis' using ArcGIS for Desktop?
Dec
22
comment List all feature layers
No problem, using the globals() will return a dictionary of the variable names and their respected values. The dir() returns a list of the variables. The line you are asking about is just a list comprehension that checks to see if the variable type is an arcpy.mapping.Layer, which is the data type returned from the MakeFeatureLayer() function. If a variable is of the layer type, it is added to the list.
Dec
22
answered List all feature layers
Dec
20
answered Creating a weekly FGDB backup of ArcSDE?
Dec
20
asked Upgrade Geodatabase crashes python and ArcCatalog
Dec
15
comment name 'row' is not defined error appears overnight
That is strange, I do not know why it would say "porow" is not defined. Are there any feature classes with 0 records? Maybe you could do a try: del porow, except: pass, finally: del pocursor. That way at least the cursor object gets deleted at every iteration and it should not fail with that error.
Dec
15
comment name 'row' is not defined error appears overnight
Try moving your MakeFeatureLayer outside of the loop and remove the clear selection and Delete_management() routines at the end. It should take on a new selection every time.
Dec
15
comment name 'row' is not defined error appears overnight
Can you post your full error message?
Dec
9
comment Merge tif files with python
Just a thought, setting sys.argv as you are may be causing a problem. sys.argv[0] is always the path of the current script running. Whenever I pass in args in this way I usually do sys.argv[1:] = [#your args here]. I should add that when I do that, it is when using ArcGIS/arcpy so it may not apply for gdal.
Dec
5
awarded  Benefactor
Dec
5
comment Set default values for value table in Python Toolbox tool
Beautiful! I can't believe I missed that...It seems so obvious. Thank you very much!
Dec
5
accepted Set default values for value table in Python Toolbox tool
Dec
4
comment Arcpy SelectByAttributes and Show Selection
I just edited my original answer to include that information. I hope it helps.
Dec
4
revised Arcpy SelectByAttributes and Show Selection
added 565 characters in body
Dec
4
comment Arcpy SelectByAttributes and Show Selection
There is, you can just set the mxd variable to be the current map like this: mxd = arcpy.mapping.MapDocument('current'). You could also set up validation to list the layers in the mxd as a drop down then have a where clause parameter to give you the Select By Attribute GUI, which would be obtained from the layer you choose.
Dec
4
comment Arcpy SelectByAttributes and Show Selection
Yes, but if you are using a stand alone script the map has to be closed. You have to reference the layer by name using the lyr = arcpy.mapping.ListLayers(mxd, 'layer name')[0]. Once you have referenced the layer, you can run the select by attribute and then save the map using mxd.save(). Next time you open it, there should be a selection.
Dec
4
answered Arcpy SelectByAttributes and Show Selection