Shapefile must… be replaced

[This article was first published on geocompx, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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 https://github.com/Nowosad/spData/issues/62.

Footnotes

  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.↩︎

Reuse

Citation

BibTeX citation:
@online{nowosad2024,
  author = {Nowosad, Jakub},
  title = {Shapefile Must... Be Replaced},
  date = {2024-06-02},
  url = {https://geocompx.org//post/2024/spData-bp1},
  langid = {en}
}
For attribution, please cite this work as:
Nowosad, Jakub. 2024. “Shapefile Must… Be Replaced.” June 2, 2024. https://geocompx.org//post/2024/spData-bp1.
To leave a comment for the author, please follow the link and comment on their blog: geocompx.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)