Shapefile must… be replaced


Jakub Nowosad


June 2, 2024

The ESRI Shapefile format is possibly the most popular data format for storing spatial vector data. It is well-established, widely supported, and can be used in most GIS software. At the same time, it has many shortcomings and limitations: it is not a single file, but a collection of files; it has a limit of 2GB per file; it does not support more than one geometry type per file, and more.1 In the last few years, a few improved alternatives to the Shapefile format have been developed, such as the GeoPackage and the FlatGeobuf format.2

In 2017, together with Roger Bivand and Robin Lovelace, we created the spData R package – a collection of spatial data both as R objects and external file formats. The package has two main goals: to provide easy access to spatial data for teaching purposes and to provide datasets that could be used as examples in the documentation of other packages. Many of the datasets in the package are stored in the ESRI Shapefile format, which is not ideal.

Thus, after some discussions, we decided to replace the Shapefile format with the GeoPackage format in the spData package (version number: 2.3.1). We hope that this change will serve as a good example and encourage others to use modern spatial data formats. At the time of writing (June 2024), we added GeoPackage versions of all the datasets in the package, but we also plan to remove the ESRI Shapefile versions in the near future. Thus, if you use the spData package, be aware of this change and update your code accordingly. Also, if you have any comments or suggestions, please let us know in the issue on the package’s GitHub page at


  1. More about its limitations can be found at the Switch from Shapefile website and in the Geocomputation with R book.↩︎

  2. And more alternatives are being developed, such as GeoParquet.↩︎



BibTeX citation:
  author = {Nowosad, Jakub},
  title = {Shapefile Must... Be Replaced},
  date = {2024-06-02},
  url = {},
  langid = {en}
For attribution, please cite this work as:
Nowosad, Jakub. 2024. “Shapefile Must... Be Replaced.” June 2, 2024.