Last active
June 29, 2017 19:51
-
-
Save bixb0012/dfa892cbcd1f287753e52fe31d05caf9 to your computer and use it in GitHub Desktop.
ArcPy (ArcMap): Create Curved Geometries
This file contains hidden or 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
# 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