vg250¶
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]¶ Bases:
egon.data.datasets.Dataset
Obtains and processes VG250 data and writes it to database.
Original data is downloaded using
download_files()
function and written to database usingto_postgres()
function.- Dependencies
- No dependencies
- Resulting tables
boundaries.vg250_gem
is created and filledboundaries.vg250_krs
is created and filledboundaries.vg250_lan
is created and filledboundaries.vg250_rbz
is created and filledboundaries.vg250_sta
is created and filledboundaries.vg250_vwg
is created and filledboundaries.vg250_lan_nuts_id
is created and filledboundaries.vg250_gem_hole
is created and filledboundaries.vg250_gem_valid
is created and filledboundaries.vg250_krs_area
is created and filledboundaries.vg250_lan_union
is created and filledboundaries.vg250_sta_bbox
is created and filledboundaries.vg250_sta_invalid_geometry
is created and filledboundaries.vg250_sta_tiny_buffer
is created and filledboundaries.vg250_sta_union
is created and filled
-
filename
= 'https://daten.gdz.bkg.bund.de/produkte/vg/vg250_ebenen_0101/2020/vg250_01-01.geo84.shape.ebenen.zip'¶
-
name
= 'VG250'¶
-
version
= 'https://daten.gdz.bkg.bund.de/produkte/vg/vg250_ebenen_0101/2020/vg250_01-01.geo84.shape.ebenen.zip-0.0.4'¶
-
cleaning_and_preperation
()[source]¶ 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_files
()[source]¶ 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.