-
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
refactor geographic crs attribute #158
Conversation
@vincentsarago yeah I was having to store |
Yeah, the fact that we need the geographic CRS is strictly for morecantile internals: morecantile/morecantile/models.py Line 904 in 1829fe1
morecantile/morecantile/models.py Lines 1177 to 1189 in 1829fe1
morecantile/morecantile/models.py Lines 1328 to 1332 in 1829fe1
|
with open(tileset, "r") as f: | ||
ts = TileMatrixSet.model_validate_json(f.read()) | ||
|
||
if not pyproj.CRS.from_epsg(4326) == ts.geographic_crs: |
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.
for some TMS, the geographic_crs
returned by tms._pyproj_crs.geodetic_crs
isn't strictly equal to WGS84
, but by checking the geographic transformation
of the tms bbox we can see they give the same result
@AndrewAnnex are we good here? |
923e9d3
to
4aa83ec
Compare
@vincentsarago yeah I think this is looking good now, I don't think you need to do quite as much work in the tests with transforming the bboxes though as to and from geographic functions both enforce always_xy order, but think this is about right. let's lift the test from my other pr into this pr and see if anything needs to be changed, or I can make a follow on PR: |
let's merge this one and then you can create a new PR with the tests |
@vincentsarago something isn't quite right with TMS with inverted axes, I am investigating but will need to stop and do other things so unless I see a quick fix I'll push a pr with failing tests |
ref #157 #152
what do you think @AndrewAnnex
#152 introduced the fact the
_geographic_crs
could be stored in the TMS document but that is breaking the TMS specification.if the proposed solution (relying on crs.geodetic_crs) doesn't work, then I'm not sure what we should do