Chapter 3. Finding and Fixing Broken Data Links

In this chapter, we will cover the following recipes:

  • Finding broken data sources in your map document and layer files
  • Fixing broken data sources with MapDocument.findAndReplaceWorkspacePaths()
  • Fixing broken data sources with MapDocument.replaceWorkspaces()
  • Fixing individual layer and table objects with replaceDataSource()
  • Finding broken data sources in all map documents in a folder

Introduction

It is not uncommon for your GIS data sources to move, migrate to a new data format, or be deleted. The result can be broken data sources in many map documents or layer files. These broken data sources can't be used until they're fixed, which can be an overwhelming process if the same changes need to be made across ...

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.