I am trying to find the feature classes from one feature data into another feature classes. But I'm getting nothing at the end as a result of the matc statement. The data in the arc environment is XYZ.LandCover while in the other environment data naming format is pqr_landcover
One environment is SDE and other is postgis Below is a script I'm using
import arcpy
import os, subprocess, fnmatch, string, re
arc = ("Connections\\arc.sde")
post = ("Connections\\Post.sde")
arcpy.env.workspace = arc
listfeatures = arcpy.ListDatasets()
for lf in listfeatures:
print lf
fclist = arcpy.ListFeatureClasses("","",lf)
for fc in fclist:
print fc
arcpy.env.workspace = post
postgisdata = arcpy.ListDatasets()
for postg in postgisdata:
print(postg)
postlist = arcpy.ListFeatureClasses("", "",postg)
for postfc in postlist:
print postfc
if postfc in fc:
matches = matches+1
if matches > 0:
print str(matches)+" match found for "+postfc
else:
print "No matches found for "+postfc