This is the old version of our wiki. We advice to visit: https://www.geodms.nl

How to use the BAG Snapshot script

From ObjectVision

Jump to: navigation, search

MakeSnapshot How to use the script

Contents

steps

1. Make sure the %SourceDataDir%/BAG/date/FSS folder with FSS folders for each BAG object type exists, see Xml2FSS.

2. Configure the code line:

parameter<string> FSSDir := '%SourceDataDir%/BAG/20160713/fss' 

to the folder with your BAG historic database in FSS format, as generated by your Xml2FSS configuration.

3. Configure the code line:

parameter<datum> SnapShotDate := '20170701[eenheden/datum]'; 

to the requested date for your BAG snapshot.

The script present six examples for generating the snapshot for the configured SnapShotDate, with different options. The parameters defining these options are described in the next paragraphs:

Geographic selection (second parameter)

If the second parameter is configured as False, the snapshot is generated for the whole of the Netherlands. To configure a geographic selection, set this second parameter to True. A geographic selection can be configured in two ways:

I) Defining a rectangle by configuring (all vbo's and related objects within the rectangle will be selected):

the x_min, x_max, y_min and y_max parameters for the requested extent in the container: geo_selectie/pointset the label parameter in this same container, this label will become a subfolder in the resulting snapshot folder II) Read a polygon from, for instance a shape file, by configuring (all vbo's and related objects within the polygon will be selected):

  • Comment (with the combination /* starting the comments and */ for ending) the code lines, starting from:
nrofrows = 1

until

attribute<.>              ordinal  := id(.);
		}
	}
  • Uncomment the code lines starting from:
StorageName     = "%SourceDataDir%/CBS/gem_Nieuwegein/ng.shp"

until

attribute geometry (poly);
  	} 

and configure the path to the shape file used for the selection.

  • The label parameter in this same container, this label will become a subfolder in the resulting snapshot folder

Status selection (third parameter)

The BAG contains (meta) information on the states of objects. Selections can be made on the states, for instance to exclude buildings still under construction.

If the third parameter is configured as False, the snapshot is generated for all states of all objects. To configure with state selections, set this third parameter to True.

The states selections can be configured in with the data items: typeringen/status/objecttype/elements/Values (the default selection states are from Vesta (October 2018)).

Height information (fourth parameter)

Information on the height of panden can be added to the snapshot. Configure the fourth argument to True if height information is desired and to false if not so.

The height information is derived from the PHN (Pand Hoogtes Nederland) database, which is derived from the AHN2/3. You need to:

before a snapshot with height information can be generated.

Generating a snapshot

Choose a snapshot option (e.g. snapshot_date_geo_selectie_status_selectie_alle_attributen) from one of the 6 examples (or configure your own option with your selection of parameters).

4. Open this container and double click on the item:

  • MaakVolledigeSnapshot: for a full snapshot
  • MaakAlleenAdressenTabel; for only the adressen tabel (used for geocoding)

Especially the MaakVolledigeSnapshot option can take some time.

5. The resulting snapshot becomes a folder in your %SourceDataDir%/BAG/snapshots.ext/optional_geo_selection_name/date.new folder.

Rename this to a %SourceDataDir%/BAG/snapshots.ext/optional_geo_selection_name/date folder.

Personal tools