Guides
Keeping data current
Rebuild from each new extract and replace outputs safely.
Kadaster publishes a new national extract on the 8th of every month, linked from its download page. bagkit does not apply changes to an existing output; it builds a new one from the full extract. See ADR-0001 for why.
curl -O https://service.pdok.nl/kadaster/adressen/atom/v1_0/downloads/lvbag-extract-nl.zipbagkit convert lvbag-extract-nl.zip --output bag.sqlite --forceHow replacing works
Section titled “How replacing works”- The new output is built beside the destination, so you need disk space for both.
- A file replaces the old one in one atomic rename once it is complete and synced.
- A directory replaces the old one by moving it aside first and removing it afterwards, so for a moment there is no destination, and nobody ever reads a half-written one.
- If the conversion fails, the previous output stays as it was.
SQLite databases with open writers can’t be replaced: close them and checkpoint any -wal or -journal files first.
Which date to use
Section titled “Which date to use”By default, a conversion selects the voorkomens current today. Pass --date to match the extract’s own date, which the metadata records as extract_date, or to see the BAG as it will stand on a future date that the extract already knows about.
© 2026 David Stotijn · MIT License.