PostGIS vs Files – Choosing Between Database and Files for Solo Developer

databasepostgisqgisshapefile

I'm just getting started in GIS and am interested in using it to create maps of mountain biking trails in my area and nearby. I've been learning QGIS and have made enough progress to generate a decent map. So far I've been storing my layers in Shapefiles, which seems to be working okay.

This past weekend I started looking at PostGIS and have it up and running and managed to import my trail shapefiles and connect QGIS to PostGIS.

I'm now wondering what the pros and cons of using a database versus files would be. I have some thoughts already, but am curious what enlightening opinions others may have.

Pros of Database

  • One table for all my trails, regardless of park, allows me to have a consistent set of columns for the information.
  • Easier to query/export my data to multiple formats
  • Multiple clients/tools allow for easier viewing and editing of data
  • Easier editing of table structure (compared to QGIS table editing)

Cons of Database

  • Standing up/maintaining a database adds complexity to my setup.
  • I have a desktop and a laptop I do my GIS work on and using DropBox allows me to easily sync files between the two machines. This likely won't be possible (or as transparent) using PostGIS as using DropBox with files.
  • Easier to backup/restore files than a database.

Best Answer

I suggest you to add Spatialite to your list. It has the benefits of being file based (as a shapefile, or an .mdb database) and supports most of the usual spatial operators and tpyes, that you can find in PostGIS too. Spatialite is based on Sqlite, so you will manage a single file, that you can easily move and share.