Some inspiration for this post came from the beautiful books of Lovelace et al. (2019), Pebesma & Bivand (2019) and Hijmans (2019), and from various websites.

Why use open standards?

Luckily, quite a list of open standards is available! Below, some powerful and widely-used single-file formats are introduced. Single-file data sources are readily amenable to exchange and publication.

I see you can’t wait to start practicing, so you can also head straight over to the tutorial on vector formats and the tutorial on the GeoTIFF raster format! In these tutorials, a comparison table of vector/raster file formats is also presented.

A few words on the GDAL library

GDAL (Geospatial Data Abstraction Library) is by far the most used collection of open-source drivers for:

In other words, it is the preferred workhorse for reading and writing many geospatial file formats, used in the background by a lot of geospatial applications . Using GDAL is the easiest way to conform to open standards.

So, in R we use packages that use GDAL in the background, such as rgdal, sp, sf, raster and stars.

The GeoPackage file format

The GeoJSON file format

The GeoTIFF file format

Literature

Hijmans R. (2019). Spatial Data Science with R. URL: https://rspatial.org/.

Lovelace R., Nowosad J. & Muenchow J. (2019). Geocomputation with R. URL: https://geocompr.robinlovelace.net.

Pebesma E. & Bivand R. (2019). Spatial Data Science. URL: https://www.r-spatial.org/book.


  1. Some problems with shapefiles are: they’re not an open format, they consist of multiple files and they have restrictions regarding file size, column name length, number of columns and the feature types that can be accommodated.

  2. Note that personal geodatabases have their size limited to 250-500 MB; a GeoPackage can have a size of about 140 TB if the filesystem can handle it.

  3. Though GeoJSON 2008 is obsoleted, the now recommended RFC7946 standard is still officially in a proposal stage. That is probably the reason why GDAL does not yet default to RFC7946. A somehow confusing stage, it seems.

  4. When versioning GeoJSON files, mind the order of your data when rewriting them: reordering could produce large diffs. Interested in combining GeoJSON and GitHub? Surprise yourself!