Does anyone have experience / success using map tiles for other planets in Geoviews?
I tried for Mars:
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"# Mars Rover & Heli Demo\n",
"\n",
"<img align=\"right\" src=\"https://anitagraser.github.io/movingpandas/assets/img/movingpandas.png\">\n",
"\n",
"[](https://mybinder.org/v2/gh/anitagraser/movingpandas-examples/main?filepath=2-analysis-examples/mars-rover.ipynb)\n",
"[](https://github.com/anitagraser/movingpandas-examples/blob/main/2-analysis-examples/mars-rover.ipynb)\n",
"[](https://anitagraser.github.io/movingpandas-website/2-analysis-examples/mars-rover.html)\n",
"\n",
"This tutorial uses data published by NASA:\n",
"\n",
"* https://mars.nasa.gov/mmgis-maps/M20/Layers/json/M20_waypoints.json\n",
"* https://mars.nasa.gov/mmgis-maps/M20/Layers/json/M20_traverse.json\n",
This file has been truncated. show original
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
Thanks.
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'
)
2 Likes
Filed an issue on both HoloViews and GeoViews to support TMS tiles:
opened 08:59AM - 17 Oct 22 UTC
type: enhancement
Currently we support WMTS, Quad and Bbox tile definitions but do not support the… TMS tile standard which simply flips the y indexing of the tiles. This should be trivial to support and allows many other tile providers to be used:
See https://discourse.holoviz.org/t/tiles-for-other-planets/4393/2 for reference
opened 08:59AM - 17 Oct 22 UTC
type: enhancement
See https://github.com/holoviz/holoviews/issues/5486
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(
'https://trek.nasa.gov/tiles/Mars/EQ/Mars_MGS_MOLA_ClrShade_merge_global_463m/1.0.0/default/default028mm/{Z}/{Y}/{X}.jpg',
name="Mars")