-
Notifications
You must be signed in to change notification settings - Fork 26
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
Quadkey Support #56
Conversation
morecantile/models.py
Outdated
@@ -121,6 +127,7 @@ class TileMatrixSet(BaseModel): | |||
wellKnownScaleSet: Optional[AnyHttpUrl] = None | |||
boundingBox: Optional[TMSBoundingBox] | |||
tileMatrix: List[TileMatrix] | |||
is_quadtree: bool = False |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
thanks for the changes @adrian-knauer I'll have a look today or tomorrow 🙏 |
sorry @adrian-knauer I started working on #58 but I'll fix the test tomorrow and plan for a release including this work 🙏 |
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.