Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
/ admin-region-import Public archive

Import German administrative regions to a PostGIS database

Notifications You must be signed in to change notification settings

DEalog/admin-region-import

Repository files navigation

PostGIS importer

This project contains an import for Verwaltungsgebiete data.

The used data is obtained from Verwaltungsgebiete 1:250 000 (Ebenen), Stand 01.01.

Usage

Import data

Note: This container is used to mainly convert and view the data. DO NOT USE IN PRODUCTION

  • Build the Docker container
docker build -t dealog/postgis:latest .
  • Start the Docker container
docker run\
  --name postgis_import\
  --rm\
  -d\
  -p 15432:5432\
  -e POSTGRES_DBNAME=postgis\
  -v ${PWD}:/app\
  dealog/postgis:latest

The database user and password is the default docker:docker.

  • Run the import script
docker exec postgis_import ./import_verwaltungsgebiete.sh

View data

To view the data visually it's recommended to use the QGIS viewer.

When using this you need to add the PostGIS datasource.

For the DEalog pilot project the DEalog_Pilot.qgz file can be loaded.

It should look like this:

QGIS screenshot

Export data

The DEalog pilot project needs only a subset of the data which can be exported with the following command (the argument is the ARS):

docker exec postgis_import ./export_csv_verwaltungsgebiete.sh 05911 05913 05914 05915 05916 05954 05958 05962 05966 05970 05974 05978

This will export given municipalities incl. supervising ones to data/ as CSV files.

The arguments are the rural districts (Landkreise).

License

MIT

About

Import German administrative regions to a PostGIS database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published