FAQ: Should relative paths to data be stored in map documents?
Should relative paths to data be stored in map documents?
Yes, under certain circumstances. Relative paths are appropriate when:
- Sharing map documents across a network
- Sending map documents to another user
- Moving map documents and data to another location
A relative path is the location of a computer file, given in relation to the current working directory. When a map document stores relative paths to data, any data sources that reside on the same drive letter, for example C:, are saved according to the common directory between the map and the data.
In the following example, the map document, New_York_Cities_and_Counties.mxd, contains two layers. The data source for these two layers is stored in C:\GIS\Data. The map document is saved in C:\GIS\Maps. The common folder between the map and the data is the GIS folder.
To preserve relative paths when moving map documents and data, the common directory, GIS, must be moved to the new location.
In the following image, the map and data have been moved to a new network location, but the directory structure is still the same.
Alternatively, the directory structure can be replicated in the new location.
In this image, the name of the common directory has changed, but the relative paths between the map and the data are preserved.
Data sources from a mapped network drive are stored with full path names. For example, if M:\data\Hydrography.shp is added to New_York_Cities_and_Counties.mxd, then that layer stores the full path to the data. When the map is moved to the G: drive, the full path to the Hydrography layer is preserved. If the map is moved to another computer, that computer must have the M: drive mapped to the same location as the original computer in order for the data path to be preserved.
Hyperlinks and Address Locators can also be stored using relative path names to the source. For more information, see the links in the Related Information section below.
- Save an ArcMap map document to a CD preserving the paths to the data
- Distribute a client-side geocoding service to other users
- Create hyperlinks with relative pathnames