Skip to content

Commit badc1df

Browse files
committed
Merge branch 'develop' into deploy-to-docker
# Conflicts: # packages/core/tests/test_integration.py
2 parents d958e73 + 6c9b98e commit badc1df

File tree

24 files changed

+1170
-1271
lines changed

24 files changed

+1170
-1271
lines changed

docker/tools/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ FROM tyler AS roofer
9898
ARG JOBS=2
9999
ARG BAG3D_PIPELINE_LOCATION=/opt/3dbag-pipeline
100100

101-
COPY --from=3dgi/roofer:v1.0.0-beta.2 /opt/roofer/bin/. $BAG3D_PIPELINE_LOCATION/tools/bin/
102-
COPY --from=3dgi/roofer:v1.0.0-beta.2 /opt/roofer/share/proj $BAG3D_PIPELINE_LOCATION/tools/share/proj
103-
COPY --from=3dgi/roofer:v1.0.0-beta.2 /opt/roofer/share/gdal $BAG3D_PIPELINE_LOCATION/tools/share/gdal
101+
COPY --from=3dgi/roofer:develop /opt/roofer/bin/. $BAG3D_PIPELINE_LOCATION/tools/bin/
102+
COPY --from=3dgi/roofer:develop /opt/roofer/share/proj $BAG3D_PIPELINE_LOCATION/tools/share/proj
103+
COPY --from=3dgi/roofer:develop /opt/roofer/share/gdal $BAG3D_PIPELINE_LOCATION/tools/share/gdal
104104
ENV GDAL_DATA=$BAG3D_PIPELINE_LOCATION/tools/share/gdal
105105
ENV PROJ_DATA=$BAG3D_PIPELINE_LOCATION/tools/share/proj
106106

packages/common/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dev = [
4242
# Need this block here so that ruff includes this package's files. The ruff config is in the root pyproject.toml file.
4343

4444
[tool.uv.sources]
45-
pgutils = { git = "https://github.com/balazsdukai/pgutils.git", rev = "2024.1013" }
45+
pgutils = { git = "https://github.com/balazsdukai/pgutils.git", rev = "2025.1015" }
4646
bag3d-specs = { git = "https://github.com/3DBAG/3dbag-specs.git", branch = "develop" }
4747

4848
[tool.pytest.ini_options]

packages/common/src/bag3d/common/utils/geodata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def pdal_info(
242242
"""Run 'pdal info' on a point cloud file.
243243
244244
Args:
245+
verbose: Return stdout/stderr from pdal
245246
pdal (AppImage): The pdal AppImage executable.
246247
file_path: Path to the point cloud file.
247248
with_all: If true, run ``pdal info --all``, else run ``pdal info --metadata``.
@@ -258,8 +259,8 @@ def pdal_info(
258259
return_code, output = pdal.execute(
259260
"pdal", command=" ".join(cmd_list), local_path=file_path, silent=(not verbose)
260261
)
261-
262-
return return_code, json.loads(output)
262+
output_processed = output.replace("\\u0000", "")
263+
return return_code, json.loads(output_processed)
263264

264265

265266
def geojson_poly_to_wkt(geometry) -> str:

packages/common/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ def test_data_dir():
110110

111111
@pytest.fixture(scope="session")
112112
def laz_files_ahn3_dir(test_data_dir):
113-
yield test_data_dir / "reconstruction_input/pointcloud/AHN3/tiles_200m/"
113+
yield test_data_dir / "reconstruction_input/pointcloud/AHN3/as_downloaded/LAZ"

packages/common/tests/test_resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_pdal_local(laz_files_ahn3_dir):
4141
"""Use local PDAL installation"""
4242
pdal = PDALResource(exe_pdal=EnvVar("EXE_PATH_PDAL").get_value())
4343
assert not pdal.with_docker
44-
filepath = laz_files_ahn3_dir / "t_1042098.laz"
44+
filepath = laz_files_ahn3_dir / "C_32BZ2.LAZ"
4545
return_code, output = pdal_info(pdal.app, filepath, with_all=True)
4646
assert return_code == 0
4747

@@ -55,7 +55,7 @@ def test_lastools(laz_files_ahn3_dir):
5555

5656
lastools = lastools_resource.app
5757

58-
filepath = laz_files_ahn3_dir / "t_1042098.laz"
58+
filepath = laz_files_ahn3_dir / "C_32BZ2.LAZ"
5959

6060
cmd_list = [
6161
"{exe}",

packages/common/uv.lock

Lines changed: 182 additions & 174 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dev = [
4141
# Need this block here so that ruff includes this package's files. The ruff config is in the root pyproject.toml file.
4242

4343
[tool.uv.sources]
44-
pgutils = { git = "https://github.com/balazsdukai/pgutils.git", rev = "2024.1013" }
44+
pgutils = { git = "https://github.com/balazsdukai/pgutils.git", rev = "2025.1015" }
4545
bag3d-common = { path = "../common", editable = true }
4646

4747
[tool.pytest.ini_options]

packages/core/src/bag3d/core/assets/ahn/core.py

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from pathlib import Path
2-
from typing import Tuple, Dict, Optional
3-
from math import ceil
2+
from typing import Dict, Optional
43

54
import requests
65
from dagster import StaticPartitionsDefinition, get_dagster_logger
@@ -120,41 +119,3 @@ def download_ahn_index(
120119
features[f["properties"]["AHN"].lower()] = None
121120

122121
return features
123-
124-
125-
def tile_index_origin() -> Tuple[float, float, float, float]: # pragma: no cover
126-
"""Computes the BBOX of the AHN tile index."""
127-
tindex = download_ahn_index(True)
128-
minx, miny = tindex["01cz1"]["geometry"]["coordinates"][0][0]
129-
maxx, maxy = minx, miny
130-
for feature in tindex.values():
131-
exterior = feature["geometry"]["coordinates"][0]
132-
for x, y in exterior:
133-
minx = x if x < minx else minx
134-
miny = y if y < miny else miny
135-
maxx = x if x > maxx else maxx
136-
maxy = y if y > maxy else maxy
137-
return minx, miny, maxx, maxy
138-
139-
140-
def generate_grid(bbox: Tuple[float, float, float, float], cellsize: int):
141-
"""Generates a grid of fixed cell-size for a BBOX.
142-
The origin of the grid is the BBOX min coordinates.
143-
144-
Args:
145-
bbox: (minx, miny, maxx, maxy)
146-
cellsize: Cell size.
147-
148-
Returns:
149-
The bbox of the generated grid, nr. of cells in X-direction,
150-
nr. of cells in Y-direction.
151-
"""
152-
origin = bbox[:2]
153-
nr_cells_x = ceil((bbox[2] - bbox[0]) / cellsize)
154-
nr_cells_y = ceil((bbox[3] - bbox[1]) / cellsize)
155-
bbox_new = (
156-
*origin,
157-
origin[0] + nr_cells_x * cellsize,
158-
origin[1] + nr_cells_y * cellsize,
159-
)
160-
return bbox_new, nr_cells_x, nr_cells_y

0 commit comments

Comments
 (0)