Fixing broken data sources with MapDocument.replaceWorkspaces()

During the course of normal GIS operations, it is a fairly common practice to migrate data from one file type to another. For example, many organizations migrate data from older personal geodatabase formats to the new file geodatabase types, or perhaps even enterprise ArcSDE geodatabases. You can automate the process of updating your datasets to a different format with MapDocument.replaceWorkspaces().

Getting ready

MapDocument.replaceWorkspaces() is similar to MapDocument.findAndReplaceWorkspacePaths(), but it also allows you to switch from one workspace type to another. For example, you can switch from a file geodatabase to a personal geodatabase. However, it only works in one workspace ...

Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.