Tiles for other planets

Does anyone have experience / success using map tiles for other planets in Geoviews?

I tried for Mars:

but the map tiles are all over the place when I zoom in.

Ideally, I would like to use high-res maps, similar to Mars — CartoCosmos documentation


1 Like

This would make for a great example. I think currently the issue is that the tiles are defined using the TMS rather than the WMTS standard (which effectively just means the Y values are inverted. It seems an oversight that we do not support TMS tiles directly.

I would suggest using a hook to add the tile source for now and then filing feature requests to add TMS support to HoloViews and GeoViews:

from bokeh.models import TMSTileSource

tile_url = 'http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/celestia_mars-shaded-16k_global/{Z}/{X}/{Y}.png'

def mars_tiles(plot, element):
    plot.state.add_tile(TMSTileSource(url=tile_url), level='underlay')

gv.Points(np.random.rand(1000, 2)*1000).opts(
    hooks=[mars_tiles], global_extent=True, responsive=True, min_height=500, color='white'


Filed an issue on both HoloViews and GeoViews to support TMS tiles:

1 Like

Thank you, Philipp. That works great.

Do you also see a way to use https://trek.nasa.gov/tiles/apidoc/trekAPI.html?body=mars ?

It should look like this:

but I only get

from geoviews.element import WMTS

MarsImagery = WMTS(