Skip to content

Instantly share code, notes, and snippets.

@danmaps
Last active March 14, 2017 16:41
Show Gist options
  • Save danmaps/6d820b03cab56e76984cd03fb345f48f to your computer and use it in GitHub Desktop.
Save danmaps/6d820b03cab56e76984cd03fb345f48f to your computer and use it in GitHub Desktop.
python to identify curved segments
import arcpy, json
fc = "C:\Proj\Proj.gdb\curve"
fields=["SHAPE@", "OBJECTID"] # replace OBJECTID with any unique ID field
with arcpy.da.SearchCursor(in_table=fc,field_names=fields,where_clause="") as cur:
count = 0
for row in cur:
count+=1
j = json.loads(row[0].JSON)
if 'curvePaths' in j:
print "curve id: " + str(row[1])
print "total: "+str(count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment