This is the old version of our wiki. We advice to visit:


From ObjectVision

Revision as of 07:35, 8 June 2020 by Martin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

BAG Toolkit Xml2FSS



The BAG can be downloaded (monthly update) from the nationaalgeoregister.

The download consists of 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: from 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/ folder. Rename this subfolder to FSS.



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.


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.

Personal tools