Skip to content

Instantly share code, notes, and snippets.

@bixb0012
Last active June 29, 2017 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bixb0012/dfa892cbcd1f287753e52fe31d05caf9 to your computer and use it in GitHub Desktop.
Save bixb0012/dfa892cbcd1f287753e52fe31d05caf9 to your computer and use it in GitHub Desktop.
ArcPy (ArcMap): Create Curved Geometries
# Adapted from http://gis.stackexchange.com/questions/66551/can-arcpy-10-1-be-used-to-generate-true-curve-elliptical-polygons-in-a-file-geod
#
# Reference: 1) http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/asshape.htm
# 2) http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geometry_Objects/02r3000000n1000000
import arcpy
# Example 1: CIRCULARSTRING(1 5, 6 2, 7 3)
esri_json = {
"curvePaths": [[
[1,5],
{"c": [[7,3], [6,2]]}
]],
"spatialReference": {"wkid": 0}
}
ln = arcpy.AsShape(esri_json, True)
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment