Last active
March 14, 2017 16:41
-
-
Save danmaps/6d820b03cab56e76984cd03fb345f48f to your computer and use it in GitHub Desktop.
python to identify curved segments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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