Last active
June 28, 2024 15:43
-
-
Save vincentsarago/670be0fb8926f6b1f8dfe0b1e3efdd7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /collections/{collection_id}/time/{date}/tiles/{tileMatrixSetId}/{x}/{y}/{z}.png | |
def DatasetPathParams( | |
collection_id: Annotated[str, Path(description="collection_id")], | |
time_dimension: Annotated[str, Path(description="date", alias="date")], | |
) -> str: | |
""""Here you can use collection_id and time_dimension to get the COG url.""" | |
... | |
app = FastAPI() | |
tiler = TilerFactory( | |
path_dependency=DatasetPathParams, | |
router_prefix="/collections/{collection_id}/time/{date}", | |
) | |
app.include_router( | |
tiler.router, | |
prefix="/collections/{collection_id}/time/{date}", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment