Tile server for non-geographical images

Hi, and thanks for the amazing library. I am trying to use bokeh to display large microscopic data, which can be accessed through a tile server. The data is available in Microdraw which works with OpenSeadragon. The tile server uses the following syntaxes, https://microdraw.pasteur.fr/vervet/vervet_files/{level}/{X}_{Y}.jpg .

I tried to read the tiles directly with bokeh with the following script:

from bokeh.models import MercatorTileSource
from bokeh.plotting import figure, show

url = 'https://microdraw.pasteur.fr/vervet/vervet_files/{Z}/{X}_{Y}.jpg'
tile_provider = MercatorTileSource(url=url,
p = figure(x_range=(500,0), y_range=(0,500), width=800, height=800)

Bokeh can retrieve the tiles, but the order and the dimensions do not correspond to the image. The order of the Y-axis is inverted, and the zooming is not consistent, as you can see this video.

Thanks in advance for your help.

Have you tried the other tile sources, e.g. TMSTileSource or WMTSTileSource? They have different characteristics re: origin location, etc. so you need to choose the one that actually matches your tile server format.

Thanks a lot, the WMTSTileSource worked for the problem with a small change on the tile server.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.