-
Notifications
You must be signed in to change notification settings - Fork 108
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
replace geographic_bounds
with bounds
and removes maxzoom, minzoom
from info()
response
#744
Comments
I disagree, see developmentseed/titiler#995 (comment) |
started something over #745 when we started rio-tiler, things were simple, the module was mainly for creating Once we remove the TMS attribute, we also need to remove the min/max zoom and in a way also the geographic crs. This makes things (IMO) way more simpler. The PR also removes the Users can easily get the min/maxzoom and geographic CRS with 3 lines of code: # before
tms = morecantile.tms.get("WebMercatorQuad")
with Reader("cog.tif", tms=tms, geographic_crs=tms.rasterio_geographic_crs) as src:
bounds = src.geographic_bounds
minzoom, maxzoom = src.minzoom, src.maxzoom
# now
tms = morecantile.tms.get("WebMercatorQuad")
with Reader("cog.tif") as src:
bounds = src.geographic_bounds(tms.rasterio_geographic_crs)
minzoom, maxzoom = src.get_zooms(tms) |
@vincentsarago added a comment or two to that pr, my only concern really is that any given cog should have an a CRS associated from it, and so to me as a user the # earth cog is in some projection with a WGS84 ellipsoid
with Reader("earth_cog.tif") as src_earth:
# the geographic_crs for the cog happens to be WGS84
bounds_4326 = src_earth.geographic_bounds()
# using a different geographic crs
bounds_grs67 = src_earth.geographic_bounds(GRS1967)
# mars cog is using IAU:49900 geographic crs
with Reader("mars_cog.tif") as src_mars:
# this should work, but current pr would not allow it to work
bounds_49900 = src.geographic_bounds()
# this should fail
_ = src_mars.geographic_bounds(WGS84) |
bounds, maxzoom, minzoom
from info()
methodgeographic_bounds
with bounds
and removes maxzoom, minzoom
from info()
response
Those variable depends on the TMS and on the geographic CRS, which then needs to be passed and rightfully configured when opening the file
rio-tiler/rio_tiler/models.py
Lines 60 to 73 in bb33ffb
ref: developmentseed/titiler#995 (comment)
The text was updated successfully, but these errors were encountered: