I got more time to look at this problem again - 3 things I really did not like about the last solution I posted are:
- This was first tried as a 10.0 solution, so I didn't have access to the 10.2.x geometry methods, boundary() and cut(cutter).
- I couldn't think of a 'lower license' solution to 'reconstruct' the oval polygon into 2 bisected parts and resorted to using Feature To Polygon.
- Unfortunately the bisecting line geometry constructed didn't work until I 'fiddled' with the cluster tolerance - this introduced some error.
I have another machine with 10.2.1 installed that yields a better solution (lower license) without introducing error. Just being lazy before, but a simple solution to overcoming the cluster tolerance challenge is to use a little algebra on the bisecting line to extend it enough to effectively use it as a 'cutter'. This bit of code (within IDLE) then 'corrects' the 'bisect' line geometry:
>>> # recall (from the previous post) the point coordinates derived from the MBG output
>>> print pt1X;pt1Y;pt2X;pt2Y
536180.987517
122898.58987617493
537308.88880471326
123781.06596555188
>>>
>>> slope = (pt2Y - pt1Y)/(pt2X - pt1X)
>>> print slope
0.782405427813
>>>
>>> # Y2 - Y1 = slope(X2 - X1)
>>> # Then, say, delta X is 1 unit...then Y2 - Y1 = slope.
>>>
>>> pt1Xext = pt1X -1.0
>>> pt2Xext = pt2X +1.0
>>> print pt1Xext;pt2Xext
536179.987517
537309.88880471326
>>>
>>> # Y2 = slope + Y1
>>> pt1Yext = -slope + pt1Y
>>> print pt1Yext
122897.807471
>>>
>>> pt2Yext = pt2Y + slope
>>> print pt2Yext
123781.848371
>>>
>>> # now load the 'corrected' coords into point objs
>>> pt1 = arcpy.Point(pt1Xext,pt1Yext)
>>> pt2 = arcpy.Point(pt2Xext,pt2Yext)
>>> newArray = arcpy.Array()
>>> newArray.add(pt1);newArray.add(pt2)
>>>
>>> # from the array, create the line geom
>>> bisect = arcpy.Polyline(newArray)
...here's where it gets interesting - I access the original oval shape to be cut, but unfortunately I run into a spatial reference required on 'bisect' is missing when trying to make the 'cut' (or bisect):
>>> # same 10.0 command (old-style cursor)
>>> rows2 = arcpy.SearchCursor('ovalTendingNEtoSW')
>>> row2 = rows2.next()
>>> feat2 = row2.shape
>>> type(feat2)
<class 'arcpy.arcobjects.geometries.Polygon'>
>>>
>>> # now try the 'new' geom methods
>>> feat2bound = feat2.boundary()
>>>
>>> # 'bisect' is the 'cutter':
>>> # cut(cutter)
>>> theBisected = feat2bound.cut(bisect)
Traceback (most recent call last):
File "<pyshell#43>", line 1, in <module>
theBisected = feat2bound.cut(bisect)
File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\arcobjects\arcobjects.py", line 825, in cut
return convertArcObjectToPythonObject(self._arc_object.Cut(*gp_fixargs((other,))))
RuntimeError: All geometries involved in this operation must have the same spatial reference.
So, this was corrected...the bisect was accomplished - without the need for a higher license (and without the tolerance error).
>>> feat2.spatialReference.PCSName
u'NAD_1983_HARN_StatePlane_Florida_East_FIPS_0901_Feet'
>>> bisect.spatialReference.PCSName
u''
>>> feat2.spatialReference.PCSCode
2881
>>> feat2.spatialReference.factoryCode
2881
>>> sr = arcpy.SpatialReference(2881)
>>> sr.PCSName
u'NAD_1983_HARN_StatePlane_Florida_East_FIPS_0901_Feet'
>>>
>>> # build 'bisect' with a spatial reference
>>> bisect = arcpy.Polyline(newArray, sr)
>>> bisect.spatialReference.PCSName
u'NAD_1983_HARN_StatePlane_Florida_East_FIPS_0901_Feet'
>>>
>>> # no fuss now (hopefully)
>>> theBisected = feat2.cut(bisect)
>>>
>>> type(theBisected)
<type 'list'>
>>> for eachGeom in theBisected:
print str(type(eachGeom))
<class 'arcpy.arcobjects.geometries.Polygon'>
<class 'arcpy.arcobjects.geometries.Polygon'>
>>> theBisectedLeft = theBisected[0].boundary()
>>> theBisectedRight = theBisected[1].boundary()
>>>
>>> # copy the results to gdb
>>> arcpy.Merge_management([theBisectedLeft,theBisectedRight],'bisectedOvalBoundary')
<Result '\\\\MC-GISAPPSERVER\\mapdocs\\temp\\testData.gdb\\bisectedOvalBoundary'>
>>>
>>> # not quite yet, but close...
>>> # need the bisection of the orig boundary poly; not the boundaries of the bisected polys
>>> theBisected = feat2bound.cut(bisect)
>>> arcpy.Merge_management([theBisected[0],theBisected[1]],'bisectedOvalBoundary2')
<Result '\\\\MC-GISAPPSERVER\\mapdocs\\temp\\testData.gdb\\bisectedOvalBoundary2'>
>>> # ah, beautiful!