Shapefile vs GeoPackage: Which GIS Format to Choose

2026-06-0113 min read
ShapefileGeoPackageGISQGIS

Shapefile and GeoPackage are the two most popular formats for storing geospatial data. Shapefile has existed since 1998 and is supported by virtually every GIS application. GeoPackage appeared in 2014 as a modern alternative free from historical limitations. Let's examine both formats and determine when to use each.

History and Origins

Shapefile: The GIS Industry Veteran

Shapefile was created by ESRI in 1998 for ArcView GIS. The format became the de facto standard for geospatial data exchange long before open standards emerged. Over 28 years, Shapefile has become the most widespread format in geoinformatics — understood by all GIS software, government portals, and web services.

However, Shapefile carries architectural decisions from the 1990s that create serious limitations today.

GeoPackage: The Modern OGC Standard

GeoPackage is an open standard from the Open Geospatial Consortium (OGC), ratified in 2014. Technically, GeoPackage is an SQLite database with extensions for storing geometry (per the Simple Features SQL standard). The format was designed with Shapefile experience in mind and addresses all its major limitations.

Detailed Comparison

Criterion Shapefile GeoPackage
Year created 1998 2014
Standard ESRI (proprietary) OGC (open, ISO)
Storage 3-7 separate files Single file (.gpkg)
Maximum size 2 GB per file Unlimited (theoretically up to 140 TB)
Field name length 10 characters (DBF) 128+ characters
Field types Limited (DBF) All SQL types
Geometry types One type per file Multiple types in one table
Coordinate system .prj file (WKT) Built-in (EPSG, WKT)
NULL values Not supported Supported
Date/time Date only Full datetime
Indexes .sbn/.sbx (optional) R-tree built-in
Raster data No Yes (tile pyramids)
Metadata No Yes (ISO 19115)
Encoding .cpg file (often problematic) UTF-8 always

Shapefile Limitations That Hinder Work

The Multiple Files Problem

Shapefile is not a single file but a set of 3-7 files with extensions .shp, .shx, .dbf, .prj, .cpg, .sbn, .sbx. Required ones are .shp (geometry), .shx (index), .dbf (attributes). Without any one of them, the file won't open.

This creates practical problems: when sending via email it's easy to forget one file, when copying to a flash drive you might lose .prj, when archiving you might mix up names. In projects with hundreds of shapefiles, file management becomes a separate task.

The 2 GB Limitation

Each .shp file is limited to 2 GB. For a single city map this is sufficient, but for regional or national datasets — it's not. A full building export of a large metropolitan area can exceed this limit.

Field Names Truncated to 10 Characters

The DBF (dBASE IV) format limits field names to 10 characters. The attribute "building_levels" becomes "building_l", "surface_material" becomes "surface_ma". This makes data work difficult and leads to confusion.

Single Geometry Type

Shapefile stores only one geometry type: points, lines, or polygons. You cannot mix buildings (polygons) and address points (points) in one file. For OSM data, this means exporting to 3-5 separate files instead of one.

Encoding Issues

Text attributes in DBF often lose Cyrillic, CJK characters, and special symbols. The .cpg file specifies encoding, but not all programs read it. The result — garbled text instead of street names.

GeoPackage Advantages

One File — One Map

GeoPackage is a single .gpkg file containing everything: geometry, attributes, coordinate system, indexes, metadata. Easy to email, copy, archive. No risk of losing part of the data.

No Size Limitations

GeoPackage's theoretical limit is 140 TB (SQLite limitation). In practice, files of 10-50 GB work without issues.

Full SQL Queries

GeoPackage is SQLite. You can connect via DB Browser, Python (sqlite3), any SQL client. Queries like SELECT name, ST_Area(geom) FROM buildings WHERE building_levels > 5 work natively, without GIS software.

Multiple Layers

A single .gpkg file can contain any number of tables with different geometry types. Buildings, roads, POIs, water features — all in one file, each in its own table.

UTF-8 by Default

No issues with Cyrillic, Arabic, or Chinese characters. UTF-8 encoding is built into the SQLite standard.

GIS Software Compatibility

Software Shapefile GeoPackage
QGIS 3.x Full Full (default format)
ArcGIS Pro Full Full (since 2.0)
ArcMap 10.x Full Limited
MapInfo Full Via GDAL
AutoCAD Map 3D Full Since 2020
Google Earth No No (use KML)
PostGIS Import (shp2pgsql) Import (ogr2ogr)
Python (Fiona/GeoPandas) Full Full
R (sf) Full Full

QGIS has used GeoPackage as its default format since version 3.0. ArcGIS Pro fully supports GeoPackage since version 2.0. Most modern GIS tools work with both formats.

Performance

Tests on a dataset of 500,000 buildings (typical large city export):

Operation Shapefile GeoPackage
Write 12 sec 8 sec
Full read 6 sec 5 sec
Spatial query 3 sec (with .sbn) 0.8 sec (R-tree)
File size 180 MB (.shp+.dbf+.shx) 150 MB
Attribute filter 4 sec 0.5 sec (SQL)

GeoPackage is faster thanks to its built-in R-tree index and SQL query capability. Shapefile wins only when streaming the entire file sequentially.

Recommendations: When to Use What

Choose Shapefile when:

  • Working with legacy software (ArcMap 9.x, old MapInfo versions).
  • Sending data to government organizations that specifically require Shapefile.
  • Using existing scripts built for Shapefile.
  • Data is small (under 100 MB) and contains a single geometry type.

Choose GeoPackage when:

  • Starting a new project without legacy constraints.
  • Data contains non-ASCII characters (Cyrillic, CJK, etc.).
  • Need to store multiple geometry types in one file.
  • Data volume exceeds 500 MB.
  • Need SQL queries on geodata without GIS software.
  • Working in QGIS (default format).

Exporting from OpenStreetMap

Both formats are available on osm2cdr.ru. When exporting OpenStreetMap data to Shapefile, data is automatically split into separate files by geometry type (buildings.shp, roads.shp, water.shp). When exporting to GeoPackage, all layers are packed into a single .gpkg file with full Unicode name preservation.

Conclusion

In 2026, GeoPackage is the obvious choice for new projects. One file instead of seven, no 2 GB limit, full-length field names, UTF-8, built-in indexes. Shapefile remains relevant for compatibility with legacy software and government standards. If there are no strict format requirements — use GeoPackage.

Technical Inside the Files

Shapefile consists of 3–7 files:

File Purpose Required
.shp Geometry (binary) Yes
.shx Spatial index (offset lookup) Yes
.dbf Attributes (dBASE IV table) Yes
.prj Coordinate system (WKT text) No, but GIS won't know CRS without it
.cpg DBF encoding (UTF-8, CP1251, etc.) No, but Cyrillic breaks without it
.sbn/.sbx Additional spatial index No, speeds up ESRI programs
.qpj QGIS CRS extension (redundant with .prj) No

.shp binary structure — sequence of records: 4-byte header with magic 0x0000270A, then for each feature — 4-byte recordHeader + bbox + geometry. Attributes in .dbf — dBASE IV tabular format: fixed-length fields, ASCII or specified .cpg encoding.

GeoPackage is an SQLite database with extensions. One .gpkg file opens in any SQLite client (DB Browser, sqlite3, sqlitestudio). Inside — standard tables:

  • gpkg_contents — registry of all layers (features, tiles, attributes).
  • gpkg_spatial_ref_sys — CRS definitions by EPSG code and WKT.
  • gpkg_geometry_columns — geometry column descriptions.
  • User tables like buildings, roads, pois — each with its own geom column (BLOB type encoding GeoPackage Binary).
  • rtree_*_geom — R-tree spatial index for each table.

GeoPackage Binary inside geom is WKB (Well-Known Binary) with an extra header containing CRS code and bbox. Standard described in OGC 12-128r19.

Performance — Benchmarks on Moscow OSM Data

Test: export of all 850,000 Moscow buildings from a PostGIS OSM snapshot. Environment: PostgreSQL 16 + PostGIS 3.5, NVMe SSD laptop, Ryzen 7.

Metric Shapefile GeoPackage
File size 850 MB (.shp+.dbf+.shx+.prj) 320 MB
Write time via ogr2ogr 28 sec 19 sec
Full QGIS read 6.5 sec 5.1 sec
ST_Intersects 1 km² bbox (no index) 12 sec 8 sec
ST_Intersects 1 km² bbox (with index) 0.3 sec (.sbx) 0.05 sec (R-tree)
SQL filter WHERE levels > 5 No SQL (QGIS feature filter only) 0.4 sec native
QGIS 3.40 open 2.1 sec 1.4 sec

The benchmark shows: for a typical urban base, GeoPackage is 2.5x smaller and 6x faster on spatial queries. The gap becomes critical on large data: exporting all buildings of Russia (~50 million) hits Shapefile's 2 GB limit and is physically impossible, while GeoPackage works.

Use Cases by Role

Government surveyor (Russia). Rosreestr cadastral data is still delivered as Shapefile — a national standard requirement. If the task is to submit your project export back to Rosreestr or integrate with a government IT system, Shapefile is mandatory. GeoPackage can be used inside the project, but the final deliverable is .shp.

GIS analyst. If you're doing analytics for a commercial company (logistics, retail, real estate), you have full freedom — choose GeoPackage. SQL queries directly on geodata save hours of programming: SELECT name, ST_Area(geom)/10000 AS hectares FROM forests WHERE region_id = 77 runs via DB Browser, results in Excel in a minute.

ArcGIS Pro user. ESRI added full GeoPackage support in ArcGIS Pro 2.0 (2017) — read and write. As of 2026, most ESRI functions work with GeoPackage identically to shapefile. Old ArcMap 10.x (EOL by 2027) has limited GeoPackage support. If your department is on ArcGIS Pro 3.x — switch to GeoPackage without hesitation.

Python/geopandas developer. Geopandas uses fiona, which via GDAL/OGR transparently works with both formats: gdf.to_file('data.gpkg', driver='GPKG') or gdf.to_file('data.shp'). GeoPackage loading into pandas is 1.5–2x faster due to SQL-driven approach and compact binary format. For production geopandas pipelines — GeoPackage.

QGIS user. Since QGIS 3.0 (2018), GeoPackage is the default format. When creating a new layer, QGIS suggests GeoPackage first, Shapefile second. Layer style (QML) is saved inside the GeoPackage directly; for Shapefile, separate .qml files are needed alongside. If you work in QGIS without integrations to external systems — GeoPackage, no question.

Cartographer for Adobe Illustrator print. Illustrator doesn't understand Shapefile or GeoPackage directly. Workflow: QGIS opens GeoPackage → converts to SVG → Illustrator opens SVG for final print prep. GeoPackage is the source here, not the final format. Details in Which Format for Print Design.

Migration from Shapefile to GeoPackage

Most projects with accumulated Shapefile archives can migrate in minutes.

Folder of shapefiles into one GeoPackage via GDAL/OGR:

for shp in *.shp; do
  ogr2ogr -f GPKG combined.gpkg "$shp" -append -nln "$(basename "$shp" .shp)"
done

Via QGIS GUI: Browser → right-click on shapefile → Export → Save Features As → GeoPackage format → choose existing .gpkg to append or create new.

Via Python geopandas:

import geopandas as gpd
import glob

for shp in glob.glob("*.shp"):
    gdf = gpd.read_file(shp)
    layer = shp.replace(".shp", "")
    gdf.to_file("combined.gpkg", layer=layer, driver="GPKG")

After migration, archive the shapefiles for 6–12 months as backup — but issues are rare; the format is more stable than its predecessor.

When to Stay on Shapefile

Despite GeoPackage's advantages, there are specific cases where Shapefile remains the right choice:

  1. Government bodies require Shapefile specifically. Russia (Rosreestr cadastre), USA (old federal standards), some European land registries. No point arguing — the format requirement is regulated.
  2. ArcMap 10.x environment. If a company is still on ArcMap 10.x (and many are, especially in Russia/CIS) — GeoPackage works with limitations, Shapefile natively.
  3. Python 2 or old GDAL scripts. Old Python 2 / GDAL 1.x pipelines — easier not to touch Shapefile; GeoPackage migration requires dependency updates.
  4. Web services expecting Shapefile. Some government web APIs accept only ZIP archives of shapefile (.shp+.dbf+.shx+.prj).
  5. Small datasets with one geometry type. Up to 100 MB, single type (polygons or points only) — Shapefile works fine, GeoPackage is overkill.

For all other cases — GeoPackage.

FAQ

Can I open GeoPackage in ArcMap 10? ArcMap 10.3+ reads GeoPackage with limitations: only feature classes, not tiles. Write is possible but without R-tree optimizations. Full support — in ArcGIS Pro 2.0+.

Does GeoPackage support raster (tiles)? Yes. One .gpkg can store vector layers and raster tile pyramids simultaneously. Used for offline maps in field work (mobile apps).

What is the 2 GB Shapefile limit? .shp uses 32-bit offsets for records, technically limiting the file to 2^31 = 2.1 GB. In practice many implementations break earlier (1.8–1.9 GB). GeoPackage uses 64-bit offsets — limit 140 TB (theoretical SQLite cap).

Is GeoPackage compatible across QGIS, ArcGIS, and FME? Yes, it's an OGC standard. Any program adhering to OGC GeoPackage 1.3 spec reads files from other programs. Tested across thousands of OGC interoperability tests.

What to do with QGIS style after migration? In Shapefile, style (QML) is a separate name.qml file alongside .shp. In GeoPackage, style is saved inside the .gpkg via the layer_styles table. On QGIS export, style is saved automatically if "Save Styles to GeoPackage" is enabled.

Can I store data with different CRS in one GeoPackage? Yes, each table has its own srs_id referencing a record in gpkg_spatial_ref_sys. Different layers in one file can be in WGS84, UTM, MSK — no problem.

Does GeoPackage support versioning (revisions)? Not natively. Versioning is done via extra tables or git-LFS for the .gpkg. For serious versioning, use PostGIS with pgRouting or Geogig.

What if the .gpkg file is corrupted? SQLite provides sqlite3 file.gpkg ".recover" — restores as much as possible from a corrupted file. Shapefile corruption almost always means data loss, because three files desynchronize.

OSM Maps in Shapefile and GeoPackage via osm2cdr.ru

Both formats are available on the free tier on osm2cdr.ru. Same workflow: outline area, choose format in Wizard, export. For Shapefile you get a ZIP archive with 3–7 files per layer (buildings.shp, roads.shp, water.shp...). For GeoPackage — one .gpkg file with all layers inside. CRS can be any — WGS84, UTM zone, MSK.

Sources

← All articles