feat(extract): Koordinaten, Kachel-Download und Mosaik
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2280617d9e
commit
3d112e98cd
7 files changed
+596
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import numpy as np
|
||||
from leonida.tiles import assemble
|
||||
|
||||
def fake_tile(row: int, col: int) -> np.ndarray:
|
||||
# Jede Kachel einfarbig, Farbe kodiert Zeile und Spalte.
|
||||
return np.full((256, 256, 3), (row, col, 7), dtype=np.uint8)
|
||||
|
||||
def test_assemble_crops_to_slice():
|
||||
mosaic = assemble(fake_tile)
|
||||
assert mosaic.shape == (3000, 3000, 3)
|
||||
# Nordwest-Ecke stammt aus Kachel (54, 60)
|
||||
assert tuple(mosaic[0, 0]) == (54, 60, 7)
|
||||
# Südost-Ecke stammt aus Kachel (65, 71)
|
||||
assert tuple(mosaic[-1, -1]) == (65, 71, 7)
|
||||
Reference in new issue
Block a user