Python - Projecting different shapefiles in the same folder

I have a few shapefiles in one folder with different coordinate systems but would like to use one of them as a template dataset. Is there a way to use python to filter out the shapefiles already in the required projection in the same folder?

I have been looking at the ListFeatureClasses and somehow using a wildcard, but not sure if that's the right way to go.

• This is a near duplicate of gis.stackexchange.com/questions/141351/… - the only difference seems to be the use of a file geodatabase instead of a folder of shapefiles.
– PolyGeo
Apr 7 '15 at 10:18
• Oh sorry, thanks for pointing out PolyGeo, I will try. Apr 7 '15 at 10:26
• Is there a way to filter out the shapefiles already in the required projection in the same folder? Apr 7 '15 at 10:48
• You should probably research/ask that as a new question but the way I would try is to use arcpy.Describe().
– PolyGeo
Apr 7 '15 at 10:58

You can use the Describe function to get information about your spatial references. Then simply use logic to screen out the spatial reference you do not want.

import arcpy

arcpy.env.workspace = r'C:\path\to\your\fgdb.gdb'

fcs = arcpy.ListFeatureClasses()

for fc in fcs:
sr = arcpy.Describe(fc).spatialReference.name
# Note that you can add multiple spatial references in a list ["sr1", "sr2"...]