logo-header

 
 

Introduction

If you have your BAG data available in FSS format (see Xml2FSS) you can make snapshots for mutiple snapshot dates.

A snapshot is defined as a state of the BAG at a specific date, in which the identifiers of each BAG object can be used as primary keys for these BAG object entities. A snapshot can also be made for a specific geographic extent and a selection of states per BAG object type.

Selection

To select the state of the BAG at a specfic date, we use the following three selection criteria:

  • The snapshot date must be the same or later than the BEGINDATUM field of each BAG object
  • The snapshot date must be before the EINDDATUM of each BAG object field or the EINDDATUM field is empty.
  • Only objects are selected for which the field IS_INACTIEF is false.

Due to errors in the BAG the identifiers in the resulting entities of this selection process are still not always unique. Therefore we use a unique operation (group by) on these identifiers to force this condition.

Derived entities and attributes

In a full snapshot the following additional information is calculated and added to the snapshot result:

  1. woonpand_type: This uint8 attribute is added for each pand in the BAG. Based on the geometry of neighbouring panden and the number of verblijfsobjecten in the pand, a typology is derived for the type of pand, see example. Select item: snapshot_date/afleidingen/panden/geometrie/woonpand_type > TableView for the labels of the occurring types.
  2. adres: a new table, based on the nummeraanduidingen with all address fields and a point geometry for each address. These geometries are mainly derived from the verblijfsobject point geometries, for ligplaatsen/standplaatsen and verblijfsobjecten with polygon geometries, the centroid is used.

Optional, if the height information parameter is set to True (see How to use the script), three additional attributes are added for each pand in the BAG

  1. AHN_hoogte: an uint16 attribute with the heigth of the pand in cm, based on the 70th percentile of all AHN observations in the pand polygon.
  2. AHN_inwinjaar: an uint16 attribute with the year the used AHN observations for the pand were collected. For panden with a bouwjaar later than the the inwinjaar, we advice not to use the AHN_hoogte.
  3. obvAHN3: a boolean attribute indicating if the data from the AHN3 (True) or the AHN2 (False) is used.

How to use the script

How to use the script

Requirements/Licensing/Download

See BAG Toolkit

Troubleshooting

If updating item: MaakVolledigeSnapshot or MaakAdressenTabe results in an error, check if:

  1. your %SourceDataDir%/BAG/date/FSS folder contains FSS folders for each BAG object type (don't forget step 6 of the Xml2FSS process).
  2. your %SourceDataDir%/PHN folder contains a PHN_20181001.fss folder with 7 files, see also requirements.

After solving, ignore the error(s) and reload the configuration file.

Result

Based on the chosen item, you will get a full snapshot of all BAG object types with additional attributes/entities or only an address table for a specific date and optionally extent and states. Both date and extent become subfoldernames of the resulting FSS files. The address table can be used for geocoding, The full snapshot can also be used for many applications that need a snapshot of the BAG.

In the resulting snapshot folder als meta information is stored in a file called: overzicht.txt. This files describes the number of objects selected for each BAG object type and some possible errors/strange values.


OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904