Sentinel 2 imagery "Zoom, X and Y" values in URL

Hi All

I am working on a prototype application on Unity3D, where I want to consume sentinel 2 imagery data, Noticed that we are getting URL in a different format than other imagery providers. I am referencing to Bing, which has a descriptive Tiling system, link : Bing Maps Tile System - Bing Maps | Microsoft Learn

Currently Cesium ion is using format as https://assets.cesium.com/3954/{zoom}/{x}/{y}.jpg

Using the same logic defined in Bing Tiling System doesn’t seem to work. One clear difference is, A certain zoom level gives (zoom+1)^2 number of tiles on either direction, rather than zoom^2. Also noticed that x is correct, but Y isn’t correct with Bing Tiling System. Y seems to be reversed ((1 << zoom) - y - 1), which gives Tiles in Y ordered, but not positioned correctly. Origin start from equator, not top

Need help understanding the logic for Tiling system.

Imagery tiling systems from different providers can have different LOD layouts. Its not necessary that all imagery providers have the same ordering.

You should refer to the TMS tilemapresource.xml file (or a similar counterpart of the imagery tileset) and use that to check the specific HLOD. For example, the Sentinel 2 tilemapresource.xml file is:

<?xml version="1.0" encoding="utf-8"?>
<TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
  <Title>Sentinel-2</Title>
  <Abstract></Abstract>
  <SRS>EPSG:4326</SRS>
  <BoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/>
  <Origin x="-180" y="-90"/>
  <TileFormat width="256" height="256" mime-type="image/jpeg" extension="jpg"/>
  <TileSets profile="global-geodetic">
    <TileSet href="0" units-per-pixel="156543.033928041" order="0"/>
    <TileSet href="1" units-per-pixel="78271.51696402048" order="1"/>
    <TileSet href="2" units-per-pixel="39135.75848201024" order="2"/>
    <TileSet href="3" units-per-pixel="19567.87924100512" order="3"/>
    <TileSet href="4" units-per-pixel="9783.939620502561" order="4"/>
    <TileSet href="5" units-per-pixel="4891.96981025128" order="5"/>
    <TileSet href="6" units-per-pixel="2445.98490512564" order="6"/>
    <TileSet href="7" units-per-pixel="1222.99245256282" order="7"/>
    <TileSet href="8" units-per-pixel="611.49622628141" order="8"/>
    <TileSet href="9" units-per-pixel="305.748113140705" order="9"/>
    <TileSet href="10" units-per-pixel="152.8740565703525" order="10"/>
    <TileSet href="11" units-per-pixel="76.43702828517625" order="11"/>
    <TileSet href="12" units-per-pixel="38.21851414258813" order="12"/>
    <TileSet href="13" units-per-pixel="19.10925707129406" order="13"/>
  </TileSets>
</TileMap>

From this you can compute the origin, the size of the tiles in geographic extent and other required information.