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 to titiler 0.16 #60

Merged
merged 1 commit into from
Jan 12, 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
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
Loading