Persist raster tile CRS metadata
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-07-07 02:03:34 +02:00
parent 71c2cd9411
commit bc87681ab7
8 changed files with 51 additions and 9 deletions
@@ -606,6 +606,10 @@ def test_raster_tile_returns_manifest_payload(monkeypatch, tmp_path) -> None:
float(window.yoff + window.height),
)
class FakeCRS:
def to_string(self):
return "EPSG:31370"
class FakeSource:
width = 10
height = 10
@@ -614,6 +618,7 @@ def test_raster_tile_returns_manifest_payload(monkeypatch, tmp_path) -> None:
self.profile = {"width": self.width, "height": self.height, "count": 1, "dtype": "uint8", "transform": None}
self.transform = None
self.nodata = 0
self.crs = FakeCRS()
def read(self, *args, **kwargs):
return FakeArray()
@@ -670,7 +675,10 @@ def test_raster_tile_returns_manifest_payload(monkeypatch, tmp_path) -> None:
assert payload["manifest"]["overlap"] == 1
assert payload["manifest"]["source_dataset_id"] == str(dataset_id)
assert payload["manifest"]["source_raster_id"] == str(dataset_id)
assert payload["manifest"]["crs"] == "EPSG:31370"
assert payload["manifest"]["source_crs"] == "EPSG:31370"
assert payload["manifest"]["count"] == payload["count"]
assert payload["manifest"]["tiles"][0]["crs"] == "EPSG:31370"
assert payload["manifest"]["tiles"][0]["bounds"] == [0.0, 0.0, 4.0, 4.0]
assert payload["manifest"]["ai_inference"] is False
assert payload["manifest"]["tile_server"] is None