DEM
Zie DEM (WSWO) voor de functionele beschrijving en DEM produceren voor uitvoering per gebied.
Produce a tiled DEM from AHN-DTM and functional land-use building cells.
DemConfig
dataclass
DEM distances in metres, percentile in percent; AHN storage is retained.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
building_initial_buffer_m
|
float
|
First exterior search radius, default 1 m. |
1.0
|
building_buffer_step_m
|
float
|
Radius increment without an original donor, default 1 m. |
1.0
|
building_percentile
|
float
|
Percentile at the first successful radius, default 75. |
75.0
|
building_max_search_distance_m
|
float
|
Final radius, default 5 m. Unresolved buildings remain NoData. |
5.0
|
interpolation_max_distance_m
|
float
|
AHN filling distance, default 250 m. Zero disables interpolation. |
250.0
|
output
|
RasterOutputConfig
|
Tile block sizes and overview factors. |
RasterOutputConfig()
|
building_offset_m
|
float
|
Offset added to the estimated building height in metres, default 0.05. Must be finite. Zero disables the offset; negative values lower the height. |
0.05
|
bouw_dem_tiles(target_dir, *, ahn_vrt_path, landuse_tiles, config=None, overwrite=False, workers=None, building_workers=None, landgebied_path=None)
Produce a DEM on exactly the supplied functional-land-use tile grid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_dir
|
Path
|
Dedicated output folder. Matching completed tiles/heights are reused. |
required |
ahn_vrt_path
|
Path
|
Original AHN-DTM mosaic covering cores and donor halos. |
required |
landuse_tiles
|
list of pathlib.Path
|
Land-use cores with matching bronnen, gebouw_ids and gebouwen companions. Complete prepared geometries are used for building sampling; only source code 10 determines building output cells. No BAG is read here. |
required |
config
|
DemConfig
|
Buffer/percentile/interpolation settings; no landgebied restriction. |
None
|
overwrite
|
bool
|
Rebuild products within the same input/configuration identity. Changed inputs or settings require a new output directory. |
False
|
workers
|
int
|
Parallel core tiles; defaults to settings.dem_workers. Building heights are determined first. Worker count may change on resume. |
None
|
building_workers
|
int
|
Parallel building-height batches; defaults to settings.dem_building_workers. Completed batches and partial height tables are reused after interruption. |
None
|
landgebied_path
|
Path
|
GeoPackage with the landgebied boundary for the final coverage check. NoData is reported separately outside it, in water cells (100, 228), and in other land use. NoData never blocks publication. This affects validation only; computed tiles and heights remain reusable. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs/configuration changed or grids disagree. Remaining NoData is recorded in diagnostics and does not prevent publication. |
Sample complete footprints once, retaining unresolved buildings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buildings
|
GeoDataFrame
|
Complete prepared land-use geometries with gebouw_id and identificatie. Includes neighbours for donor exclusion. |
required |
selected_ids
|
set of int
|
IDs actually present in source-code-10 output cells. |
required |
ahn
|
DatasetReader
|
Original DTM, including surrounding donor coverage. |
required |
config
|
DemConfig
|
Search distances, percentile and building height offset in metres. |
required |
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
One row per selected ID with hoogte_m, zoekafstand_m and donor_aantal. hoogte_m includes the configured offset after converting AHN values to metres. Unresolved heights are NaN and are not a production failure. |
Redactie: AI