Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

So I have feature classes from an ArcGIS database that I renamed using this Python code: enter image description here

But now I have to merge all the feature classes that are output from this into one feature class named OSRS_ORN_NER. I'm not really sure how I should assign the inputs and outputs when I'm using the arcpy.Merge_management() tool. This is all I have right now: enter image description here

share|improve this question
    
Please try to always include the text (not screenshots) of code and errors because that way they can be searched. –  PolyGeo Jan 19 at 22:25

1 Answer 1

up vote 1 down vote accepted

Merge tool expect you a list of feature classes as the input. so you shouldn't put it in a loop.

First build a list of feature classes in loop:

#l is a list of featureclasses with absolute path
l = [] 

for r in rows:
 # r is a featureclass like  "D:\FDB.gdb\input1"
 l.append(r)

arcpy.Merge_management(l, "D:\FGDB.gdb\Merged")
share|improve this answer
    
Would I name it OSRS_ORN_NER like this?: arcpy.Merge_management(l,"D:\FGDB.gdb\Merged\OSRS_ORN_NER") –  EmilyF Jan 19 at 14:40
1  
You can name it any thing. Merged is just a sample name of output featureclass in the file geodatabase. you can name it for example OSRS_ORN_NER. –  Farid Cher Jan 19 at 19:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.