How to identify which layer is on the top for a mosaic json tile? #955
Replies: 1 comment
-
You can't tell this from each pixel, but if you want you can return the list of assets used (per tile) on the response header https://github.com/developmentseed/titiler/blob/main/src/titiler/mosaic/titiler/mosaic/factory.py#L348-L352
Well it will use the first of the list (if the pixel is not transparent) To really know which asset is going to be use for a pixel you can use the
it's not suspicious, it's the method used to select which pixel to choose from the stack of pixel https://cogeotiff.github.io/rio-tiler/mosaic/ |
Beta Was this translation helpful? Give feedback.
-
Context:
Suppose I have a mosaic json file, inside which there are many "layers" that together they form the tile service. When those individual layers overlap, and I have a point on the overlapped location. How can I tell that beneath this point, which individual layer is on the top?
Investigation
Browsing through the repo, it looks like "assets_for_point()" function provide such utility, but it seems to give me a list of layers being identified. But which one is on the top?
Also, within MosaicTilerFactory, I found suspicious function "PixelSelectionParams" that seems to use the "first" strategy. Is this related to my question?
Beta Was this translation helpful? Give feedback.
All reactions