Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

BAG box

This repository contains the configuration files required to get a PostGIS database of the Dutch cadaster (BAG) up and running on a vagrant box. Once ready, you can access it from the host machine through QGIS.



  • Make sure you have installed a recent version of VirtualBox and Vagrant.

  • Clone this repository and navigate into the folder.

  • Run vagrant up. The first time, this will build the box (so it might take a while, depending on connection and power of your machine). Once built, it will only take a few seconds to make it boot up.

  • At this point, the virtual machine (VM) is running and the PostGIS database is accessible from the host through the 15432 port. Connect to it from QGIS, for example, by using the QGIS browser. Select "Create a New PostGIS connection and enter the following info:

    • Name: bag
    • Host: localhost
    • Port: 15432
    • Database: bag
    • Username: kademo
    • Password: kademo
  • When you are done with the session, run vagrant halt to stop the VM. This will free up a few GB of RAM in your host machine.

  • If you want to get rid of the VM, run vagrant destroy and things will dissapear as if they'd never happened. That easy.

NOTE: I've had problems pulling down the dump file (1.8GB via wget). If you experience any issue while building the vagrant box, download it separately (link) and put it on the project folder with the name dump.backup. Then run vagrant destroy -f to remove the box with the error, and re-build it with vagrant up.

License & Credits

This is released under a BSD-type open-source license. See LICENSE.txt for details.

This project builds on the following:

  • Postgis dump of the Dutch cadaster made by the good folks at NLExtract.
  • This tutorial by JackDB, Inc. about how to setup a PostgreSQL database in vagrant and make is accessible to the host machine.


Vagrant config for a PostGIS database of the Dutch cadaster (`BAG`)







No releases published


No packages published