Skip to content

Display changes in tile function from v1 to current #495

Answered by vincentsarago
mike-amodeo asked this question in Q&A
Discussion options

You must be logged in to vote
def reader(file, x, y, z, **kwargs):
        with COGReader(file) as image:
            return image.tile(x, y, z, **kwargs)

    try:
        img, _ = mosaic_reader(
            full_paths,
            reader,
            int(request["x"]),
            int(request["y"]),
            int(request["z"]),
            allowed_exceptions=(TileOutsideBounds, RasterioIOError),
            resampling_method="bilinear",
        )
        tile = img.data[0]
        mask = img.mask

☝️ should give the same result 🤞

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mike-amodeo
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
Converted from issue

This discussion was converted from issue #494 on April 18, 2022 21:05.