Skip navigation
All Places >

python snippets

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

Recent Activity

kumar_tfnsw
Hi,   I run python script using following code desc = arcpy.Describe(fc) sindex = str(desc.hasSpatialIndex) stype = desc.featureType print str(fc)+ "--"+sindex + "--"+stype   it returns the feature class name and type correctly.  but it doesnt return the correct value for hasSpatialIndex. It returns the values as true when the ArcCatelog… (Show more)
in python snippets
sdkovach_usfs
I'm trying to get a script to reset the paths of data sources from an archive path to a current path. However, the script is only changing one of the paths and not all of the paths. Here is my code: import arcpy, os arcpy.AddMessage("\n\n" + "Re-source MXDs was developed by Carl Beyerhelm, modified by Steve Kovach" + "\n") mxdFolder =… (Show more)
in python snippets
PythonDeveloper
Click to view contentI am a computer science student and I working on this project; Goal: Python script to publish hosted feature layer to AGOL from a geodatabase. To eventually move features to Open Data. I am referencing my arcpy object to a Pro project in which lives a gdb file. I store the list of items from the gdb into a list called lyrList that is sent to my… (Show more)
in python snippets
Dharmarajan
Dear All,   How to get the geometry which is available in ''Area of interest" layer (which is a part WorkFlowManager)  by using ArcPy for WMX?
in python snippets
Dharmarajan
Dear All,   How to get the extent of a layer(by using Arcpy) named "Area of interest"(it is a graphics layer) which is attached automatically when we open arcmap by using WorkFlowManager?
in python snippets
EMedina-esristaff
Click to view contentThese days, it is quite common for people to use the rasterio, rasterstats, numpy, or geopandas Python packages in their Raster processing/analysis workflows. This post aims to illustrate how some of these packages might be used to perform zonal statistics: rasterio rasterstats geopandas fiona   If you're ever used the Summarize Raster Within… (Show more)
in python snippets
brianmcleer
My goal is to list all indexes that are being used on each feature class in an SDE database with ~50 feature classes that reside, with the end product being a list of the feature class and what the name of the index is.    import arcpy arcpy.env.workspace = r"Database Connections\Server Database Login.sde" # Get list of indexes and print… (Show more)
in python snippets
simons.joseph
I am trying to build a series of arcpy Add-In buttons for ArcMap 10.6 that perform simple field calculations via da.updateCursor on selected annotation features in an ArcMap edit session. I have all the edit code working, however after an edit occurs, the standard Undo/Redo stack is not enabled and I need these edits to participate in the… (Show more)
in python snippets
Load more items