Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options: optionally skip calculating of min/max via tiling #1

Open
DanielJDufour opened this issue Jan 20, 2020 · 0 comments
Open

Comments

@DanielJDufour
Copy link
Member

Sometimes people will want to try to grab the min/max value from the GDAL_METADATA (if it exists), but won't want to wait to get the min/max by grabbing every tile from a COG's overview or raw data if no overview exists. (This can take roughly 15 seconds for Landsat overviews).

Here's a possible API solution:

const { bands } = getStats(image, { quick: true });

Alternatively, a user could specify what percentage of tiles to sample (defaulting to 1.00 for 100%). In the following example, we sample roughly 50% of the tiles:

const { bands } = getStats(image, { sampleSize: 0.5 });

If a user doesn't want to sample any tiles, they can use:

const { bands } = getStats(image, { sampleSize: 0 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant