Skip to content

Commit 552f58a

Browse files
authored
Merge pull request #10 from mapchete/speed_up_custom_area
consider process bounds when guessing cube area
2 parents d31295f + e6de939 commit 552f58a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

mapchete_eo/base.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Any, Callable, List, Optional, Type, Union
66

77
import croniter
8+
from mapchete import Bounds
89
import numpy.ma as ma
910
import xarray as xr
1011
from dateutil.tz import tzutc
@@ -436,7 +437,13 @@ def _init_area(self, input_params: dict) -> BaseGeometry:
436437
process_area = input_params["delimiters"]["effective_area"]
437438
if self.params.area:
438439
# read area parameter and intersect with effective area
439-
configured_area, configured_area_crs = guess_geometry(self.params.area)
440+
configured_area, configured_area_crs = guess_geometry(
441+
self.params.area,
442+
bounds=Bounds.from_inp(
443+
input_params.get("delimiters", {}).get("bounds"),
444+
crs=getattr(input_params.get("pyramid"), "crs"),
445+
),
446+
)
440447
return process_area.intersection(
441448
reproject_geometry(
442449
configured_area,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
"click",
2727
"croniter",
2828
"lxml",
29-
"mapchete[complete]>=2025.6.0",
29+
"mapchete[complete]>=2025.10.0",
3030
"opencv-python-headless",
3131
"Pillow",
3232
"pydantic",

0 commit comments

Comments
 (0)