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

Quadkey Support #56

Merged
merged 14 commits into from
Aug 20, 2021
Merged

Conversation

adrian-knauer
Copy link
Contributor

This PR adds quadkey support for 2 x 2 quadkeys. See also the discussion here: #19.
The Tile Matrix Set class has a quadkey_support property now, that checks if the initialized Tile Matrix Set is compatible with a 2 x 2 standard quadkey.
The functionality for quadkey/tile translation was copied from mercantile.

@@ -121,6 +127,7 @@ class TileMatrixSet(BaseModel):
wellKnownScaleSet: Optional[AnyHttpUrl] = None
boundingBox: Optional[TMSBoundingBox]
tileMatrix: List[TileMatrix]
is_quadtree: bool = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should use PrivateAttr https://pydantic-docs.helpmanual.io/usage/models/#private-model-attributes for this. is_quadtree is not something defined in the TMS spec so I think it would be better if we make it somehow private cc @adrian-knauer @geospatial-jeff

FYI: I didn't know about PrivateAttr until today, so I guess this is new to Pydantic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes a lot of sense to me! I wasn't aware of PrivateAttr as well.

@vincentsarago
Copy link
Member

thanks for the changes @adrian-knauer
tests are failing because of change in rasterio (#57 (comment))

I'll have a look today or tomorrow 🙏

@vincentsarago
Copy link
Member

sorry @adrian-knauer I started working on #58 but I'll fix the test tomorrow and plan for a release including this work 🙏

@vincentsarago vincentsarago merged commit 27eff63 into developmentseed:master Aug 20, 2021
@vincentsarago vincentsarago mentioned this pull request Aug 20, 2021
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

Successfully merging this pull request may close these issues.

3 participants