The Shapefile Data Structure

Geodatabases are powerful and sophisticated data structures. In addition to topology, you get for free the area and perimeter of delineated areas and the lengths of linear features. However, Esri also supports a much less complex data structure: the shapefile.

A shapefile combines the same two essential major elements that geodatabases do: a (geo)graphic component and an attribute database. The database software is a relational database management system named dBASE.

A particular shapefile is restricted to represent only one of these types: points, multipoints, polylines, or polygons. With points, each individual point has a record in the relational database. If a number of points are considered the same object, then that object has only one record in the attribute table. As with geodatabases, polylines can be composed of one or more paths, connected or disjoint. However, the paths are allowed to be composed only of straight-line segments.

A polygon in a shapefile bears similarity to a polygon in a geodatabase, but no topology is present and none can be created. Each polygon is a stand-alone affair. It is delineated completely by one linear entity: a sequence of segments that starts in one geographic location and returns to that location. There may be adjacent polygons or not. Other polygons may overlap it. See Figure 4-14.

FIGURE 4-14 Shapefile polygons illustrating problems with overlaps and gaps. (Polygon W has a curving right boundary; polygon ...

Get Introducing Geographic Information Systems with ArcGIS: A Workbook Approach to Learning GIS, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.