Appending multiple GeoDatabases into one

5840
3
07-26-2014 09:18 AM
iankirschner
New Contributor

I have 5 geodatabases with identical data but of different areas. I am trying to append data from all five to one new geodatabase. There are about 50 feature classes in each geodatabase so I am looking for a script to automate the process.

Thanks

0 Kudos
3 Replies
Leandro-Zamudio
Occasional Contributor

Hi Ian.

I have a code snippet that you can use, To use it Replace the <outputGDB> and <InputGDB1><InputGDB2><InputGDBN> values.

WARNING: It's tested with GDB with the exactly same schema in all GDBs.

import arcpy

from arcpy import env

##Destination GDB

GDBD="<output GDB>"

##List of Origin GDB

GDBS=["<inputGDB1>","<inputGDB2>","...","<inputGDBN>"]

##Set Environment

arcpy.env.workspace=GDBD

##Get List of FDS

FDS=arcpy.ListDatasets()

##Get List of Root Feature Classes

ROOTFCS=arcpy.ListFeatureClasses()

##Append elements in Root Feature Classes

for fcr in ROOTFCS:

    appendinput=[]

    for FCI in GDBS:

        appendinput.append(FCI+"/"+fcr)

    ##print appendinput

    arcpy.Append_management(appendinput,GDBD+'/'+fcr,"TEST")

##Append elements of Feature Classes inside Feature Datasets

for FD in FDS:

    for FC in arcpy.ListFeatureClasses("*","",FD):

        appendinput2=[]

        for FCI2 in GDBS:

                appendinput2.append(FCI2+"/"+FC)

        ##print appendinput2

        arcpy.Append_management(appendinput2,GDBD+'/'+FC,"TEST")

0 Kudos
SibghatUllah1
Occasional Contributor

Please see the following video and tool Append Multiple Geodatabase - YouTube 

0 Kudos
MaryamAhmadi
New Contributor

I need the Appending multiple Geodatabases into one tool for my won desktop GIS 10.8.1.

How to download this tool for free?

 

0 Kudos