Skip navigation
All Places >

python snippets

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

Recent Activity

Python (including arcpy) is fun when being used to process GIS vector data (point, line, polygon). However, it is tedious and inefficient compared to SQL. After all, SQL is the database language. Here,  arcpy.AddGeometryAttributes_management, arcpy.da.UpdateCursor, and SQL script were used to calculate field longitude and latitude in a point… (Show more)
in python snippets
a"(SHAPE_IN_CONTENTS)", "NEW_SELECTION", "LEASE_NAME LIKE 'ABC%'", None)"(SHAPE_IN_CONTENTS)", r"C:\Data\GIS\Project\Python\Python.gdb\(SELECTED_SHAPE)", None, None, None, None)"(SELECTED_SHAPE",… (Show more)
in python snippets
Hi,   I am trying to update the polyline layer using cx_oracle in python script. i read the feature details from another layer as sde.stastext and convert it as a  below format string.     When i insert the string value as bind value using sde.stgeomerty com  ['LINESTRING ( 9291551.34660000 4187266.23730000, 9291554.47640000 4187256.33170000,… (Show more)
in python snippets
For some work i was creating a tool which can add same field in attribute table of multiple feature classes. I wrote the script and it worked well but when i added this script to a tool; the tool didn't resulted in same results. I' m attaching screenshots for same. I'm kinda new to scripting and arcpy.
in python snippets
I want to add feature service as a layer from AGOL to a map ArcPro  , how can I do it?
in python snippets
Click to view contentHello,   I have a Python expression that utilizes a code block that I am trying to run as a field calculation (manual or with Field Calculator geoprocessing tool).  The code runs without issue, but returns nulls even if I hard-code the return value to a simple string.  I have tried going through line by line to better understand where/why it is… (Show more)
in python snippets
See question above.  So far script does this, have script or know how to do anything with a # in front of it #user loads shapefile and either selects features or uses entire shapefile   # run a bunch of tool snippets   # create and calculate fields   # split polylines, densify @ 10ft, create vertices,    # create points at start… (Show more)
in python snippets
Click to view contentHello,   I have a question about how to generate buffers shaped as partials circles with different radii – I am particularly interested in scripting out this method with ArcPy as our current (limited) approach is scripted out, which saves project time.   For context, I am working NOAA hurricane data that has wind radii data values that extend in… (Show more)
in python snippets
Click to view contentI recently replaced my existing data server with a new server thus a new server name and path. My existing data server is named skunk while my new server is tesclon. I need to reroute all the datasources in my over 300 mxd files that points to skunk to now point to Tesclone.     The script has been modified and some print statements were used to… (Show more)
in python snippets
Load more items