Using Relative Paths Rather Than Full Paths to Save Your Files
Full path
Suppose at school you saved your project as S:\Lab3\Michigan.mxd. Your data were also stored in the same folder, i.e., S:\Lab3\washtenaw.shp. At the end of class, you go home and want to continue working, so you copied your data to D:\Lab3 on your home computer. Since you used the full path convention for saving your data, when you open your project file (Michigan.mxd) at home, ArcMap would not be able find your data. Instead of seeing your data, you will see a red exclamation mark near to the name of the map layer in your project. The reason for this is that ArcMap is still looking for your map layer in the s:\Lab3\ because this information was hard-coded into the .mxd file. However, your data are now in D:\Lab3\. To automatically point ArcMap to your data folder, you should use relative paths to store your data and project file.
Relative path
An example of a relative path is: \Lab3\Boundary.shp.
Relative paths in a map specify the location of the data contained in your project relative to the current location on disk of the map document (.mxd file) itself. As relative paths do not contain drive names, they enable the map and its associated data to be moved to any disk drive without the map having to be repaired. As long as the same directory structure is used at the new location, the map will still be able to find its data by traversing the relative paths.
- Click the File menu and click Document Properties.
- Click Data Source Options.
- Click Store relative pathnames and click OK on all dialog boxes.
- Save the map.
Tip
If you want all new maps that you create stored with relative paths, go to the File > Document Properties dialog box and click the Data Source Options button. Check the option to make relative paths the default for new map documents. This setting is stored in the registry. If this box is not checked, the default is absolute paths.
No comments:
Post a Comment