Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import arcpy
  2.  
  3. # A list of features and coordinate pairs
  4. feature_info = [[[90, -180], [90, 180], ],
  5. [[90, 180], [-90, 180], ]]
  6.  
  7. # A list that will hold each of the Polyline objects
  8. features = []
  9.  
  10. for feature in feature_info:
  11. # Create a Polyline object based on the array of points
  12. # Append to the list of Polyline objects
  13. features.append(
  14. arcpy.Polyline(
  15. arcpy.Array([arcpy.Point(*coords) for coords in feature])))
  16.  
  17. # Persist a copy of the Polyline objects using CopyFeatures
  18. arcpy.CopyFeatures_management(features,"C:/Arcpy/Test/line.shp")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement