Skip to content

Commit

Permalink
update to titiler 0.16 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago authored Jan 12, 2024
1 parent cf229d7 commit 5ae94de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 0.12.0 (TBD)

* add Algorithm support and update basemap source
* update titiler requirement to `>=0.14,<0.15`
* update titiler requirement to `>=0.16,<0.17`

- renamed `/crop` endpoints to `/bbox/...` or `/feature/...`
- `/crop/{minx},{miny},{maxx},{maxy}.{format}` -> `/bbox/{minx},{miny},{maxx},{maxy}.{format}`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dynamic = ["version"]
dependencies = [
"braceexpand",
"rio-cogeo>=5.0",
"titiler.core>=0.15.0,<0.16",
"titiler.core>=0.16.0,<0.17",
"starlette-cramjam>=0.3,<0.4",
"uvicorn",
"server-thread>=0.2.0",
Expand Down
7 changes: 5 additions & 2 deletions rio_viz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Any, Dict, List, Literal, Optional, Tuple, Type, Union

import attr
import jinja2
import rasterio
import uvicorn
from fastapi import APIRouter, Depends, FastAPI, HTTPException, Path, Query
Expand Down Expand Up @@ -54,8 +55,10 @@
has_mvt = False
pixels_encoder = None

template_dir = str(pathlib.Path(__file__).parent.joinpath("templates"))
templates = Jinja2Templates(directory=template_dir)
jinja2_env = jinja2.Environment(
loader=jinja2.ChoiceLoader([jinja2.PackageLoader(__package__, "templates")])
)
templates = Jinja2Templates(env=jinja2_env)

TileFormat = Union[RasterFormat, VectorTileFormat]

Expand Down

0 comments on commit 5ae94de

Please sign in to comment.