
Introduction to
Geographic Information Systems in Forest Resources |
Exercise: Data Export
Objectives: Export ArcView data to other formats.
Exporting grid themes to generic raster format
Exporting feature themes to ArcInfo generate format
Exporting tables
"Exporting" views and layouts
Exporting grid themes to generic raster format
- Open a new project (use the cfr250.apr project on the CD).
- Set the Working Directory to your Zip disk.
- Enable the Spatial Analyst Extension.
- From the File menu, select Export Data Source.
- Select ASCII Raster as the export file type.

- Select the dem theme from the CD and click OK.

- Call the new file pf_dem.asc.

It will take several minutes to export this data set. This would be a good
time to check your e-mail or buy a book on Amazon.
- Notice that there are now two new files in the output directory. These are
the header and data files for the ASCII raster data set.
- Next, select File > Import Data Source to import the generic ASCII
raster data set.

- Select the pf_dem.asc file that was just created.

- Name the new output grid pf_dem2.
- Click Yes for creating integer values. This will assign integer values
to cells rather than floating-point (i.e., with decimal place values).

- Add the newly created grid theme to the view.

- Turn the theme on

Note that the new grid's legend does not have decimal places. This is because
the new grid is stored with integer values. Compare this to the original
grid, which is stored with floating-point precision.
You have just exported an ArcInfo format grid to generic ASCII raster file
format. The new file can be imported into ArcView or other GIS applications.
The file can be shared across file systems without danger of corruption. This
is frequently necessary if you are using another GIS that does not read the
ArcInfo grid format. Most image processing or GIS applications can import the
generic ASCII raster file. You could also use the generic binary raster format
in the same way.
Exporting feature themes to ArcInfo generate format
To export features as ArcInfo generate files, it is necessary to use a sample
script. Get the script by using help
Help >
Find >
view.shapetogenerate
View.ShapeToGenerate (Sample Script)
- Copy the script contents (use the Edit > Copy from the menu).
If ArcView help gives you trouble, get this
copy of the script, open it in a text editor, and copy the script text.
- Open a new script in the ArcView project.
- Paste the contents of the sample script into the empty script document (using
Edit > Paste).
- Compile the script by clicking the Compile button
in the script GUI. Scripts must be compiled before they
can be executed.
- Add the cfi point feature theme (from the CD:\packgis\forest
directory) to the view, and make it the only active theme.
- Make sure the view is the active document. Switch to make the script the
active document without clicking on any other windows, including the project
window. Remember you can switch active windows by using the Window
menu choice.
- Run the script by using the Run button
.
- Specify an output directory and name for the generate file.

- Specify the ID field (choose <None> for auto-numbering
of features; this will give each output point a unique ID value).

- When the process completes, you will have an ArcInfo format generate file.
- Open the generate file in WordPad, Word, or Notepad and examine the structure
of the file. Each point has an ID value and a coordinate.
You have just exported a proprietary ArcInfo coverage to a generic ASCII format
that can be used by a variety of other software. The generate format can be
read by other GIS software, or can be handled through custom programs.
Exporting tables
- Open the theme table for the cfi theme.
- From the menu, choose File > Export.
- Select dBase format, and select a directory and file name for the new file.


- The new dBase table will consist of all the fields from the original table.
Had there been a selection on the records, only selected records would be
exported.
- Open the dBase file in Excel and examine its contents. When opening a dBase
file in Excel, you will need to alter the Files of type control:

- Repeat the process, but create a Tab-delimited ASCII file instead. You can
open this in Excel as well. You should notice a difference in field names;
the dBase file may have truncated field names.
You have just exported a theme's table to dBase and generic ASCII files that
can be used in a variety of other applications. In conjunction with the generate
file created in the last step, you would be able to recreate a spatial data
theme in other GIS software. This technique can be used if there is no common
import-export method using proprietary data formats (such as shapefiles). Use
this when you need to get data out of ArcView into Excel or any other tabular
data management or database software.
"Exporting" views and layouts
Layouts and views can be saved as graphics files by selecting File >
Export while a view or layout is active.
The files that are created from exporting views and layouts can be used in
any application that supports these types of files:
Placeable Windows Metafile
Windows Metafile
Windows Bitmap
Encapsulated PostScript - New
Encapsulated PostScript - Old
Adobe Illustrator
CGM Binary
CGM Character
CGM Clear Text
JPEG
- Create a new view and add the streams, roads, and stands
themes from the CD.
- From the File menu, select Export. Make sure the file type
is Placeable WMF. In the Export dialog, navigate to your Zip
disk. In the File Name control, enter stand_stream_road as the
name of the Windows Metafile to create.

- Click Options and select the highest resolution value.
Click OK.
- OK the Export dialog.
- Open Microsoft Word. Use the menu control Insert > Picture > From
File and navigate to your Zip disk.

Double-click the WMF file you just created. This will add it to your Word
document.
The Windows Metafile is a hybrid raster/vector format. If there are raster
data sources in your WMF, that "layer" of the WMF will be represented
as a bitmap. Any vector data sources in the WMF will be represented in the
WMF as vector points, lines, and polygons. WMF is a good choice for export
of vector graphics, because the crispness of the vector features is maintained
in the graphic.
- If you still have time, experiment with exporting to different formats (Windows
BMP, JPEG, etc.) and different export DPI resolutions. As you import these
other graphics formats, you will see differences in image quality. Try resizing
the graphics to see how this affects image quality.