
Introduction to
Geographic Information Systems in Forest Resources |
Exercise: Project and Data
Management
Objectives:
- Use ArcView 3.x data management tools
- Convert ArcInfo data to ArcView 3.x data
- Use WinZip to create a data archive
Important note:
If you are not comfortable using hierarchical file structures (e.g., the
Windows Explorer), you should remedy this as soon as you can. Using hierarchical
file structures effectively is important in GIS as well as any other computer
application you will use in the future. There are a number of web resources
on hierarchical file structures, such as the notes on webpoedia.
Today's notes assume you know something about hierarchical file structures and
how to navigate up and down directories and disks.
- Create an ArcView 3.x project
- Set the Working Directory
- Copy a grid theme data source
- Copy and rename a TIN theme data source
- Delete a grid theme data source
- Copy an image theme data source
- Convert a coverage theme to a shapefile
- Rename and move a shapefile
- Archive a set of data
- "Move" an ArcView 3.x project
Create an ArcView 3.x project
- Use the Startup Project
to create a new project.
- Remember to always use the startup project to reopen projects that have
been built using the startup project.
Set the Working Directory
- Create a new view in your project.
- From the File menu, select Set Working Directory. This menu
choice is only available in the View menu.
- The Work Directory dialog will appear. Change the value to the path
to the root directory of your removable disk. It is important that you become
aware of the drive letters of the different disks on the machines you use
ArcView 3.x on, as well as the path names to different files and directories.
Your drive letter may be different than the one shown below.

You will also need to become comfortable the relationship between a path name
and the graphical representation of the file system structure. For example,
in this image you can see the hierarchical file structure in the graphical
part of the Windows Explorer, but you can also see the path name in the Address
control.
You have just specified the working directory. Whenever ArcView 3.x creates
a file, by default it will be placed in the working directory. You will usually
have the opportunity to select a different location if you want, but in some
operations, data sets are automatically placed in the working directory without
any interaction. You should always take the time to set the working directory
for each and every project.
Copy a grid theme data source
- If your computer does not have a C:\temp directory, create one now
using the Windows Explorer. Keep the Windows explorer open.
- Turn on the Spatial Analyst Extension (File > Extensions > Spatial
Analyst from the menu).

- Create a new view, and make sure it is the active document.
- From the File menu, select Manage Data Sources.
- Navigate to the packgis\forest directory on the CD drive.
- Select Grid as the Source Type. (Note: your CD drive may have
a different drive letter.)

- Click on dem and then click the Copy button.
- Note that by default the location where ArcView 3.x wants to put the data
set is on your removable disk, since that is where you set your working directory.
- Navigate to the C:\temp directory and call the new grid pf_dem.
Note: you will need to switch drives as well as directories to go from the
removable drive to your C:\temp directory.
- Click OK to start the copying process.

You will need to wait a minute or two as the files copy. You will see the
computer's disk lights flashing as the files copy. In the mean time you can
entertain yourself with the
Onion.
- After the file copies, you can dismiss the Source Manager dialog.
- View the contents of C:\temp in the Windows Explorer to see the effect
of the copy. Note that in addition to the pf_dem directory there is
an info directory.
- Add the new theme to your view. Make sure to select Grid Data Source
from the Data Source Types dropdown.
- Turn the theme on. This is a grid (raster) data
set representing elevation (in feet) for Pack Forest.
- Finally, delete the theme from your view and save the project.
You have just copied a grid theme data source from the CD to a place on the
system hard drive. We will use grid themes extensively during the class sessions
on raster analysis. You will use this functionality later on, or if you need
to copy a grid data set to a different machine or for a different user.
Remember, never use the Windows Explorer to copy, move, or rename grid data
sources. You will corrupt your data.
As you can see, it is not necessary to load the grid theme into the current
view before making the copy. Data sources that can be managed by ArcView 3.x
do not need to be loaded; in fact, if data sets are loaded into the project,
you can copy them, but you will not be able to rename or move
the data sets until they are completely removed from the project. ArcView 3.x
"holds on" to data sets that are currently loaded in the project.
If you do want to manage grid data sets, you will need to enable the Spatial
Analyst Extension.
Copy and rename a TIN theme data source
Copy:
- Turn on the 3D Analyst Extension.

- Reset your working directory to C:\temp. This will make the default
location for new data sets switch from your removable disk to C:\temp.
- From the File menu, select Manage Data Sources.
- Navigate to the packgis\cfr250 directory on the CD drive.
- Select TIN as the Source Type.
- Select the TIN pf_tin.

- Copy the pf_tin TIN to the C:\temp drive as pf_tin.
- To do this, select pf_tin, then
- Click the Copy button, then
- Navigate to the C:\temp directory and click OK.

It will take some time to copy the TIN.
- Dismiss the Manage Data Sources dialog.
- Again, view the contents of your directory in the Windows Explorer.
Rename
- Save the project now in case of a crash.
- From the File menu, select Manage Data Sources.
- Navigate to the C:\temp directory and select the TIN pf_tin.
- Click the Rename button.
- Navigate to the C:\temp directory and call the new TIN pf_tin_bk.

- ArcView may crash here with
If this happens, close ArcView and re-open (remember, you just saved a few
steps ago).
- Dismiss the Manage Data Sources dialog.
- Again, take a look at your Windows Explorer.
- Finally, add the data set to your view.

- Turn the theme on.
You have just copied a TIN data source from the CD to the hard drive and then
renamed the TIN data source. TINs are surface models, which can also represent
any numerical phenomenon across the landscape. TINs are generally smaller in
file size than grids, so the copy occurs much more quickly. In order to use
or manage TINs, the 3D Analyst must be enabled. We will use TINs later in the
course during the module on 3D display and analysis.
Remember, never use the Windows Explorer to copy, move, or rename TIN data
sources. You will corrupt your data.
You can also use the Rename function to rename grid, TIN, or shapefiles
to other file system locations or to different names at the same location.
When you rename data sets, if you select a different directory, the data set
will be moved to the target directory. You can combine the move with a rename
if you specify both a different target directory and a new name, which we will
do soon.
Delete a grid theme data source
- From the File menu, select Manage Data Sources.
- Navigate to the C:\temp directory.
- Select Grid as the Source Type.
- Select pf_dem.
- Click Delete.
- Authorize the deletion by clicking Yes.

- Dismiss the Manage Data Sources dialog.
- View the contents of your C:\temp directory in the Windows Explorer
to see the effect of the deletion.
You have just deleted a grid data set from the hard drive. Once a data set
is deleted using the Manage Data Source in ArcView 3.x, the deletion cannot
be undone, so make sure that you are aware of what you are doing! This is the
only way you can correctly delete grid data sources. Also, be aware that the
grid needed to be removed from the project and (usually) the project saved before
deleting from the file system.
Though we have not covered grid processing yet, you need to use this method
of deleting grid data sets whenever you want to delete grids. Using any other
method (e.g., deleting the grid directory using the Windows Explorer) will cause
data corruption or other strange problems.
Copy an image theme data source
- Open a Windows Explorer.
- Navigate to the packgis\forest directory on the CD.
- Hold down the <CTRL> key, then click each of the ortho_91.*
files to select them all.
[Note: the notation file.* means all files matching the pattern "file,
dot, any characters." In this example, the file is ortho_91,
and the "*" means any file extension (here, this matches
the file extensions bil, bilw, hdr, and stx)].

- Select Edit > Copy from the menu.
- Navigate to the C:\temp directory and select Edit > Paste.
Note that the main image file is large (22 MB), and will take awhile to copy.
- Now add the newly copied theme to the view. You should see that it draws
more quickly (because the hard drive has faster access speed than the CD).
- Add this theme to the view, making sure to specify Image Data Source.
- Turn the theme on.
You have just copied an image theme source from the CD to the system hard drive.
Note that you have used an OS tool, rather than the ArcView 3.x Manage Data
Sources tool to do this. All files except ArcInfo data sets (i.e., coverages,
grids, and TINs) can be managed with OS tools. However, if you use this functionality,
you will need to make sure that you copy or move all files associated
with the data source, or you may corrupt your data. To aid in selecting all
the necessary files, use the Find function in the Windows Explorer.
Convert a coverage theme to a shapefile
- Use the Add Theme button to add the roads theme from the packgis\forest
directory on the CD.
- Do not double-click on the name of the data source, but single-click on
the folder icon for the data source. Remember from the last assignment? The
roads data source contains feature data sources for arcs and nodes. We are
interested in the arcs as well as the nodes.
- Press the <SHIFT> key and select the two themes from the roads
source.

- OK the addition of these themes. Two themes will be added to the
view.
- Of these two new themes, make the line theme active.
- Select Theme > Convert to Shapefile from the menu.
- Save the new theme data source as roads.shp on the removable disk.

- Do not add the new theme to the view when ArcView 3.x asks
(we will rename this in a moment, and if the shapefile is present in the project,
it will be "locked").
You have just exported a coverage data source to a shapefile data source. That
shapefile is much easier to manage than the original ArcInfo coverage data source.
You can export any vector data to a shapefile, regardless of the data source
type. You can use the Manage Data Sources tool to copy, move, rename,
or delete this new shapefile. We will move and rename the shapefile in the next
step.
Rename a shapefile
- From the File menu, select Manage Data Sources.
- Navigate to the removable drive directory.
- Select Shapefile as the Source Type.
- Select roads.shp.
- Click Rename, and navigate to the c:\temp directory, then
enter the new name road_line.shp.

Renaming a data set by assigning it a new directory will simultaneously move/rename
the data set and delete the original copy.
- Click OK to rename the shapefile.
- Add the new shapefile to your view and turn it on.
You have just renamed and moved an ArcView 3.x shapefile. Using this functionality
in ArcView 3.x renames all individual system files comprising the shapefile.
You have also used this method to move the shapefile to another directory. You
could optionally have done this using the Windows Explorer, but that would have
necessitated renaming and moving at least 3 separate files, whereas in ArcView
3.x you can perform this in one step.
Archive a set of data
- If you want to use WinZip, continue from here (you'll need to download and
install). If you don't want to install WinZip, you should jump
ahead to using Zip.
- Download the WinZip installation file (from WinZip.
When you go to the WinZip page, follow the link to Download Evaluation
Version).
- After you download the file, run it from the Windows Explorer and follow
the installation instructions.
[Note: This may not be possible, based on the privilege level you have
on the machine you are working on, so if the installation fails, jump
ahead to using Zip.]
- Accept all the default choices in the installation.
- Choose to open with the WinZip Classic Interface.
- Using the Windows Explorer, navigate to the C:\temp directory,
where you have been saving files.
- Select all the road_line.* Files You should see 5 files.

- Right-hand click and select the Add to zip option.
- Accept the licensing agreement from WinZip.
- Click New on the WinZip Add dialog.

- Check to see that you have a directory called C:\temp. If this
directory does not exist, create it now.
- In the File name text entry control, type in road_line.zip
and then click OK. [Note: you do not need to provide a path name
if you are in the directory where you want the new zip file to be created.]

- Click Add in the WinZip Add dialog. WinZip will add the
5 files to a new zip archive.

- Close the WinZip application.
- Using the Windows Explorer, verify that there is a file called road_line.zip
in the C:\temp directory.

- Using the Windows Explorer, move the new zip file to your removable
disk.
- Double-click the road_line.zip. When the file opens, you should
see all of the 5 source files for the road_line.shp shapefile theme
source. Click the Extract button to uncompress and extract the
component files to your removable disk.

- Use Zip to archive and extract the data. If you
want to be a "power user," try this method instead of WinZip.
- Open a Command Prompt. If there is no obvious shortcut to be found,
the fastest way to do this is to press the <Windows> key,
then tap the <R> key.
- When the Run dialog opens, enter cmd in the Open
control and click OK.
- Change directories to C:\temp with the command
cd \temp
- Use the zip command from the CD. The command (make sure and alter your
drive letters accordingly if your CD is not drive E) is shown here:
e:\unix\zip roadline.zip
road_line.*
This instructs the command prompt to use the zip executable on the CD,
to create a file in the current working directory called roadline.zip
from all the files matching the pattern road_line.* in the current
directory.
This is what your command prompt should look like. [Your commands will
not be shown in red, but are displayed here for the sake of clarity.]

- Change drives to the removable drive (in this case, assuming the removable
drive is drive D, the command is just)
d:
- Unzip the zip file, using the command
e:\unix\unzip c:\temp\roadline.zip
This tells the command prompt to unzip the roadline.zip file from
the C:\temp directory into the current directory (now D, the removable
disk). [Your commands will not be shown in red, but are displayed here
for the sake of clarity.]
- Add the newly uncompressed shapefile to a view to verify that the process
occurred without error.
- Close ArcView 3.x.
You have just created a zip file archive of the files comprising a shapefile.
The zip file can be copied around the file system or from system to system.
Unzipping the file will restore the shape file data source, which can be added
to a new or existing ArcView 3.x project. This is a good method of archiving
and moving a large number of files, because you will only need to manage the
one zip file rather than a number of individual files.
"Move" an ArcView 3.x project
- Open ArcView 3.x. Do not use the cfr250.apr project.
- Create a directory called myname in C:\temp on the hard drive.
(Use your name, not the string "myname".)
- Create a new view and add the Boundary and Streams themes
from the CD.
- Convert both of these themes to shapefiles (menu: Theme > Convert
to Shapefile), saved in the directory you just created.
Use the same names as the original themes, so that you have a new shapefile
called boundary.shp and one called streams.shp.
- When asked if you want the converted themes in the project, choose Yes.
- Delete the original Boundary and Streams themes from the view.
If you have opened any tables, delete these from the project as well.
[You have just made shapefile copies of the Boundary and Streams
ArcInfo coverage data source themes, and saved them on the hard drive.]
- Create a directory on your removable drive called proj_mgmt.
- Save the project on your removable drive in the proj_mgmt directory,
as move_proj.apr.
- Close the project.
- Using the Windows Explorer, move the \temp\myname folder to your
removable drive into the myfile directory. Make sure
you have deleted the \temp\myname folder from the hard drive.
- Open the project again, from its new location. It will begin to ask you
where the files are. This may have happened to you before (e.g., if you did
not use the cfr250.apr to open one of the course projects). Click Cancel
All. Because the project contains pointers to data that no longer exist
where the project expects, the project cannot find the data sets.
- Close the project without saving.
- In the Windows Explorer, find your move_proj.apr project. Select
(don't open) the project and from the menu, select Edit > Copy,
then Edit > Paste. This will create a safe backup copy of your project,
called Copy of move_proj.apr. Always copy the project file before you
attempt an edit.
- Open WordPad (<Windows> + <R>, enter write).
- Drag the project file from the Windows Explorer onto WordPad's title bar
(not onto the editing part of the window). This will open the project
as an ASCII file, which is just what an ArcView 3.x project file is. You will
see a lot of text that will mean nothing.

- From the menu, select Edit > Find and search for the string Path:.
This will scroll you through the file until the first occurrence of the search
string. Note that the Path statement shows the location of one of the files
loaded in the project. Use the <F3> key to find the next occurrence
of Path:

Keep this up until you find a text line pointing to the Boundary or
Streams theme, then dismiss the Find dialog.

Note that the Path of the data set now points to a file that no longer
exists (remember, we moved the directory myname from C:\temp
on the hard drive to the removable drive).
- Select the text from the start of the line through the directory, but not
including the theme name, as shown below.

- From the menu, select Edit > Copy. This copies the text into the
Windows clipboard.
- From the menu, select Edit > Replace. The Find what: control
will already be filled in with the search string. Click on the Replace
with: control and use the keystroke combination <CTRL-V>
(which will paste from the Windows clipboard into the Replace with:
control.).
- Alter the Replace with: string to point to the new location of your
data (which is the proj_mgmt directory on the removable drive), and
then click Replace All. After all replacements have been made, click
the Replace All button again in case the originally selected text was
not replaced. Dismiss the Replace dialog. Make sure to keep the tab
character (thick vertical bar) in both the Find and Replace controls.

You are instructing WordPad to find any text in the project file pointing
to a nonexistent directory, and replace it with text pointing to the now correct
location.
- Save the changes to the file and close WordPad. If you get a warning from
WordPad about saving in text-only format, click OK.
- Open the project in ArcView 3.x (without using the cfr250.apr project)
and it should load all the files it needs to, since the project has the correct
locations of all the files. If you still get error messages from ArcView 3.x,
you will need to reopen the project file and make necessary changes. Ask for
help if you need assistance.
You have just moved a project from one place to another on the file system.
You can use this technique to manage projects, but it is important that you
know exactly where all the source files are located, where you have moved them
to, and what they are called. The project files include Path: statements
that are absolute, including the drive letter of the data source. When projects
are moved, if the drive letters have changed, ArcView 3.x will not be able to
find the data sets.
If you make sure to always use the Startup Project, and save new files on the removable disk,
you will avoid needing to go through this process. The Startup Project accomplishes
this by substituting variables for drive letters. Always use the startup project
to reopen projects created with the startup project.
Continue on to Data Export....