Setting default workspaces is a good data management habit to get into – it may save you lots of heartache when saving new layers.

There are lots of things that contribute to doing good GIS work, and practicing good file management has to be near the top.  Anyone who has done any amount of GIS will know how important data are, and, often through bad experiences, just how important managing those data is.  In this ongoing series, “Paths to Good GIS”, I hope to cover some of them.

In a previous post we looked at a number of common ArcGIS errors that can occur and how to fix them.  Good data management is more about maintaining the fence at the top of the cliff rather than the ambulance at the bottom.  There are many aspects to good data management, and saving things in the right place is one important part of that.  There are few things worse than not being able to find the data you need when you need it; using default workspaces is a helpful way to avoid that.

When running just about any geoprocessing tool, you will usually be saving an output layer or table in a specific place.  Setting a default workspace at the start of a project helps to ensure that specific place is always used.  Default workspaces work primarily with geodatabases.

The Default Geodatabase

Everyone (who’s anyone) already has a default geodatabase, usually hidden in your H: drive.  If you have a look in your H:\My Documents\ArcGIS you’ll see two geodatabases: Default and scatch.  Here’s what my folder looks like:

Normally, any tool you try and run will want to save the output here – as shown below in this tool window:

Outputs can end up in this land of lost layers if you’re not careful.  If a layer goes missing on you, chances are it’s here, but most people don’t know this exists.  Excuse the pun, but by default, this is your default geodatabase (hence the name).  As you can see, mine is slowly getting filled up when I use this for in-class demos or when I’m in too much of a hurry.

(And that’s not even everything in there . . .)

Setting a new Default Geodatabase

It’s quite easy to set a new default geodatabase yourself.  First off, you want to be storing all of your project related data in one folder – this is good practice.  All map related files should be kept in this folder – map documents, spreadsheets, layers, everything.  Second, if you’re working with a geodatabase (recommended), create it inside that folder.  You can set all these up using the Catalog window in ArcMap.  Click the Catalog button, , to open this – a window will open at the right:

Navigate to your new (or existing) geodatabase, right-click it and select “Make Default Geodatabase”

(Quick! Save your map!  Now!)

Next time you run a tool, it will want to save the output to that location:

That’s one less thing I’ve got to worry about now.

ONE IMPORTANT THING: a default geodatabase you set up belongs to that map document so you would need to do this for every new map document you start.  You can’t do it the same way in ArcCatalog BUT you can do it from within tools run in ArcCatalog

Setting Default Geodatabases in ArcCatalog

When running tools from ArcCatalog, you can set this default workspace by clicking on the Environments button at the bottom of a tool:

Clicking this opens up a whole new set of settings;

Top of the list is “Workspace”.   When expanded this you can set the geodatabase that will be used when tools are run from ArcCatalog in this session.

(By the way, a scratch workspace is mainly used to store temporary files when using ModelBuilder.)

Setting a default geodatabase is one small step of good data management but one giant leap to doing better GIS.

C