Geodatabases

From Wildsong
Revision as of 02:38, 10 November 2011 by Brian Wilson (talk | contribs)
Jump to navigationJump to search

This page was started long ago before the development of the ESRI File Geodatabase.

Introduction to Geodatabases

2006 - These are notes written as I attemot to learn to use ESRI geodatabases. More specifically, the variation known as the "personal geodatabase" (or PGDB).

2011 update - Personal Geodatabases can now safely be considered obsolete. They will be around forever of course, but there is no longer a reason to create a new one. They are based on the MS Access database tables. They are not (officially) portable to other operating systems because of this.

ESRI never documented them.

Now we have File Geodatabases (FGDB), also not documented. They come in several flavors, which are not compatible.

And they wonder why I get excited about open source GIS.

Scope

I am not attempting to duplicate the ESRI documentation. As I learn new things about geodatabases, I will write about it here to help cement it more firmly in my head, and so that I can refer back to it later.

Links to ESRI geodatabase stuff

Datamodels Tips and Tricks (Make sure you check this page out...)

ArcGIS Desktop documentation The "Geodatabase Workbook" contains a quickstart guide and exercises. The "Building Geodatbases" book is more complete.

ArcGIS 8.3 versions

These two books are the sources for most of my knowledge of Geodatabases. There is also a book from ESRI Press "Designing Geodatabases" but you should really get the above (free) docs under your belt before looking at it.

Two main types of ESRI geodatabase

Multiuser Geodatabase -- if you use ArcSDE-based geodatabases, you get version control and multiuser features. ArcSDE is the 'application tier'; a layer of software that contains the geospatial features required to implement a geodatabase on top of various backend databases (Oracle, SQL Server, DB2, etc) which might or might not have any builtin spatial features.

File - based geodatabases -- the "personal" version based on the MS Access ("Jet") database format, and the newer FGDB version. These allow many of the same features as SDE for an individual user. No support for multiuser or versioned access. (In fact, I have seen Jet files blown apart if more than one user writes to it... I have heard people claim that multiuser access to Jet files is fine but my own bad experiences belie this.)

Terminology

An informal Comparison of geodata formats

Data model: a template that you can use to build a geodatabase, including documentation and suggested feature classes and topology rules

Feature Dataset: Feature class(es) + topology + network objects A GDB can contain multiple Feature Datasets.

Feature Class: a table containing spatial data + attributes

Table: rows and columns of data; can contain spatial fields

Topology: rules defining requirements for data to be stored in a dataset

Geometric network: topology rules defining how spatial features are connected

Vector data -- Network Survey data Raster data (ArcGIS 9.0+) --

Raster catalog -- You can have multiple rasters in a feature class, for example to store aerial photos when you don't want to create a mosaic.

Raster time series - you can have multiple rasters in a feature class ordered as layers and sorted by time; you can use the ordering to control how overlapping rasters are layered, too.

Relationship class: binds tables together; can contain additional data.

Annotation --

Metadata --

Tabular data --

Topology rules --

XML (ArcGIS 9.0+) -- XML can be used to import and export data. The geodatabase XML schema is documented on the ESRI site.

Here we go

You can think of a GDB as simply a container into which you shove a bunch of shapefiles. That's fine, you can use them that way. But if you do, you are missing out on half the fun.

Shapefiles are actually very limited. When you are trying to use GIS to describe geospatial data, does one shapefile do it for you? No; you have to have a set of shapefiles, tied together by an ArcView project (MXD file) and some extra notes and documentation (in a file or on postit notes on your monitor frame.)

Tips and tricks

Establishing a spatial reference

The ESRI docs make it seem simple, and it is but you have to doo things in the right order. If you don't you will get import errors complaining about data exceeding the xy domain and things like that...

  1. In ArcCatalog, create a new GDB.
  2. Create a new feature dataset in the GDB. All feature classes in a feature dataset must have the same spatial reference so you have to define it before going on. You want the extent (the xy domain) to be big enough to accomodate any data you will ever put in this dataset.
  3. When you create the dataset, set its projection using the feature class you will use in the next step.
  4. Import the feature class, one that covers the entire study area and has the right projection. For example, if I am working with Florida counties I will use a polygon file containing boundaries for all counties in the state of Florida. ArcCatalog automatically makes the extent a little bigger than the extent of the imported file.

Importing CAD data

Using spatial adjustment tools

Attribute transfer

Topology rules

Utility Network Analyst -- Download more tools from the ArcScripts site

Geodatabase Designer 2 GD2 is set of tools to export and import geodatabase schema using XML. You can save the geometric network and then restore it after doing a data load; ArcCatalog forces you to drop any existing geo network to load new data so this tool lets you work around this.

CASE tools -- in ArcCatalog, tool->customize->commands -> Schema Wizard to generate a new geodatabase