Shapefiles—Layout in the Computer

The format for a shapefile on a disk drive is also much simpler than that of a coverage or a geodatabase. Basically, at least three files in a folder are required for a shapefile. If a folder named AMENITIES contains a shapefile named LAWN_SPRINKLERS, then AMENITIES will contain at least these files:

  • lawn_sprinklers.shp (contains the geographic information)
  • lawn_sprinklers.shx (contains the spatial index to the geographic information)
  • lawn_sprinklers.dbf (contains the dBASE table for the attribute information)

Other files (lawn_sprinklers.sbx, lawn_sprinklers.sbn, lawn_sprinklers.prj (containing the projection information) and lawn_sprinklers.shp.xml (containing the metadata) may also be present. So the term “shapefile” is somewhat a misnomer, if one expects a single computer file. ArcCatalog, of course, represents as shapefile as a single entity, but to the operating system, it is several files. You could actually move a shapefile from one folder to another using the operating system. You would simply move all the constituent files, but this is not a recommended practice; use ArcCatalog instead. (Recall that with geodatabases there is no issue with moving or renaming because you can’t see the constituent feature classes with the operating system; they are locked away in a single database file.)

When you access a folder containing the files that make up a shapefile in ArcMap or ArcCatalog, you see only the designation—continuing our example—lawn_sprinklers.shp. ...

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.