logo-header

 
 

Introduction

The BAG can be downloaded from http://geodata.nationaalgeoregister.nl/inspireadressen/atom/inspireadressen.xml.
This site presents updates of the BAG at a regular basis.

From the site you can download a zip file with more than 3.000 xml files. Xml files are used as exchange formats but less suitable for processing. Therefore the Xml2FSS tool is used to convert these xml files to a FSS storage (GeoDMS native fast format) for each BAG object type.

BAG versus FSS data structure

The BAG is a historical database with one or multiple mutations per object.The Xml2FSS tool stores this historical information in a FSS storage per BAG object type. The data structure used is similar to the BAG, with one major exception. As the number of gebruiksdoelen of a VBO in the BAG is limited, the relation between VBO and gebruiksdoel is implemented as a set of boolean attributes for each VBO indicating if this VBO has this gebruiksdoel or not. This makes it easier to work with the gebruiksdoelen. The same data structure is also used in the snapshots.

How to use this script

  1. Download the file: inspireadressen.zip from http://geodata.nationaalgeoregister.nl/inspireadressen/atom/inspireadressen.xml.
    Extract the zip file to zip files for each BAG object type.
  2. Extract the xml files from the zip files per BAG object type to a local folder, with naming convention: %SourceDataDir%/BAG/date/NGR:
    • The %SourceDataDir% is a placeholder for the SourceData folder on your local disk. By default the path: C:/SourceData is used. You can choose another path for your SourceData, but then you have to configure this new path in the GeoDMSGUI > Tools >Options > SourceDataDir control.
    • Use for the date placeholder the date of your download with as format: yyyymmdd.
    • The subfoldername NGR stands for: Nationaal GeoRegister.
  3. Make sure all zip files are extracted (your NGR folder need to have more than 3.000 xml files).
  4. Open the Xml2FSS.dms file from the BAG toolkit scripts (in the cfg subfolder of your chosen project folder) in a text editor, configure the date of your download (see 3) in line 27 for the parameter date (yyyymmdd) and save your file.  
  5. Open the Xml2FSS.dms in the GeoDMS and update the item: MaakFSSBestanden, e.g. by double clicking on this item in the TreeView. This can take some time.
  6. The resulting FSS storages become folders in your %SourceDataDir%/BAG/date/FSS.new folder. Rename this FSS.new subfolder to FSS.

Requirements/Licensing/Download

See BAG Toolkit

Troubleshooting

If updating item: MaakFSSBestanden results in an error, check:

1. if you have unzipped all zip files, your NGR subfolder should contain more than 3.000 xml files.

2. if your %SourceDataDir%placeholder refers to the actual physical path containing the subfolder (BAG/date/NGR) with the xml files. If this is not the case, configure th path for your %SourceDataDir% in the GeoDMSGUI > Tools >Options > SourceDataDir control.

Ignore the error(s) and reload the configuration file.

Result

The result of this script is a collection of FSS storages (folders) for each BAG object type, which can be used to make snapshots from the BAG.

In the resulting FSS folder also meta information is stored in a file called: overzicht.txt. This files describes the number of xml files processed and the number of objects for each BAG object type.  


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