AnsweredAssumed Answered

Map service layers to gdb

Question asked by m.cain on Dec 18, 2014



I want to create a script that copies all layers in a map service to a local gdb. Being somewhat new at scripting, is it best to load the service into an mxd and then have the script iterate through each layer in the mxd and export to a gdb? or there a more direct route?


Alternatively, assuming I have access to the mxd used to publish the map service, is it possible to simply export the layers' data sources (i.e., SQL Server layer minus definitions) to a local GDB + layer file of group layer (multiple layers inside)?


Thanks for your thoughts.