I have a layer of parcels where some "parcel-itos" are inside larger "container" polygons, but these parcelitos are inside holes of the containers (e.g. they do not overlap, but they do touch). Both parcelitos and containers are in the same feature class. I would like to be able to relate the parcelitos' IDs to their containers' IDs. This is what I've tried:
inside = <Polygon object of Parcelito>
outside = <Polygon object of Container>
outside.contains(inside, 'BOUNDARY') #returns false
inside.within(outside, 'BOUNDARY') #returns false
From what I could glean on ESRI's info for Polygon Objects and Methods, it seems like specifying 'BOUNDARY'
should have made both of the tests above return True
. I don't want to use inside.touches(outside)
because the iterative process that contains this test would also pick up the parcels surrounding the container polygon, and I don't care about those relationships.
Any idea of what's going on with these polygon object methods?
poly = arcpy.Polygon(outside.boundary().getPart(0))
and then testingpoly.contains(inside)
, which returnedFalse
. Any suggestions about how to approach this differently?SpatialReference
in Geometry constructors. The default X/Y precision is 0.001, which will mangle WGS84 data.