I usually build static topographic maps, which are mostly printed. I'm often using OSM and rasterfiles (mainly different DEMs). The areas I'm mapping seldom exceeds 20.000 km². I'm using exclusively open source software like QGIS, SAGA and GRASS.

I know the problems with shapefiles, but they are easy to handle. And Im not very familiar with postgis or SpatiaLite. I tried postgis, but got a lot of problems handling it, SpatiaLite seem to me more easy.

What do you think: Should I stay with shapefiles or switch over to databases like SpatiaLite or postgis. Whats the advantages and disadvantages in my case?

  • is it for local (mainly to use in GIS software) or for serving over internet in hosted map? – Below the Radar Jan 22 '14 at 20:25
  • What type of issues did you run into with PostGIS? – RyanDalton Jan 22 '14 at 20:26
  • It is mainly for local run. I loaded OSM to postgis and used it in QGIS. Thats all I did with postgis till now. – MAP Jan 22 '14 at 20:34
  • 3
    Databases are more efficient in terms of stability and performance, also you can run complex SQL queries on them. Personally I use shapefiles only as exchange format. In your case I would try to use spatialite cos it doesn't require database server installation – megadrofan Jan 22 '14 at 20:41
  • 1
    Sooner or later you hit use case where you need to get layer which only contains some spatial relationship or column value. PostGis is only one which scales from one user to pretty much anything. I think Postgis as tool not just db. – simplexio Jan 23 '14 at 9:17

If the only reason you're contemplating adopting a new system is "'cause there's a shiny new system", don't do it. Until and unless you actually run into problems with the limitations of shapefiles, or want to take advantage of some specific features of postgis/spatialite/whatever, there's no need to change. Keep designing and producing maps.

Sooner or later the problems with shapefiles will come to a head, and that is the time to address them. The new shiny system will be even newer and shinier then.

It still a good idea to keep an eye on what's happening "over there", and take it for a spin from time to time, but don't invest in changing your whole production workflow until there are specific concrete advantages for doing so. Otherwise it's all too easy to spend months (years!) tinkering with the car in the garage and not actually going for a drive anywhere.


Spatialite could be interesting because it is fast for local use. You can load it directly into the RAM of your machine and it is only one file, so it is really portable and shareable. You can create R-tree indexes on geometry.

Just like PostGIS, Spatialite follows OGC standards and much of its functions are similar to PostGIS's and usable in SQL. It is also "[...]an alternative format to ESRI Shapefiles, which have several legacy issues (such as storage types and lengths of column names, etc.) " (PostGIS wiki).

The rasterlite plugin is also very performant to manage raster data using pyramids and image compression. (rasterlite official user manual)

PostGIS is also a good option, everything you need is there. It would be a better option if your data would be edited by many users simultanously or if you want to host large dataset such OSM. By the way, osm2pgsql is a reliable tool to import OSM data into PostGIS.

Advantages (among others) to use DB is that you can use SQL for queries and create spatial indexes. Futhermore, it is relatively easy to migrate layers between Spatialite, PostGIS and Shapefile format so you can easily use a mix of the three.


The main advantage of Spatialite is that it comes as just one file, which you can easily share and backup. Postgis needs much more effort to port the data from one computer to another.

Shapefiles have their limitations on column names, but can easily handle non-EPSG projections. Editing of larger amounts of data gets painful with simple shapefiles, so thats why I switch to spatialite as soon as possible.

I use Postgis for OSM data because it can take huge loads of data without killing QGIS as frontend, and it responds quickly. The polygon handling of osm2pgsql is far better than all osm-to-spatialite importers I have seen so far.

So, effectivley I use all three of them.

  • I'm intrigued with the note about shapefiles easily handling custom projections; this could be especially important. Does this mean postgis and sqlite do not handle non-EPSG coordinate systems? – matt wilkie Mar 10 '14 at 21:08
  • They do, but you have to add a custom CRS with an additional self-created SRID in advance. I'm not sure if that works easily when you exchange data with others. – AndreJ Mar 11 '14 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.