Skip to content

Commit d2130ab

Browse files
committed
Add needed deps
1 parent 89c4047 commit d2130ab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/satextractor/extractor/extractor.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66

77
import numpy as np
88
import rasterio
9+
from affine import Affine
910
from loguru import logger
1011
from osgeo import gdal
1112
from osgeo import osr
13+
from rasterio import warp
14+
from rasterio.crs import CRS
15+
from rasterio.enums import Resampling
1216
from rasterio.merge import merge as riomerge
1317
from satextractor.models import ExtractionTask
1418
from satextractor.models import Tile
@@ -80,6 +84,7 @@ def get_tile_pixel_coords(tiles: List[Tile], raster_file: str) -> List[Tuple[int
8084

8185
return list(zip(rows, cols))
8286

87+
8388
def download_and_extract_tiles_window_COG(
8489
fs: Any,
8590
task: ExtractionTask,
@@ -119,6 +124,7 @@ def download_and_extract_tiles_window_COG(
119124
out_shape=out_shp,
120125
fill_value=0,
121126
boundless=True,
127+
resampling=Resampling.bilinear,
122128
)
123129

124130
out_f = f"{task.task_id}_{ii}.tif"
@@ -142,7 +148,6 @@ def download_and_extract_tiles_window_COG(
142148
return outfiles
143149

144150

145-
146151
def download_and_extract_tiles_window(
147152
download_f: Callable,
148153
task: ExtractionTask,
@@ -223,7 +228,7 @@ def task_mosaic_patches(
223228
Returns:
224229
List[np.ndarray]: The tile patches as numpy arrays
225230
"""
226-
231+
227232
if task.constellation == "sentinel-2":
228233
out_files = download_and_extract_tiles_window(download_f, task, resolution)
229234
else:

0 commit comments

Comments
 (0)