Skip to content

Commit f505ee7

Browse files
Merge pull request #154 from stac-utils/patch/catchup-with-1.2-rio-tiler-update
update rio-tiler, add align stats and fix morecantile breaking change
2 parents cd466c8 + 7f0949e commit f505ee7

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release Notes
22

3+
## 0.8.2 (2024-01-23)
4+
5+
* update rio-tiler version to `>6.3.0` (defined in `titiler>=0.17`)
6+
* use new `align_bounds_with_dataset=True` rio-tiler option in GeoJSON statistics methods for more precise calculation [backported from 1.2.0]
7+
* use morecantile `TileMatrixSet.cellSize` property instead of deprecated/private TileMatrixSet._resolution method [backported from 1.1.0]
8+
39
## 0.8.1 (2023-11-10)
410

511
* add `algorithm` options for `/statistics [POST]` endpoints

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ classifiers = [
2929
dependencies = [
3030
"titiler.core>=0.15.0,<0.16",
3131
"titiler.mosaic>=0.15.0,<0.16",
32+
"rio-tiler>=6.3.0,<7.0",
3233
"geojson-pydantic~=1.0",
3334
"pydantic>=2.4,<3.0",
3435
"pydantic-settings~=2.0",

titiler/pgstac/factory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def map_viewer(
450450
"request": request,
451451
"tilejson_endpoint": tilejson_url,
452452
"tms": tms,
453-
"resolutions": [tms._resolution(matrix) for matrix in tms],
453+
"resolutions": [matrix.cellSize for matrix in tms],
454454
},
455455
media_type="text/html",
456456
)
@@ -1083,6 +1083,7 @@ def geojson_statistics(
10831083
dst_crs=dst_crs,
10841084
pixel_selection=pixel_selection,
10851085
threads=MOSAIC_THREADS,
1086+
align_bounds_with_dataset=True,
10861087
**image_params,
10871088
**layer_params,
10881089
**dataset_params,

titiler/pgstac/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""TiTiler+PgSTAC FastAPI application."""
22

33
import logging
4+
import re
45
from contextlib import asynccontextmanager
56
from typing import Dict
67

@@ -209,6 +210,9 @@ def landing(request: Request):
209210
}
210211

211212
urlpath = request.url.path
213+
if root_path := request.app.root_path:
214+
urlpath = re.sub(r"^" + root_path, "", urlpath)
215+
212216
crumbs = []
213217
baseurl = str(request.base_url).rstrip("/")
214218

0 commit comments

Comments
 (0)