Skip to content

rescale - what is it doing? #494

Answered by geospatial-jeff
mdavid800 asked this question in Q&A
Discussion options

You must be logged in to vote

Rescale is doing a linear stretch, the minv and maxv parameters in your GET request determine the input range for this stretch while the output range will always be 0-255 (8bit). It's ultimately calling this function in rio-tiler (note the call to numpy.clip).

My data set ranges from 4.9m/s - 16.4m/s , when I use rescale am i correct in assuming that the data range min - max is split between 0-255 ? i.e. 0 represents 4.9m/s and 255 represents 16.4m/s ?

This is correct if you don't specify the rescale query parameter, in which case titiler falls back to scaling your data based on it's min/max range. If you wanted to cut off the histogram at 10m/s to remove outliers you could set the rescale

Replies: 2 comments 2 replies

Comment options

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

@geospatial-jeff
Comment options

Answer selected by mdavid800
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
3 participants