Skip to content

Minimal setup for Copernicus DEM dataset ? #84

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

You must be logged in to vote

There are few gotcha this this reader because it behaves like a mosaic reader

from attrs import define

from fastapi import FastAPI
from titiler.core.factory import TilerFactory
from rio_tiler_pds.copernicus.aws.dem import Dem30Reader

app = FastAPI(title="Copernicus DEM Tile Server")


# NOTE: we need to overwrite the `path_dependency` for titiler (which will inject `url` queryparameter).
# The `Dem30Reader` doesn't take any input so we return nothing 
def fake_path_dependency() -> None:
    return


# We don't want to have `/statistics` endpoints (because it's unsupported by the reader) 
@define(kw_only=True)
class CustomTilerFactory(TilerFactory):
    def statistics(self):
        """W…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tdurand
Comment options

@vincentsarago
Comment options

Answer selected by tdurand
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