Persist raster tile CRS metadata
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user