AnsweredAssumed Answered

ArcyPy: Select By Location with no selection_type and using invert_spatial_relationship

Question asked by pbeilin9 on Jan 2, 2018
Latest reply on Jan 3, 2018 by pbeilin9

I want my script to find geometry changes in 2 parcel datasets of differing months. To do this manually I used Select by Location on the earlier dataset using the later dataset using the "are identical to the source layer feature" option. Once the identical features are selected i invert the selection to find my geometry changes.

 

I am trying to get this done using python snippet below:

 

GeometryChanges = arcpy.SelectLayerByLocation_management(LaterParcelDataset, "ARE_IDENTICAL_TO", EarlierParcelDatset, 0, "NEW_SELECTION", "INVERT")

 

This gives me inaccurate results and I'm pretty sure this is because I have {selection_type} set as "NEW_SELECTION" but if I remove it I get an error. Esri's documentation says this:

INVERT —The result of the query will be inverted. If a selection_type option is used, the inversion occurs before the selection is combined with existing selections
So I'm totally confused on how to continue.

Outcomes