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 TiTiler version #61

Merged
merged 2 commits into from
Nov 22, 2020
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
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"sqlakeyset",
"stac-pydantic>=1.3.5",
"pydantic[dotenv]",
"cogeo-mosaic==3.0a10",
"titiler==0.1a2",
"rio-cogeo==2.0a5",
"titiler==0.1.0a12",
]

extra_reqs = {
Expand Down
11 changes: 3 additions & 8 deletions stac_api/api/extensions/tiles.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
"""tiles extension"""
from dataclasses import dataclass

import pkg_resources
from fastapi import FastAPI
from starlette.requests import Request
from starlette.responses import HTMLResponse
from starlette.templating import Jinja2Templates

from stac_api.api.extensions.extension import ApiExtension
from stac_api.api.models import ItemUri
from stac_api.api.routes import create_endpoint_with_depends
from stac_api.clients.tiles.ogc import TilesClient
from stac_api.models.ogc import TileSetResource
from starlette.requests import Request
from starlette.responses import HTMLResponse


@dataclass
Expand All @@ -23,9 +20,7 @@ class TilesExtension(ApiExtension):
def register(self, app: FastAPI) -> None:
"""register extension with the application"""
from titiler.endpoints.stac import STACTiler

template_dir = pkg_resources.resource_filename("titiler", "templates")
templates = Jinja2Templates(directory=template_dir)
from titiler.templates import templates

titiler_router = STACTiler().router

Expand Down