Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified WMTS element support across backends #120

Merged
merged 1 commit into from Jan 14, 2018
Merged

Unified WMTS element support across backends #120

merged 1 commit into from Jan 14, 2018

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jan 13, 2018

The WMTS element now supports the tile source URL format that is also supported by bokeh, finally unifying the two. This PR also deprecates Tiles since it does exactly what WMTS does. I'd also be happy to keep Tiles as a simple alias for WMTS though, @jbednar any thoughts?

Here's the same plot in two backends:

tiles = gv.WMTS('https://maps.wikimedia.org/osm-intl/{Z}/{X}/{Y}@2x.png') 

# Project data to Web Mercator
nybb = gpd.read_file(gpd.datasets.get_path('nybb'))
poly_data = nybb.to_crs(ccrs.GOOGLE_MERCATOR.proj4_init)
polys = gv.Polygons(poly_data, vdims='BoroName', crs=ccrs.GOOGLE_MERCATOR)
tiles * polys

image

screen shot 2018-01-13 at 10 07 00 pm

@jbednar
Copy link
Member

@jbednar jbednar commented Jan 14, 2018

Great! The name WMTS has always been mysterious-looking, and I do think a better name would be good. Is Tiles the appropriate name? Are there WMTS sources that are not map tiles? If so it's fine; if not MapTiles might be a better name. I also like TileSource or TileServer, because the one thing that's important to know about Tiles/WTMS objects is that they are served by an external site, unlike just about any other Element.

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Jan 14, 2018

TileSource/MapTiles seem reasonable, that said it would add a third alias, with the other two names (Tiles and WMTS) having to go through a fairly long deprecation cycle, so maybe I favor Tiles.

Are there WMTS sources that are not map tiles?

Don't think so since WMTS stands for Web Mapping Tile Service. Misread your question, I think the XYZ scheme uses the assumption that it's map tiles in mercator coordinates, so MapTiles might be more accurate.

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Jan 14, 2018

I'm going to go ahead and merge once tests pass, please file an issue to add a TileSource/MapTiles alias and deprecate WMTS and Tiles if you think it's a better name.

@philippjfr philippjfr merged commit 76d301c into master Jan 14, 2018
3 checks passed
@jbednar
Copy link
Member

@jbednar jbednar commented Jan 15, 2018

Misread your question, I think the XYZ scheme uses the assumption that it's map tiles in mercator coordinates, so MapTiles might be more accurate.

Right; my question was confusing, but what I was getting at was whether there are tile sources that our objects would accept that are not maps. Bokeh seems to allow for the possibility, in that it has a TileSource base class that does not mention maps. I believe that tiles have been used in Bokeh for spectrogram displays that are not maps but I suppose can somehow be made to fit into the XYZ format (as long as Y is unbounded, as it is time), and I want to make sure that (a) we don't rule out applications like that, and (b) we have names that correctly reflect the level of generality.

@jbednar
Copy link
Member

@jbednar jbednar commented Jan 15, 2018

(This being geoviews, we'd have to add a Tiles object to hv to handle such cases, presumably!)

@philippjfr philippjfr deleted the wmts_unify branch Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants