Skip to content

Commit

Permalink
update rio-tiler version and use new options for better statistics (#754
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vincentsarago authored Jan 17, 2024
1 parent 41fea96 commit 993af6c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release Notes

## 0.17.0 (2024-01-17)

### titiler.core

* update `rio-tiler` version to `>6.3.0`
* use new `align_bounds_with_dataset=True` rio-tiler option in GeoJSON statistics methods for more precise calculation

## 0.16.2 (2024-01-17)

### titiler.core
Expand Down
2 changes: 1 addition & 1 deletion src/titiler/core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies = [
"numpy",
"pydantic~=2.0",
"rasterio",
"rio-tiler>=6.2.5,<7.0",
"rio-tiler>=6.3.0,<7.0",
"morecantile>=5.0,<6.0",
"simplejson",
"typing_extensions>=4.6.1",
Expand Down
9 changes: 6 additions & 3 deletions src/titiler/core/titiler/core/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def statistics(
response_class=GeoJSONResponse,
responses={
200: {
"content": {"application/json": {}},
"content": {"application/geo+json": {}},
"description": "Return dataset's statistics from feature or featureCollection.",
}
},
Expand Down Expand Up @@ -472,6 +472,7 @@ def geojson_statistics(
shape,
shape_crs=coord_crs or WGS84_CRS,
dst_crs=dst_crs,
align_bounds_with_dataset=True,
**layer_params,
**image_params,
**dataset_params,
Expand Down Expand Up @@ -1270,7 +1271,7 @@ def statistics(
response_class=GeoJSONResponse,
responses={
200: {
"content": {"application/json": {}},
"content": {"application/geo+json": {}},
"description": "Return dataset's statistics from feature or featureCollection.",
}
},
Expand Down Expand Up @@ -1308,6 +1309,7 @@ def geojson_statistics(
feature.model_dump(exclude_none=True),
shape_crs=coord_crs or WGS84_CRS,
dst_crs=dst_crs,
align_bounds_with_dataset=True,
**layer_params,
**image_params,
**dataset_params,
Expand Down Expand Up @@ -1471,7 +1473,7 @@ def statistics(
response_class=GeoJSONResponse,
responses={
200: {
"content": {"application/json": {}},
"content": {"application/geo+json": {}},
"description": "Return dataset's statistics from feature or featureCollection.",
}
},
Expand Down Expand Up @@ -1509,6 +1511,7 @@ def geojson_statistics(
feature.model_dump(exclude_none=True),
shape_crs=coord_crs or WGS84_CRS,
dst_crs=dst_crs,
align_bounds_with_dataset=True,
**bands_params,
**image_params,
**dataset_params,
Expand Down

0 comments on commit 993af6c

Please sign in to comment.