Giter Site home page Giter Site logo

bagger's Introduction

Download BAG

Code for downloading the Dutch Buildings Register (Basisadministratie Gebouwen/BAG) and converting it to CSV format.

Building code

The programmes to convert the XML-files from the BAG to CSV-format are written in C++ and need to be compiled. In order to compile the programmes libxml2 and libgdal need to be installed. Under Ubuntu this can be done using:

sudo apt install libxml2-dev libgdal-dev

The binaries can then be built using

make build

Downloading the BAG and converting it to CSV

make download

should download the BAG and

make csv 

should convert the XML-files to CSV-format. This generates a number of CSV-files. By default these are exported to the folder ./data. However, this can be changed using the environment variable BAGGER_OUTPUTDIR. For example

export BAGGER_OUTPUTDIR=~/bag
make csv

Description of CSV files

data/panden.csv: buildings

Variable Type Description
id string id of building (numeric; but too long (16 digits) to store in int/double)
bouwjaar integer year built
pandstatus string status of building
begin_geldigheid date start date of validity record (format: 2016123100000000000)
eind_geldigheid date end date of validity; often empty
geometrie_wkt string polygon of building in WKT format (rijksdriehoek coordinates)
x double x coordinate of centroid of building (rijksdriehoek)
y double y coordinate

data/openbareruimte.csv: public space (e.g. streets)

Stores public spaces, e.g. streets, squares, roards.

Variable Type Description
id string id of public space (numeric; but too long (16 digits) to store in int/double)
name string name public space
type string type of public space
woonplaats integer town (links to id in woonplaatsen.csv)
begin_geldigheid date start date of validity record (format: 2016123100000000000)
eind_geldigheid date end date of validity; often empty

data/verblijfsobjecten.csv: dwellings

Variable Type Description
id string id of use object (numeric; but too long (16 digits) to store in int/double)
gebruiksdoel string use goal
oppervlakte integer area (square metres)
status string status
hoofdadres string id of main address (links to id in nummeraanduidingen.csv)
pand string id of related building (links to id in panden.csv)
begin_geldigheid date start date of validity record (format: 2016123100000000000)
eind_geldigheid date end date of validity; often empty
geometrie_wkt string coordinate in WKT format (rijksdriehoek coordinates)
x double x coordinate of centroid (rijksdriehoek)
y double y coordinate of centroid (rijksdriehoek)

data/nummeraanduidingen.csv: addresses (postcode + addres number)

Variable Type Description
id string id of number designation (numeric; but too long (16 digits) to store in int/double)
postcode string postcode
huisnummer integer address number
huisnummertoevoeging string address number addition
openbareruimte string id of corresponding public space (links to id in openbareruimte.csv)
begin_geldigheid date start date of validity record (format: 2016123100000000000)
eind_geldigheid date end date of validity; often empty

data/woonplaatsen.csv: towns

Variable Type Description
id integer id of town
name string name
status string status
begin_geldigheid date start date of validity record (format: 2016123100000000000)
eind_geldigheid date end date of validity; often empty
geometrie_wkt string polygon of town in WKT format (rijksdriehoek coordinates)
x double x coordinate of centroid (rijksdriehoek)
y double y coordinate of centroid (rijksdriehoek)

data/gemeente_woonplaats.csv: municipalities

Variable Type Description
woonplaats_id integer id of town (links to id in woonplaatsen.csv)
gemeente_id integer id of municipality (official id of municipality)
status string status
begin_geldigheid date start date of validity record (format: 2016123100000000000)
eind_geldigheid date end date of validity; often empty

bagger's People

Stargazers

Eszter Bokányi avatar Roel Hogervorst avatar Jonathan de Bruin avatar  avatar Edwin de Jonge avatar

Watchers

James Cloos avatar Jan van der Laan avatar  avatar

Forkers

capesepias

bagger's Issues

Export CSV-files to alternative location

CSV-files are currently exported to the data folder in the project map. Allow for export to alternative locations.

  • Environment variable?
  • Parameter in the Makefile?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.