AnsweredAssumed Answered

ArcDesktop 10.5 - arcpy.da Geometry Issues

Question asked by crombezk on Nov 7, 2017
Latest reply on Nov 7, 2017 by bixb0012

I have a quality control script that recreates features from a line work layer to ensure all our taxing districts are following the tax parcel boundaries.

 

We have been running this script every year since version 10.0

We recently upgraded to 10.5 and ran into a scenario where the union tool was creating features (in a file geodatabase featureclass) that have a shape_length value but the shape_area was zero. These features are tiny slivers (usually on curves) that appear to be lines (but are really polygons).

 

The script copies the fallout features from the union layer to a quality control featuredataset in SDE using arpy.da cursors (search and insert).

where these areas are zero we started getting the following error:

SystemError: error return without exception set

 

running a quick test, I tried to use the getArea() method to put in an exception for areas equaling zero.

 

layer = r"\\path\to\featureclass"

with arcpy.da.SearchCursor(layer, ["SHAPE@"]) as cursor:

   for row in cursor:

      if row[0].getArea() == 0.0:

         # do something

 

what I ran into was sometimes it worked and sometimes it through an error:

AttributeError: '_passthrough' object has no attribute 'getArea'

 

so then I decided to just print row[0] and my results have mixed geometries...

 

<arcpy.arcobjects.mixins._passthrough object at 0x1585D610>
<geoprocessing describe geometry object object at 0x0297E0C0>
<arcpy.arcobjects.mixins._passthrough object at 0x1585D610>
<geoprocessing describe geometry object object at 0x0297E0C0>
<arcpy.arcobjects.mixins._passthrough object at 0x1585D610>
<geoprocessing describe geometry object object at 0x0297E0C0>

 

what is this all about?

I have never seen these arcpy.arcobjects.mixins._passthrough objects.

 

can someone please explain the difference between these geometry types?

and was this just introduced in version 10.5?

 

Any insight would be helpful.

 

Thanks,

Kathleen

Outcomes