The central module containing all code dealing with VG250 data.

This module either directly contains the code dealing with importing VG250 data, or it re-exports everything needed to handle it. Please refrain from importing code from any modules below this one, because it might lead to unwanted behaviour.

If you have to import code from a module below this one because the code isn’t exported from this module, please file a bug, so we can fix this.

class Vg250(dependencies)[source]


Obtains and processes VG250 data and writes it to database.

Original data is downloaded using download_files() function and written to database using to_postgres() function.

No dependencies
Resulting tables
filename = ''
name = 'VG250'
version = ''

Writes metadata JSON string into table comment.


Creates tables and MViews with cleaned and corrected geometry data.

The following table is created:
  • boundaries.vg250_gem_clean where municipalities (Gemeinden) that are fragmented are cleaned from ringholes
The following MViews are created:
  • boundaries.vg250_gem_hole
  • boundaries.vg250_gem_valid
  • boundaries.vg250_krs_area
  • boundaries.vg250_lan_union
  • boundaries.vg250_sta_bbox
  • boundaries.vg250_sta_invalid_geometry
  • boundaries.vg250_sta_tiny_buffer
  • boundaries.vg250_sta_union

Download VG250 (Verwaltungsgebiete) shape files.

Data is downloaded from source specified in datasets.yml in section vg250/original_data/source/url and saved to file specified in vg250/original_data/target/file.


Creates MView boundaries.vg250_lan_nuts_id.


Writes original VG250 data to database.

Creates schema boundaries if it does not yet exist. Newly creates all tables specified as keys in datasets.yml in section vg250/processed/file_table_map.


Returns metadata string for VG250 tables.