Generated by GPT-5-mini| Shapefile | |
|---|---|
| Name | Shapefile |
| Extension | .shp, .shx, .dbf, .prj |
| Developer | Esri |
| Released | 1992 |
| Genre | Geographic information system format |
Shapefile is a geospatial vector data format widely used in ArcGIS, QGIS, MapInfo, GDAL, and other Esri-ecosystem tools for storing geometric location and associated attribute information. It balances simplicity and interoperability, enabling exchange among platforms such as PostGIS, GeoServer, OpenStreetMap tooling, GRASS GIS, and bespoke applications in Python, R (programming language), Java, and C#. Despite proliferation of newer formats like GeoJSON, KML, GPKG, and FlatGeobuf, it remains entrenched in workflows across agencies including USGS, NOAA, NASA, Ordnance Survey, and municipal planning departments.
Shapefile encapsulates vector primitives—points, polylines, and polygons—designed for desktop systems such as ArcView and enterprise stacks like ArcGIS Server. It interoperates with database systems including SQLite, PostgreSQL, and spatial extensions such as PostGIS, and is consumed by libraries like OGR Simple Features Library and GDAL. Organizations including United Nations, World Bank, European Space Agency, National Park Service, and Environment Agency (England) have historically distributed datasets in the format.
A Shapefile is not a single file but a set: a main geometric file (.shp), a shape index (.shx), and an attribute table (.dbf). Optional companions include a projection file (.prj) and an index (.sbn, .sbx); metadata may be stored in companion formats such as ISO 19115-compliant XML alongside FGDC records. The .dbf uses the dBASE format, readable by tools like Microsoft Access, LibreOffice, and SAS. The binary layout references big-endian and little-endian fields, making parsers in C++, Python (programming language), JavaScript, and Go (programming language) common.
Coordinates in the geometric file are numeric XY pairs stored in the coordinate space of the dataset; a .prj file commonly contains Well-Known Text conforming to EPSG definitions such as EPSG:4326 (WGS 84) or EPSG:3857 (Web Mercator) used by OpenStreetMap and Google Maps. GIS software such as ArcGIS Pro, QGIS, MapServer, and GeoServer perform datum transformations using libraries like PROJ and reference registries maintained by EPSG Geodetic Parameter Dataset and agencies such as NOAA National Geodetic Survey.
Geometry types are limited to Point, PolyLine, Polygon, MultiPoint, and variants; attributes are stored in the .dbf table with field types inherited from dBASE. Attribute joins and relational operations are performed against systems like PostGIS and SpatiaLite; thematic mapping and classification routines in QGIS and ArcMap rely on attribute schemas for choropleth and symbology. Many datasets distributed by US Census Bureau, Natural Earth, OpenStreetMap extracts, and Eurostat rely on attribute conventions tied to identifiers used in INSPIRE and national gazetteers.
Broad support exists across desktop, server, and library ecosystems: ArcGIS, QGIS, MapInfo Professional, FME, GDAL/OGR, PostGIS, GeoServer, Mapnik, and Leaflet plugins. Programming bindings in Python (programming language) (pyshp, Fiona, Shapely), R (programming language) (rgdal, sf), Java (GeoTools), and .NET enable automation for tasks in spatial analysis, routing, cadastral systems used by national agencies, environmental modeling performed by USGS and EPA, and web mapping by organizations like Mapbox.
Critiques include lack of support for topology, mixed geometry types per file, field name length limits from dBASE, poor Unicode handling, absence of standardized metadata tagging, and storage inefficiencies for large complex geometries compared with formats like GPKG and FlatGeobuf. The geometry precision limits and single-projection assumptions complicate workflows in agencies such as NOAA, NASA, and European Environment Agency when performing high-precision geodetic analyses. Interoperability issues arise when exchanging with standards-based services such as WFS and WMS unless conversion is performed via GDAL or FME.
Introduced by Esri in the early 1990s for use with ArcView GIS and related products, the format evolved through proprietary desktop GIS adoption and widespread distribution by institutions including USGS, Ordnance Survey, Natural Resources Canada, UNEP, and municipal governments. Community tooling emerged in projects like GDAL, OGR, GeoTools, Fiona, and PostGIS to parse and convert Shapefiles, enabling integration with open data portals and scientific workflows in NASA Earthdata and national mapping agencies. While successors and standards bodies—OGC, ISO/TC 211—have promoted alternatives, the format’s ubiquity in historical archives, legacy systems at European Commission agencies, and data portals ensures continued relevance.
Category:Geographic information systems