I am running an arcpy script in command prompt with ArcGIS Pro installed. For some reason the Select By location tool produce different result every time I run it.
Here is the selection code:
arcpy.SelectLayerByLocation_management('lowland_layer', 'INTERSECT', 'buildings_layer', selection_type='NEW_SELECTION')
arcpy.CopyFeatures_management('lowland_layer', 'lowlands_with_buildings.shp')
I have no idea why this would produce different results everytime I run it. I have already made sure that all files has the same coordinate system, as well as the outputs.