Ga naar inhoud

Administratieve gebieden

Gebruik bestuurlijke gebieden voor de landsgrens en waterschapsgrenzen voor de selectie van een beheergebied.

Voorbeeld bestuurlijke gebieden Voorbeeld waterschapsgrenzen

Bestuurlijke gebieden downloaden · download_bestuurlijke_gebieden

waterlagen.administratieve_gebieden.download_bestuurlijke_gebieden

download_bestuurlijke_gebieden(
    year,
    download_dir=None,
    *,
    target_path=None,
    overwrite=True,
    progress=True,
    chunk_size=1024 * 1024,
    timeout=30,
)

Download a selected yearly PDOK bestuurlijke gebieden GeoPackage.

The year is part of both the URL and output filename, so multiple annual releases can coexist in the datastore. The download is streamed to a temporary file and validated before it atomically replaces the target.

Wat krijgt u terug?

Type Betekenis
GeoPackageDownload

Download metadata and the validated output path.

Instellingen en invoer

Naam Type Betekenis Standaardwaarde
year int

Explicit PDOK release year. The standard tile workflow uses 2026.

Verplicht
download_dir Path

Directory for yearly source GeoPackages, by default datastore.administratieve_gebieden_dir.

None
target_path Path

Override for the output GeoPackage path.

None
overwrite bool

Whether to replace an existing target. When False, the existing file is reused without a network request.

True
progress bool

Whether to write named download progress to stdout.

True
chunk_size int

HTTP download chunk size in bytes.

1024 * 1024
timeout int

HTTP timeout in seconds.

30
Waterschapsgrenzen downloaden · download_waterschapsgrenzen

waterlagen.administratieve_gebieden.download_waterschapsgrenzen

download_waterschapsgrenzen(
    download_dir=None,
    *,
    target_path=None,
    overwrite=True,
    progress=True,
    chunk_size=1024 * 1024,
    timeout=30,
)

Download the current HWH waterschapsgrenzen GeoPackage.

The HWH source is not distributed as yearly releases. The current IMWA GeoPackage is downloaded to the administrative-areas datastore directory, validated, and atomically replaces the target only after successful validation.

Wat krijgt u terug?

Type Betekenis
GeoPackageDownload

Download metadata and the validated output path.

Instellingen en invoer

Naam Type Betekenis Standaardwaarde
download_dir Path

Directory for the waterschapsgrenzen source GeoPackage, by default datastore.administratieve_gebieden_dir.

None
target_path Path

Override for the output GeoPackage path.

None
overwrite bool

Whether to replace an existing target. When False, the existing file is reused without a network request.

True
progress bool

Whether to write named download progress to stdout.

True
chunk_size int

HTTP download chunk size in bytes.

1024 * 1024
timeout int

HTTP timeout in seconds.

30
Landsgrens lezen · read_landsgrens

waterlagen.administratieve_gebieden.read_landsgrens

read_landsgrens(
    *, year=DEFAULT_BESTUURLIJKE_GEBIEDEN_YEAR, path=None
)

Lees de landsgrens uit een lokaal GeoPackage.

Wat krijgt u terug?

Type Betekenis
geopandas.GeoDataFrame

De attributen en geometrie uit de laag landgebied.

Instellingen en invoer

Naam Type Betekenis Standaardwaarde
year int

Jaargang van de lokaal opgeslagen bestuurlijke gebieden. Wordt gebruikt als path ontbreekt.

DEFAULT_BESTUURLIJKE_GEBIEDEN_YEAR
path pathlib.Path

Eigen GeoPackage met de laag landgebied.

None

Redactie: AI