Open jlaura opened 2 years ago
I think the request for a zoom level 10 tile is coming from this line: https://github.com/stac-utils/stac-layer/blob/main/src/utils/tile-layer.js#L18
It's possible that we are miscalculating the bounds of this layer, but it'll require some more investigation.
@DanielJDufour Huge thanks for the rapid response. Sounds good on the potential for a bounds miscalculation. Is that something that would be occurring in this library or in another library? I am happy to take a look at the code as well. I'm not just familiar with this project. Any starting point hints, if easy to provide, would be awesome!
I think this is the line that gets the bounds: https://github.com/stac-utils/stac-layer/blob/main/src/index.js#L297. I'm wondering if it's failing for some reason although it's just a guess.
If I had to guess, I would say that it's an issue with the stac-layer library, but I can't say for certain.
I am attempting to integrate stac-layer into a custom leaflet web map that displays planetary data. I have deployed a Titiler tiler server to AWS. I am using the following to instantiate a stac-layer on my web map:
This code is successfully executing and is generating the following URL, which is 404ing because the x/y/z location is out of bounds for the GeoTiff. https://lswzqqyazn5h732xngeagotvtq0qgecn.lambda-url.us-west-2.on.aws/mars/tiles/10/8/356.png?url=https://asc-mars.s3-us-west-2.amazonaws.com/themis_controlled/I63359022RDR/I63359022RDR_B10.tif
When I use leaflet in a Jupyter notebook and specify identical bounds like so:
I see the following URL, which renders correctly (albeit with a terrible stretch, but that is fixable later!). https://lswzqqyazn5h732xngeagotvtq0qgecn.lambda-url.us-west-2.on.aws/mars/tiles/5/0/8.png?url=https://asc-mars.s3-us-west-2.amazonaws.com/themis_controlled/I63359022RDR/I63359022RDR_B10.tif
The {z}/{x}/{y} parameters in the URL are completely different! I am trying to understand where the z/x/y parameters are being set and what could possibly be different between the javascript map and the python example. Is this inside of stac-layer, georaster-layer-for-leafet or someplace else?
Addendum - yes, these data are specified in a 0-360 domain that is very common for non-Earth facing data. I made the python example to test that this was working in that domain. Setting the domain to the appropriate -179 to -174 also causes the same z/x/y issues on the javascript side.