Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- # A list of features and coordinate pairs
- feature_info = [[[90, -180], [90, 180], ],
- [[90, 180], [-90, 180], ]]
- # A list that will hold each of the Polyline objects
- features = []
- for feature in feature_info:
- # Create a Polyline object based on the array of points
- # Append to the list of Polyline objects
- features.append(
- arcpy.Polyline(
- arcpy.Array([arcpy.Point(*coords) for coords in feature])))
- # Persist a copy of the Polyline objects using CopyFeatures
- arcpy.CopyFeatures_management(features,"C:/Arcpy/Test/line.shp")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement