Merged
Conversation
sharkAndshark
commented
May 22, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new function to compute the extent for a Cloud Optimized GeoTIFF (COG) based on input metadata and transformation matrices.
- Introduces a new extent field in the Meta struct.
- Adds helper functions get_full_resolution and get_extent to compute image resolution and extent.
- Updates error types to handle failures in computing resolution and extent.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| martin/src/cog/source.rs | Adds functions for resolution and extent computation |
| martin/src/cog/errors.rs | Introduces new error variants for resolution/extent failures |
for more information, see https://pre-commit.ci
CommanderStorm
approved these changes
May 24, 2025
Member
CommanderStorm
left a comment
There was a problem hiding this comment.
from my side, we could btw ship it.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to calculate the geographic extent of a COG by introducing a new field in the Meta struct and implementing the get_extent function along with related utility functions.
- Added an extent field to the Meta struct and updated get_meta to compute it.
- Introduced get_full_resolution and get_extent functions to compute image resolution and geographic extents.
- Updated error handling and extended tests to verify the new extent and full resolution calculations.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| martin/src/cog/source.rs | Adds extent calculation logic including get_full_resolution and get_extent functions, as well as test cases. |
| martin/src/cog/errors.rs | Introduces an error variant for GetFullResolutionFailed with updated error messaging. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Collaborator
Author
|
thx! @CommanderStorm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's the 3rd PR of #1814 to fix #1820
A func to get the extent from COG is added. It's highly inspired by geotiff.js and the content of B.6 of geotiff spec