Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/dagster/dagster.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
run_coordinator:
module: dagster.core.run_coordinator
class: QueuedRunCoordinator
tag_concurrency_limits:
- key: "dagster/concurrency_key"
value: "laz_download"
limit: 1

run_launcher:
module: dagster.core.launcher
Expand Down
2 changes: 1 addition & 1 deletion docker/pipeline/bag3d-core.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM 3dgi/3dbag-pipeline-tools:2025.08.25 AS develop
FROM 3dgi/3dbag-pipeline-tools:2025.08.27 AS develop
ARG VERSION=develop
ARG BAG3D_PIPELINE_LOCATION=/opt/3dbag-pipeline

Expand Down
2 changes: 1 addition & 1 deletion docker/pipeline/bag3d-floors-estimation.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM 3dgi/3dbag-pipeline-tools:2025.08.25 AS develop
FROM 3dgi/3dbag-pipeline-tools:2025.08.27 AS develop
ARG VERSION=develop
ARG BAG3D_PIPELINE_LOCATION=/opt/3dbag-pipeline

Expand Down
2 changes: 1 addition & 1 deletion docker/pipeline/bag3d-party-walls.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM 3dgi/3dbag-pipeline-tools:2025.08.25 AS develop
FROM 3dgi/3dbag-pipeline-tools:2025.08.27 AS develop
ARG VERSION=develop
ARG BAG3D_PIPELINE_LOCATION=/opt/3dbag-pipeline

Expand Down
6 changes: 3 additions & 3 deletions docker/tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ FROM tyler AS roofer
ARG JOBS=2
ARG BAG3D_PIPELINE_LOCATION=/opt/3dbag-pipeline

COPY --from=3dgi/roofer:v1.0.0-beta.4 /opt/roofer/bin/. $BAG3D_PIPELINE_LOCATION/tools/bin/
COPY --from=3dgi/roofer:v1.0.0-beta.4 /opt/roofer/share/proj $BAG3D_PIPELINE_LOCATION/tools/share/proj
COPY --from=3dgi/roofer:v1.0.0-beta.4 /opt/roofer/share/gdal $BAG3D_PIPELINE_LOCATION/tools/share/gdal
COPY --from=3dgi/roofer:v1.0.0-beta.5 /opt/roofer/bin/. $BAG3D_PIPELINE_LOCATION/tools/bin/
COPY --from=3dgi/roofer:v1.0.0-beta.5 /opt/roofer/share/proj $BAG3D_PIPELINE_LOCATION/tools/share/proj
COPY --from=3dgi/roofer:v1.0.0-beta.5 /opt/roofer/share/gdal $BAG3D_PIPELINE_LOCATION/tools/share/gdal

# We only need this until we replace the old geoflow with roofer
FROM roofer AS geoflow-old
Expand Down
2 changes: 1 addition & 1 deletion packages/common/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 23 additions & 21 deletions packages/core/src/bag3d/core/assets/ahn/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class LazFilesConfig(Config):
@asset(
required_resource_keys={"file_store"},
partitions_def=partition_definition_ahn,
op_tags={"dagster/concurrency_key": "laz_download"},
)
def laz_files_ahn3(context, config: LazFilesConfig, md5_ahn3, tile_index_ahn):
"""AHN3 LAZ files as they are downloaded from PDOK.
Expand Down Expand Up @@ -210,6 +211,7 @@ def laz_files_ahn3(context, config: LazFilesConfig, md5_ahn3, tile_index_ahn):
@asset(
required_resource_keys={"file_store"},
partitions_def=partition_definition_ahn,
op_tags={"dagster/concurrency_key": "laz_download"},
)
def laz_files_ahn4(context, config: LazFilesConfig, md5_ahn4, tile_index_ahn):
"""AHN4 LAZ files as they are downloaded from PDOK.
Expand Down Expand Up @@ -266,6 +268,7 @@ def laz_files_ahn4(context, config: LazFilesConfig, md5_ahn4, tile_index_ahn):
@asset(
required_resource_keys={"file_store"},
partitions_def=partition_definition_ahn,
op_tags={"dagster/concurrency_key": "laz_download"},
)
def laz_files_ahn5(context, config: LazFilesConfig, sha256_ahn5, tile_index_ahn):
"""AHN5 LAZ files as they are downloaded from PDOK.
Expand Down Expand Up @@ -408,33 +411,32 @@ def download_ahn_laz(
def download_laz(
file_size, fpath, is_new, nr_retries, success, url, url_laz, verify_ssl
):
fpath_download = Path()
for i in range(nr_retries):
try:
fpath = download_file(
url=url,
target_path=fpath,
chunk_size=1024 * 1024,
verify=verify_ssl,
)
if fpath is None:
# Download failed
logger.warning(format_laz_log(fpath, "Downloading failed!"))
fpath_download = download_file(
url=url,
target_path=fpath,
chunk_size=1024 * 1024,
verify=verify_ssl,
)
if fpath_download is None:
# Download failed
if i == nr_retries - 1:
url_laz = None
fpath = Path()
fpath_download = Path()
success = False
is_new = False
file_size = 0.0
logger.error(f"Download failed after {i + 1} retries")
else:
success = True
is_new = True
file_size = round(fpath.stat().st_size / 1e6, 2)
break
except ConnectionError as e:
if i == 4:
raise e
else:
logger.warning(f"Retrying ({i + 1}/5) due to {e}")
return file_size, fpath, is_new, success, url_laz
logger.warning(f"Retrying ({i + 1}/{nr_retries})")
else:
success = True
is_new = True
file_size = round(fpath_download.stat().st_size / 1e6, 2)
break

return file_size, fpath_download, is_new, success, url_laz


def match_sha(
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/bag3d/core/assets/export/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,11 @@ def metadata(context: AssetExecutionContext):
"software": [
{
"name": "geoflow-bundle",
"version": resource_defs["geoflow"].app.version("geof"),
"version": resource_defs["geoflow"].app.version(
"geof", version_cmd="--list-plugins --verbose"
),
"repository": "https://github.com/geoflow3d/geoflow-bundle",
"description": "3D building model reconstruction",
"description": "Format conversion to CityJSON, OBJ, GeoPackage, glTF",
},
{
"name": "roofer",
Expand Down
9 changes: 0 additions & 9 deletions packages/core/src/bag3d/core/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
name="ahn3",
description="Make sure that the available AHN 3 LAZ files are present on disk, "
"and their metadata is recorded.",
executor_def=multiprocess_executor.configured(
{"max_concurrent": int(getenv("BAG3D_CONCURRENCY_JOB_AHN3", 1))}
),
selection=AssetSelection.assets(["ahn", "laz_files_ahn3"])
| AssetSelection.assets(["ahn", "metadata_ahn3"])
| AssetSelection.assets(["ahn", "lasindex_ahn3"]),
Expand All @@ -33,9 +30,6 @@
name="ahn4",
description="Make sure that the available AHN 4 LAZ files are present on disk, "
"and their metadata is recorded.",
executor_def=multiprocess_executor.configured(
{"max_concurrent": int(getenv("BAG3D_CONCURRENCY_JOB_AHN4", 1))}
),
selection=AssetSelection.assets(["ahn", "laz_files_ahn4"])
| AssetSelection.assets(["ahn", "metadata_ahn4"])
| AssetSelection.assets(["ahn", "lasindex_ahn4"]),
Expand All @@ -45,9 +39,6 @@
name="ahn5",
description="Make sure that the available AHN 5 LAZ files are present on disk, "
"and their metadata is recorded.",
executor_def=multiprocess_executor.configured(
{"max_concurrent": int(getenv("BAG3D_CONCURRENCY_JOB_AHN5", 1))}
),
selection=AssetSelection.assets(["ahn", "laz_files_ahn5"])
| AssetSelection.assets(["ahn", "metadata_ahn5"])
| AssetSelection.assets(["ahn", "lasindex_ahn5"]),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/floors_estimation/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/party_walls/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading