I'm trying to do some simple overlays between a couple of spatially enabled dataframes. The layers are coming from feature services, using query(... as_df=True).
When I attempt an overlay, I get the following message, or something like it:
TopologyException: Input geom 1 is invalid: Hole lies outside shell at or near point
Which, in many cases, is absolute nonsense, because the geometry in question has no holes. It's not even multipart!
A bit of digging reveals that this is an issue with the right-hand-rule, that the order of vertices in my polygons is causing this behavior. The thing is, I can't find any way to "reverse direction" on polygons, except maybe breaking apart the SHAPE column and reversing the arrays of vertices.
Before I go to all that trouble, I wanted to see if anyone else has encountered this. Any pointers or ideas?
EDIT: I'm in a custom python env, so my SDFs are coming in as shapely geometries. Arcpy is able to handle this, but if possible, I would like to keep this process workable with the ArcGIS Python API only. The resulting script is intended to be run in various settings and by different users, not all of whom are able to utilize arcpy.