Skip to content

Problem updating the rendering when overwriting a file #816

Answered by vincentsarago
odhondt asked this question in Q&A
Discussion options

You must be logged in to vote

There is no direct fix in TiTiler itself.

You could may do something like

from fastapi import Query
from rasterio._path import _parse_path as parse_path
from typing_extensions import Annotated


def EnvParams(url: Annotated[str, Query(description="Dataset URL")]) -> str:
    return {"CPL_VSIL_CURL_NON_CACHED": parse_path(url).as_vsi()}


from titiler.core.factory import TilerFactory
from fastapi import FastAPI

app = FastAPI()
cog = TilerFactory(environment_dependency=EnvParams)
app.include_router(cog.router)

ref: https://github.com/developmentseed/tilebench/blob/main/tilebench/viz.py#L140

You may also add VSI_CACHE=False and GDAL_CACHEMAX=0 in your environment to force GDAL not too cach…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@odhondt
Comment options

@vincentsarago
Comment options

Answer selected by odhondt
@odhondt
Comment options

@vincentsarago
Comment options

@odhondt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants