Ga naar inhoud

BGT

BgtCustomDownload dataclass

Metadata for a custom BGT request.

BgtDownload dataclass

Metadata for the predefined national BGT download.

bgt_custom_download(download_dir=datastore.bgt_dir, *, featuretypes=DEFAULT_FEATURETYPES, poly_mask=None, overwrite=True, poll_interval_s=5)

Download BGT features as GeoPackages.

Parameters:

Name Type Description Default
download_dir Path

Download dir to store GeoPackages. By default datastore.bgt_dir.

bgt_dir
featuretypes Iterable[str]

BGT feature-types, by default ("waterdeel", "pand").

DEFAULT_FEATURETYPES
poly_mask shape | None

Optional polygon-mask to use as geofilter. If not Polygon, shape-bounding box will be used. By default None

None
overwrite bool

If not True BGT will only be downloaded if all expected output files already exist. Default is True.

True
poll_interval_s int

Interval to poll the BGT download status in seconds, by default 5.

5

Returns:

Type Description
BgtCustomDownload

Metadata for the BGT download.

bgt_download(*args, **kwargs)

Compatibility alias for :func:download_bgt.

download_bgt(download_dir=datastore.bgt_dir, *, featuretypes=DEFAULT_FEATURETYPES, target_path=None, overwrite=True, url=BGT_PREDEFINED_URL, progress=True, chunk_size=1024 * 1024, timeout=30)

Download or reuse the national BGT GML Light ZIP and convert layers.

The predefined ZIP is treated as a local cache. A valid existing archive is reused; missing or invalid archives are replaced only after a temporary download has been validated as a readable ZIP containing GML files.

get_bgt_features(featuretypes, poly_mask, download_dir)

Download BGT features in GeoPackages.

Use :func:bgt_custom_download for new custom BGT downloads.

Redactie: AI