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 zoom range and resolution in metadata output #96

Closed
vincentsarago opened this issue Apr 1, 2019 · 5 comments
Closed

add zoom range and resolution in metadata output #96

vincentsarago opened this issue Apr 1, 2019 · 5 comments
Assignees

Comments

@vincentsarago
Copy link
Member

Having those could be useful IMO

@vincentsarago vincentsarago self-assigned this Apr 1, 2019
@DanSchoppe
Copy link
Contributor

@vincentsarago Are you thinking this would be slippy map zoom level information (min zoom, max zoom), or physical units (ground sample distance in eg. meters/pixel)? Or maybe both??

@vincentsarago
Copy link
Member Author

@DanSchoppe both 😄

@vincentsarago
Copy link
Member Author

but as for cogeotiff/rio-cogeo#62 (comment) we need to figure out how to take care (or not) of the latitude in the calculation

@vincentsarago
Copy link
Member Author

let's add band_names (band description) too ;-)

    with rasterio.open(src_path) as src_dst:
        idx = indexes if indexes else src_dst.indexes
        def _get_name(ix):
            try:
                name = src_dst.descriptions[ix - 1]
                if not name:
                    name = f"band{ix}"
            except IndexError:
                name = f"band{ix}"
            return name
        band_names = [_get_name(ix) for ix in idx]  

@vincentsarago
Copy link
Member Author

done in #97

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

2 participants