Skip to content

How to get the min / max value to rescale using a mosaicJSON for dem COGs #701

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

You must be logged in to vote

When using the rescaling parameter, this should be the min/max values for the whole dataset.

https://titiler.xyz/mosaicjson/map?url=https://filedn.com/lkrqWbAQYllSVUK4ip6g3m0/mosaic.json&rescale=0,6000&colormap_name=terrain

☝️ tiles will start loading at zoom 8

Note: we've added Copernicus DEM to rio-tiler-pds which in theory remove the need of creating MosaicJSON for this dataset.

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

# We need to overwrite the default `url` path parameter
def path_dep() -> str:
    return "copernicus_dem"


from fastapi import FastAPI

app = FastAPI()

endpoints = TileFactory(
    reader=Dem30Reader,
    p…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tdurand
Comment options

You must be logged in to vote
0 replies
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