Tried reading through everything else related to the distanceTo tool on SE, but im still running in to trouble.
Basically, my input Feature Class is a collection of polygons with begin/end lat/long. There is one BEGIN_LAT,BEGIN_LON,END_LAT,END_LON for each record. These lat/long pairs do not relate to the actual shape of the polygon (they might, but most will be different). Trying to find the minimum distance value for each polygon to the beginning LAT/LON point and end LAT/LON point. Eventually I am going to use the distance to compute time values, but for now I would just like to see the value print out properly :)
Code block as follows:
cursor = arcpy.da.SearchCursor(inFC, ['SHAPE@',"BEGIN_LAT","BEGIN_LON","END_LAT","END_LON"]) for row in cursor: polygonshape = row beginpoint = arcpy.Point(row,row) begingeometry = arcpy.PointGeometry(beginpoint) distance = polygonshape.distanceTo(begingeometry) print distance
I'm getting the generic error of:
ValueError: <geoprocessing describe geometry object object at 0x05F17D40>
I also print the type of polygonshape and begingeometry.... Polygon and Point respectively.