Skip navigation
All Places >

python snippets

Log in to follow, share, and participate in this socialgroup.

Recent Activity

I have a small Python script that essentially downloads a zip file, unzips it, and saves the contents (shapefiles) to a folder on my network.  It stopped working not too long ago and I'm not sure why.  I was testing each line in the Python Consol, and when it got to the last line shown below (zipresp = urlopen(zipurl)), it gave me a bunch of… (Show more)
in python snippets
Good morning,  Hello dears, Last Tuesday i was trying to create Map used by Arcpy and two days also. I was using If-elif-else statement. but i was face face issue. which i attach in bellow. Please help me to find that problem....
in python snippets
Unable to use the 64 Bit Arcpy modules to list table or print records or do anything on a non sde geodatabase where as the same code works absolutely fine with 32 Bit arcpy modules.    Doing this simple process and I'm stumbled to understand why this is not working in 64 Bit   import arcpy # Set the current workspace table =… (Show more)
in python snippets
Hello,    With the following script I was able to determine the maximum values of a column [POINT_Z] for certain groups from [ID_1].             #creating a list ->"mast_value" with unique values of field [ID_1]     with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP','ID_1') as max_cursor:         for row in max_cursor:            … (Show more)
in python snippets
Hi all,   I'm working on a script that uses the 'memory' workspace as layers are being processed, and I've hit an issue when I try to execute a field calculation between joined layers.  I have included a script below that demonstrates the differences between workflows - the calculation will work fine if I create the feature layers from layers on… (Show more)
in python snippets
Newbie here. I've been trying to solve this for weeks and have searched and tried many suggestions from this site and still can't get this to work correctly.  I'm trying to use a derived value (max) from the Value field of a raster and use it in a calculation on each row of that field, and put the results in a new field (then use that field as a… (Show more)
in python snippets
Click to view contentI am currently trying to write a script that iterates through files in a folder to do geoprocessing. However, I am getting held up at the very start of my code with an error I cannot explain or find an answer to. I am basically a novice at Python scripting, however, I have used arcpy and pyscripter successfully throughout my schooling to run… (Show more)
in python snippets
To whom it may concern   A recent update for ArcGIS Pro 2.5.0 and ArcPY will cause serious issues to features and shapefiles.   While testing some code I wrote between myself and our GIS analyst, I found something very odd occurring with the following sample code snipet., "DesiredFieldName",… (Show more)
in python snippets
Load more items