Replies: 1 comment 2 replies
-
This is SOOOO interesting For some reason the pydantic model is altered by the import See how the The type is defined https://github.com/developmentseed/morecantile/blob/4.3.0/morecantile/models.py#L49 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'll preface my comment by saying that the behavior I describe below does not occur in v5+ so it doesn't seem to be a critical issue. I'm just reporting something odd that I don't fully understand.
I've stumbled upon unusual behavior that appears to result from the interaction between
morecantile
and the datadog-api-client library. TLDR;tms.tiles(...)
returns tiles outside the supplied bounds when modules fromdatadog-api-client
are imported beforemorecantile
.We're running the following versions:
We're still running 4.3.0 because we have not migrated our project to Pydantic v2 yet.
Example code:
The above code produces a FeatureCollection containing tiles beginning at
x=0
rather than only the tiles that intersectfeat
(shown in red near San Antonio):If I move the
morecantile
import before thedatadog-api-client
import or comment out the line importing modules fromdatadog_api_client.v2
, only the tiles that intersectfeat
are returned as expected:Any idea why this happens? I first encountered this in our project repo and verified with a fresh venv with only the libraries required to run the snippet above.
Beta Was this translation helpful? Give feedback.
All reactions