Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rio-tiler, add align stats and fix morecantile breaking change #154

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

## 0.8.2 (2024-01-23)

* update rio-tiler version to `>6.3.0` (defined in `titiler>=0.17`)
* use new `align_bounds_with_dataset=True` rio-tiler option in GeoJSON statistics methods for more precise calculation [backported from 1.2.0]
* use morecantile `TileMatrixSet.cellSize` property instead of deprecated/private TileMatrixSet._resolution method [backported from 1.1.0]

## 0.8.1 (2023-11-10)

* add `algorithm` options for `/statistics [POST]` endpoints
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers = [
dependencies = [
"titiler.core>=0.15.0,<0.16",
"titiler.mosaic>=0.15.0,<0.16",
"rio-tiler>=6.3.0,<7.0",
"geojson-pydantic~=1.0",
"pydantic>=2.4,<3.0",
"pydantic-settings~=2.0",
Expand Down
3 changes: 2 additions & 1 deletion titiler/pgstac/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def map_viewer(
"request": request,
"tilejson_endpoint": tilejson_url,
"tms": tms,
"resolutions": [tms._resolution(matrix) for matrix in tms],
"resolutions": [matrix.cellSize for matrix in tms],
},
media_type="text/html",
)
Expand Down Expand Up @@ -1083,6 +1083,7 @@ def geojson_statistics(
dst_crs=dst_crs,
pixel_selection=pixel_selection,
threads=MOSAIC_THREADS,
align_bounds_with_dataset=True,
**image_params,
**layer_params,
**dataset_params,
Expand Down
4 changes: 4 additions & 0 deletions titiler/pgstac/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""TiTiler+PgSTAC FastAPI application."""

import logging
import re
from contextlib import asynccontextmanager
from typing import Dict

Expand Down Expand Up @@ -209,6 +210,9 @@ def landing(request: Request):
}

urlpath = request.url.path
if root_path := request.app.root_path:
urlpath = re.sub(r"^" + root_path, "", urlpath)

crumbs = []
baseurl = str(request.base_url).rstrip("/")

Expand Down
Loading