Skip to content

All 9,866,539 buildings in the Netherlands, shaded according to year of construction.

Notifications You must be signed in to change notification settings

quentindemetz/buildings

 
 

Repository files navigation

Buildings in the Netherlands by year of construction

View map on http://code.waag.org/buildings.

Map showing all 9,866,539 buildings in the Netherlands, shaded according to year of construction. Data from BAG, via CitySDK. Map made with TileMill by Bert Spaan, Waag Society, inspired by BKLYNR.

License

Software - scripts in this repository

MIT

Map - building map, screenshots, high-res exports

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Make a similar map yourself

The map is made with open data and open source software only. This section of the README explains how to get the data, create the map and export high-res PNG and PDF files.

Download and import BAG data

Install PostgreSQL and PostGIS, download data from NLExtract and import into database bag. Details can be found in NLExtract's documentation.

Create buildings table

To create a map with buildings by year of construction (or area and function), execute the following SQL:

DROP SCHEMA tilemill;
CREATE SCHEMA tilemill;

CREATE TABLE tilemill.buildings AS
SELECT
  p.identificatie::bigint, p.bouwjaar::int AS year,
  ST_Transform(p.geovlak, 4326) AS geom,
  round(mode() WITHIN GROUP(order by v.oppervlakteverblijfsobject)) AS oppervlakte,
  mode() WITHIN GROUP(order by vg.gebruiksdoelverblijfsobject::text) AS gebruiksdoel
FROM bagactueel.verblijfsobject v
JOIN bagactueel.verblijfsobjectpand vp
  ON vp.identificatie = v.identificatie
JOIN bagactueel.pand p
  ON vp.gerelateerdpand = p.identificatie
JOIN bagactueel.verblijfsobjectgebruiksdoel vg
  ON v.identificatie = vg.identificatie
GROUP BY
  p.identificatie, p.bouwjaar, p.geovlak;

CREATE INDEX buildings_geom_idx
  ON tilemill.buildings
  USING gist (geom);

Create TileMill project and map tiles

Install TileMill, copy the contents of the tilemill to your local TileMill projects directory (usually ~/Documents/MapBox/project), or create a symbolic link. The TileMill project file connects with PostgreSQL using user postgres and password postgres. Edit project.mml to change user and password.

A script to export high-res images is available in the sections directory of this repository.

About

All 9,866,539 buildings in the Netherlands, shaded according to year of construction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.9%
  • HTML 6.1%
  • CSS 5.6%
  • Ruby 1.1%
  • CartoCSS 0.3%