holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
597 stars 77 forks source link

Bug in WMTS support #634

Closed hxawax closed 1 year ago

hxawax commented 1 year ago

Hey there,

I think a recent update broke the WMTS support in geoviews. When I'm trying to use the geoviews tile sources as shown in the user guide here https://geoviews.org/gallery/bokeh/tile_sources.html, I'm no more able to reproduce the example.

Complete, minimal, self-contained example code that reproduces the issue

import geoviews as gv

from geoviews import opts, tile_sources as gvts
from geoviews import WMTS
gv.extension('bokeh')

#  opts.defaults(opts.WMTS(width=200, height=200, xaxis=None, yaxis=None, level='annotation')) # not working

(gvts.OSM + gvts.Wikipedia + gvts.StamenToner   + gvts.ESRI).cols(4) #different from example because some tile names changed

#  (gvts.OSM + gvts.Wikipedia + gvts.StamenToner + gvts.EsriNatGeo +gvts.EsriImagery + gvts.EsriUSATopo + gvts.EsriTerrain + gvts.EsriReference).cols(4)

I'm getting the following warning and no plot is shown :

WARNING:param.LayoutPlot02273: Bokeh plotting class for WMTS type not found, object  will not be rendered.
WARNING:param.LayoutPlot02273: Bokeh plotting class for WMTS type not found, object  will not be rendered.
WARNING:param.LayoutPlot02273: Bokeh plotting class for WMTS type not found, object  will not be rendered.
WARNING:param.LayoutPlot02273: Bokeh plotting class for WMTS type not found, object  will not be rendered.

This behavior is breaking some of my code, I was using geoviews to display custom WMTS maps. Now the following command

WMTS('https://mt1.google.com/vt/lyrs=s&x={X}&y={Y}&z={Z}',name="GoogleMapsImagery")

print the following result and no plot.

:WMTS   [Longitude,Latitude]

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc) python 3.11.3 geoviews 1.5.0 bokeh 2.4.3 holoviews 1.15.4

hoxbro commented 1 year ago

Usually, this is because gv.extensions is not loaded. Because I don't have this problem: image

I'm running on the latest main for all the repo, so if you are still seeing the problem it could be fixed in the coming week, with new releases of the packages.

hxawax commented 1 year ago

The issue was resolved by updating numba package to 0.57 to be compatible with Python 3.11.