ScottChang25

ArcGIS 10.0:Using ArcPy classes in Python to create Polylines & Polygons from Points

Discussion created by ScottChang25 on Sep 6, 2012
Latest reply on Nov 9, 2014 by Dan_Patterson
Hi all,
1) This morning, in the Python Window of my ArcGIS 10.0, I played with the ArcPy Class "Point" and got the following 2 points:
>>> import arcpy
>>> pointA = arcpy.Point(2.0, 4.5)
>>> pointB = arcpy.Point(3.0, 7.0)
>>> print pointA
2 4.5 NaN NaN

>>> print pointB
3 7 NaN NaN

>>> 

(i)  What is the "NaN" in the results of the "print" Command?
(ii)  If I want to use the "World" Geographic system for the X,Y-coordinates, how can I specify it?

2) If I want to use these 2 points to make a Polyline, how can I use the Python programming to connect these 2 points to form a Polyline?
    If I add a more point {poinC = arcpy.Point(0,0)}, how can I use the Python programming to form a Triangle from these 3 points?

Please kindly help, give me the ArcPy commands/Python tools to create Polylines and Polygons from Points, and respond.

Thanks,
Scott Chang

Outcomes