Skip to content

Commit 997dd06

Browse files
update geojson-pydantic (#1152)
1 parent 592a8ea commit 997dd06

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* update rio-tiler requirement to `>=7.7,<8.0`
1212
* allow users to pass only one of `width` or `heigh` size parameters for `preview`, `part` and `feature` requests
1313
* use `minZoom` instead of `minNativeZoom` in the `/map.html` html template
14+
* update geojson-pydantic requirement to `>=1.1.2,<3.0` and change featureCollection iteration
1415

1516
### titiler.application
1617

src/titiler/core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ classifiers = [
3232
dynamic = ["version"]
3333
dependencies = [
3434
"fastapi>=0.108.0",
35-
"geojson-pydantic>=1.1.2,<2.0",
35+
"geojson-pydantic>=1.1.2,<3.0",
3636
"jinja2>=2.11.2,<4.0.0",
3737
"numpy",
3838
"pydantic~=2.0",

src/titiler/core/titiler/core/factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def geojson_statistics(
516516

517517
with rasterio.Env(**env):
518518
with self.reader(src_path, **reader_params.as_dict()) as src_dst:
519-
for feature in fc:
519+
for feature in fc.features:
520520
shape = feature.model_dump(exclude_none=True)
521521
image = src_dst.feature(
522522
shape,
@@ -1631,7 +1631,7 @@ def geojson_statistics(
16311631
if not layer_params.assets and not layer_params.expression:
16321632
layer_params.assets = src_dst.assets
16331633

1634-
for feature in fc:
1634+
for feature in fc.features:
16351635
image = src_dst.feature(
16361636
feature.model_dump(exclude_none=True),
16371637
shape_crs=coord_crs or WGS84_CRS,
@@ -1845,7 +1845,7 @@ def geojson_statistics(
18451845
if not bands_params.bands and not bands_params.expression:
18461846
bands_params.bands = src_dst.bands
18471847

1848-
for feature in fc:
1848+
for feature in fc.features:
18491849
image = src_dst.feature(
18501850
feature.model_dump(exclude_none=True),
18511851
shape_crs=coord_crs or WGS84_CRS,

src/titiler/xarray/titiler/xarray/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def geojson_statistics(
175175

176176
with rasterio.Env(**env):
177177
with self.reader(src_path, **reader_params.as_dict()) as src_dst:
178-
for feature in fc:
178+
for feature in fc.features:
179179
shape = feature.model_dump(exclude_none=True)
180180
image = src_dst.feature(
181181
shape,

0 commit comments

Comments
 (0)