Compressing file geodatabase data

To reduce storage requirements, you can compress vector file geodatabase feature classes and tables (collectively referred to as datasets in the rest of this topic) to a read-only format. Once compressed, display and query performance is comparable to decompressed data. You might find it provides slight performance improvements in some operations but slows slightly in others.

The compression applied is lossless; that is, when you compress data, no information is lost, regardless of the coordinate system or types of attribute data the feature class or table contains. Where compressed datasets differ from decompressed data is in editing: a compressed dataset is read-only and therefore cannot be edited or modified in any way except for changing its name and modifying attribute indexes and metadata.

Once compressed, a dataset looks the same in ArcCatalog and ArcMap as when it was decompressed. Also, apart from editing, you work with it the same way. The compressed data is a direct-access format, so you do not have to decompress it each time you access it; ArcGIS and ArcReader read it directly.

Compression is ideally suited to mature datasets that do not require further editing. However, if required, a compressed dataset can always be decompressed to return it to its original, read/write format.

Compressing data

You can compress a geodatabase, feature dataset, stand-alone feature class, or table. You need only right-click the item in the Catalog tree and click Compress File Geodatabase.

When you compress a geodatabase, all feature classes and tables within it are compressed. When you compress a feature dataset, all its feature classes are compressed.

The ability to compress and decompress is also available through geoprocessing tools in the File Geodatabase toolset, located in the Data Management toolbox. For more information, see An overview of the File Geodatabase toolset.

A compressed feature class or table looks the same as when it was decompressed, but you can tell whether data is compressed by viewing a list of feature classes and tables on the ArcCatalog Contents tab. A compressed feature class or table has "(compressed)" in the Type column.

The ArcCatalog Contents tab reveals whether a dataset is compressed

Another way you can tell is by opening either the feature class or table Properties dialog box. The General tab states whether the data is compressed.

Benefits of compression

Compressed file geodatabase data takes up less disk space than decompressed data while still offering comparable display and query performance.

The amount of compression possible in feature classes and tables can range from a negligible amount to a ratio exceeding 4:1. The makeup of coordinates and the number of attribute fields and their contents determine the amount of compression possible.

The most important factor for feature classes is the average number of vertices per feature. Points and simple two-vertex lines compress more than lines or polygons with many vertices. A feature class of address points or roads with few vertices, for example, may compress by a ratio of 3:1, whereas a feature class of rivers or soil data with many vertices per feature may only compress by a ratio of 3:2. Features with many vertices already store efficiently when decompressed, and as a result, there is less potential for compression. Attribute fields also play a role in determining the amount of compression: text, integer, and date fields compress better than floats and doubles.

The following examples compare decompressed and compressed format file sizes. The feature class achieving the greatest amount of compression relative to its original size, Europe places, is a point feature class. The feature class with the least amount of compression, Mexico roads, is a line feature class with many vertices per feature.

Feature class

Decompressed size

Compressed size

Compression ratio

Europe places (61,541 point features, 14 fields)

6.2 MB

1.3 MB

4.8

Germany streets (7,118,614 line features, 83 fields)

2.3 GB

511 MB

4.5

U.S. census blocks (8,205,055 point features, 11 fields)

705 MB

162 MB

4.4

California roads (2,092,079 line features, 29 fields)

329 MB

83 MB

3.9

Europe rails (383,531 line features, 12 fields)

58 MB

17 MB

3.4

Calgary addresses (285,285 point features, 8 fields)

21 MB

7.4 MB

2.8

Calgary buildings (319,000 polygon features, 9 fields)

48 MB

20 MB

2.4

U.S. rivers and streams (2,844,231 line features, 9 fields)

878 MB

442 MB

2.0

U.S. counties (3,140 polygon features, 57 fields)

1.6 MB

1.0 MB

1.6

Europe water (232,375 polygon features, 10 fields)

176 MB

125 MB

1.4

U.S. traffic analysis zones (166,747 polygon features, 10 fields)

68 MB

46 MB

1.4

Mexico roads (5,847 line features, 7 fields)

3.5 MB

2.7 MB

1.3

Comparison of standard and compressed formats

Tables usually compress by a ratio exceeding 2:1. Redundancy is the most important factor; fields with values that often don't change from one record to the next compress better than fields with many unique values. As with feature classes, text, integer and date fields compress better than floats and doubles.

While you can compress data of any size, compression is most useful when applied to large amounts of data. Compressing large datasets or many medium or small-sized datasets can yield significant storage savings, which can be helpful when you're pressed for disk space or are trying to fit data onto a CD or DVD. For example, an 8.9 GB file geodatabase of U.S. census data can compress down to 3.4 GB—small enough to fit onto a DVD.

When minimizing storage requirements, keep in mind that file geodatabase compression may not be the only option at your disposal. If your data is stored at an x,y resolution that is smaller than necessary, you can lower storage requirements by reloading the data to a larger resolution before compressing. For example, if you have a dataset that stores at the default resolution of 1/10millimeter but you know the data is only accurate to 1 meter, you could reload the data to a 1-meter resolution. As an example, reloading the 1/10-millimeter resolution Calgary buildings feature class to a 1-meter resolution reduces storage from 48 to 31 MB. Compressing the 31 MB feature class further reduces the size of the data to 12 MB.

Feature class

Decompressed size

Compressed size

Calgary buildings, 0.0001-meter resolution

48 MB

20 MB

Calgary buildings, 1.0-meter resolution

31 MB

12 MB

The effects of x,y resolution on storage

To reload a feature class to a different resolution, export the data to a new feature class. Right-click the feature class in the Catalog tree and choose Export > To Geodatabase (choose the Multiple command to export multiple feature classes at once). Specify the new resolution on the Environments dialog box before you export. For more information, see XY Resolution, Z Resolution, and Feature Class To Feature Class.

What you can compress

You can compress a geodatabase, feature dataset, stand-alone feature class, or table. When you compress a geodatabase, all feature classes and tables within it are compressed. When you compress a feature dataset, all its feature classes are compressed. Any item that cannot be compressed is skipped over. The following outlines those items in the Catalog tree that can be compressed and those that cannot.

File geodatabase data

Able to compress

Geodatabase

Yes(All vector feature classes and tables in the geodatabase compress.)

Feature dataset

Yes(All vector feature classes in the feature dataset compress.)

Feature class (stand-alone only)

Yes

Table

Yes

Raster dataset

No

Raster catalog

No

Terrain

No

Schematic

No

Cadastral fabric

No

Survey dataset

No

You cannot individually compress or decompress a feature class in a feature dataset. To compress or decompress a feature class in a feature dataset, you must compress or decompress all feature classes in the feature dataset.

Compressing raster datasets and catalogs is supported in a limited way by the file geodatabase geoprocessing tools in that you can individually compress one of these; however, this is not recommended as it does not decrease storage requirements. This support is provided strictly as a means to allow ArcGIS Publisher to access the tools when it packages to compressed and locked file geodatabase raster datasets and catalogs.

Restrictions when working with compressed data

In addition to not being able to edit a compressed feature class or table, there are a few minor restrictions that are explained here.

Once a feature class or table is compressed, the following properties cannot be modified:

The only properties that can be modified are the alias of the feature class or table and attribute indexes.

Compressed feature datasets allow you to add decompressed feature classes through operations such as creating a new, empty feature class; copying and pasting; and importing. This produces a mixed state where some feature classes in the feature dataset are compressed and others are not. If a feature dataset contains both compressed and decompressed feature classes, you will not be able to edit the decompressed feature classes. To edit a feature class in a feature dataset, all feature classes in the feature dataset must be decompressed.

You can compress feature classes in relationship classes, topologies, geometric networks, network datasets, and terrains. However, there are some restrictions related to these:

Relationship class

Topology

Geometric network

Network dataset

Terrain

Able to compress feature classes in these

Yes

Yes

Yes

Yes

Yes

Able to create on compressed feature classes

Yes

No

No

Yes

Yes

Able to edit properties

Yes

No

Yes

Yes

Yes

Working with relationship classes, topologies, geometric networks, and network datasets

11/18/2013