Introduction to Geographic Information Systems in Forest Resources
UW Home GIS@UW Search
Syllabus Schedule Class Meetings Assignments Course Data
Contact Us CFR 520 Lab Locations Software Collect It Page


Data Export

Discussion:

All GIS software should contain routines for exporting data. For some GIS software, such as ArcInfo, which has a strong position as a data development application, data export routines have been an early and important component.

Other software products designed originally for query and display, such as ArcView 3.x, generally have limited export capabilities. These products have historically been more interested in getting data in than getting data out.

ArcGIS has numerous options for exporting data.


  1. Converting feature layers to shapefiles
  2. Converting selected features of a layer to a shapefile
  3. Converting feature layers to a Geodatabase
  4. Converting feature layers to rasters
  5. Converting images to grids
  6. Exporting grid layers to generic raster format
  7. Exporting feature layers to ArcInfo generate format
  8. Exporting tables
  9. "Exporting" views and layouts
  10. Exporting 3D scenes as VRML


Converting feature layers to shapefiles

Feature layers can be "exported" to shapefiles. This means that an ArcInfo coverage, CAD drawing, an event layer, or even another shapefile, can be converted to a shapefile. In fact, any supported vector dataset (i.e., anything that appears in a view as points, lines, or polygons) can be converted to the shapefile format. Supported datasets are described in Getting Data into ArcGIS .

Converting other data sources to shapefiles can be handy when you need to create a feature data source to be moved across a file system or from one machine to another. If you have a shapefile, you can copy the component files across file systems or computers.

Contrast this to the ArcInfo data structure, in which a single feature layer source consists of data files spread across more than one directory, and it is impossible to manage the coverage with just the operating system.

When a new shapefile is created from an existing layer, ArcGIS will ask if you want to add this new shapefile as a layer to the current data frame. If you do not add the layer to the data frame, the shapefile will still exist on the disk, and can be used later.

Here, the original stands layer is an ArcInfo coverage dataset.

Here it will be converted to a shape file.

Note that a vector layer can be exported to one of three different data types (File and Personal Geodatabase feature class, Shapefile, or Spatial Database Engine feature class):

You can see that there are now two layers representing stands; one is from a coverage data source, and the other is from a shapefile data source.


Converting selected features of a layer to a shapefile

Sometimes, you may wish to display only a subset of features of a given layer. One way to accomplish this is to apply a filter to the layer, so that only select features display. Another method is to create a new dataset based on a selection of features. When a set of (one or more) features is selected, and the layer is converted to a shapefile, only the selected set is written to the new shapefile.

Here, only the > 100 year old stands from the stands.shp shapefile are converted to a shapefile of their own:

The selected stands are highlighted in cyan.

This selected set is converted to a shapefile:

Note: if you want to create a shapefile consisting of all the features of a layer, make sure you have no active selection on the layer. Otherwise your new layer will consist of only selected features!


Converting feature layers to a geodatabase

It is possible to convert feature layers and selections of feature layers to geodatabase feature classes. In order to do this, you need to have an existing geodatabase. The only difference between exporting to shapefile and geodatabase feature class is that you select the geodatabase to export to, and give a name to the output feature class. In the following image, the personal geodatabase is proj_mgmt.mdb and the feature class is called stands. Creating geodatabases will be covered in the lesson on creating feature layers.


Converting feature layers to rasters

We will cover raster data and analysis later in the term, but it is possible, under certain constraints, to convert between feature layers and rasters. This is typically done only when you need to analyze point, line, and polygon data with other raster data, or if you have categorical raster data that can be converted to polygons for vector analysis.


Converting image layers to grids

Supported raster datasets, including images, can be converted to grid datasets. The output grids will have cell values identical to the pixel values in the input image. Multi-band images can be converted to grids, one output grid per input image band. While both image and grid data sources are rasters, grids are a special type of raster that can have attribute tables with several fields (whereas simple images only have a single value per pixel)

We will cover exporting grids later in the course. See the exercise on Remote Sensing for an example of converting a 7-band LandSat TM image to a series of 7 grids. Converting single-band images is performed in the same manner, except that only a single output grid is created.


Exporting grid layers to generic raster format

A selected grid layer can be converted to a generic raster file by using the File > Export Data Source menu choice. This allows a grid layer to be converted to a generic raster format.

The two supported output raster formats are ASCII and binary (IEEE format).

The generic ASCII raster file is a single file composed of 6 lines of header (descriptive and georeferencing) data, followed by lattice mesh point (grid cell) values.

The generic binary raster file format export routine creates two files, an ASCII header file and a binary file containing the actual grid data. When archiving or distributing binary generic raster files, make sure to include both the header file and the binary file.

Both of these export options create stand-alone files that can be moved across file systems or platforms. The files can be imported at any time, which recreates an ArcInfo format grid. Other GIS or image processing software can read these type of nonproprietary raster file formats.


Exporting feature layers to ArcInfo generate format

The ArcInfo generate format is an ASCII file that can be used to create an ArcInfo (vector) coverage. Because the structure of a generate file is simple, generate files are also used in many other applications that cannot handle proprietary GIS data formats.

A sample script exists in ArcGIS that will allow you to create generate files from shapefiles.

Generate files are formatted like these simple examples:

point generate file format

sample file

meaning (of each line)

1, 100, 100
2,  99, 112
3, 112, 119
4, 121, 98
5, 107, 102
...
END
id (of point), x, y
id, x, y
id, x, y
id, x, y
id, x, y
other points
end (of file)

line generate file format

sample file

meaning (of each line)

101
2,3
4,3
4,6
END
101
2,3
4,3
4,6
END
102
2,1
3,2
END
...
END
id (of line)
x, y (vertex)
x, y
x, y
end (of line)
id (of line)
x, y
x, y
x, y
end (of line)
id (of line)
x, y
x, y
end (of line)
other lines
end (of file)

polygon generate file format

sample

meaning (of each line)

701,7,7.5
3,9
4,5
8,4
9,7
6,9
3,9
END
702,20,31
19,19
18,36
31,35
27,15
END
...
END
id (of poly), x, y (of label point)
x, y (vertex)
x, y (vertex)
x, y (vertex)
x, y (vertex)
x, y (vertex)
x, y (vertex)
end (of polygon)
id (of poly), x, y (of label point)
x, y (vertex)
x, y (vertex)
x, y (vertex)
x, y (vertex)
end (of polygon)
other polygons
end (of file)

Generate files can be used to recreate ArcInfo coverages, and if used in conjunction with exported tables, can also recreate the attribute data for coverages. You will most likely never need to use generate files, but it is a very simple file format if you need to brute-force a solution to import coordinates to another application.


Exporting tables

Tables are easily exported to any of the source formats (personal geodatabase table, dBASE, delimited text, INFO, and SDE table). Like the creation of any other file, the file type, name, and location on the file system needs to be provided during the export process. Exporting tables is performed by using the Options > Export control while a table is open and active.

If there are any active selections on tables, only selected records will be exported. If you want to export all records from the table, make sure to clear any active selections.

A word of caution: the dBASE files that ArcGIS uses to store data have a 10-character limit on field names. If you have a source table containing fields with names longer than 10 characters, ArcGIS exported tables will output only the first 10 characters of the field names.

If you export to delimited text, complete field names will be exported, even if the field names are longer than 10 characters.


"Exporting" data frames and layouts

Layouts and data frames can be saved as graphics files by selecting File > Export Map from the menu. Details of this are covered in the cartography lab exercise.

There are a number of different output image formats. The files that are created from exporting data frames and layouts can be used in any application that supports these types of files.


Exporting 3D scenes as VRML

ArcScene or ArcGlobe views, which will be covered in 3-D Analysis and Surface Modeling, can be exported as VRML (Virtual Reality Markup Language) files, which can be loaded into Netscape or other applications that support VRML. The VRML file will look exactly like the 3D scene, including all features and symbols, offsets, and extrusions. A free VRML plug-in for Netscape and Microsoft Internet Explorer is available at Cosmo Software. Several other VRML viewers are available, such as GLView.

The VRML scene's symbology cannot be altered in the web browser, but users do not need ArcGIS or other specialized software in order to view and navigate the surface model.

VRML files can take a long time to generate, and the files can be very large. TINs are generally far more compact than grids when exporting to VRML. Here is an image of a 3D scene within ArcGIS.

And the same scene exported as a VRML file displayed within a web browser:

You can create ArcScene or ArcGlobe documents and then publish them to web pages; a number of free VRML viewers exist.

 

Return to top | Ahead to Help Topics


Syllabus Schedule Class Meetings Assignments Course Data
Contact Us CFR 520 Lab Locations Software Collect It Page

 

The University of Washington Spatial Technology, GIS, and Remote Sensing Page is supported by the School of Forest Resources
School of Forest Resources