geopandas / xyzservices

Source of XYZ tiles providers
https://xyzservices.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
163 stars 30 forks source link

Add Esri World Dark Gray Canvas basemap #41

Closed darribas closed 3 years ago

darribas commented 3 years ago

Moving contextily#181 over here to integrate it with community-contributed providers.

Adds the Esri World Dark Gray Canvas basemap to the provider list.

See:

cc' @EwoutH

EwoutH commented 3 years ago

Thanks!

darribas commented 3 years ago

The link provided seems to be deprecated, this is the updated version:

https://www.arcgis.com/home/item.html?id=358ec1e175ea41c3bf5c68f0da11ae2b

This one however is a vector lile layer, so not currently supported by xyzservices (or contextily for that matter). If you're using it on Leaflet, you can use their recommended URL:

https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/tile/{z}/{x}/{y}.pbf

Closing the issue for now as not supported, but we can reopen down the line if we manage to add support for vector tiles.

abubelinha commented 3 weeks ago

Not sure if this is related, but I am interested in using some public tile providers which seems to use an ArcGIS WMTS server as described here: https://developers.arcgis.com/rest/services-reference/enterprise/wmts-tile-image-service/

I think this would be an example of such servers. I know some of the services listed there are shown as tiled raster layers in their web map viewer.

So my question is how to use those layers in contextily ... if possible. I suspect those "WMTS tiles" are not following the same numbering system as contextily (just try-error of particular tile urls). Compare:

I did my best to show the same area and zoom as in 1st link, but tiles seem to follow a different "distribution"

But I am a complete ignorant about how these services work. @darribas perhaps you know esri arcgis "WMTS servers" accept also some other url syntax so I can use them in xyzservices/contextily?

Thanks in advance @abubelinha

martinfleis commented 3 weeks ago

@abubelinha you can check how we deal with Geoportail France tiles. I believe those are WMTS.

abubelinha commented 3 weeks ago

Thanks @martinfleis that was helpful

I think these are the urls informative about server capabilities:

Too tech for me. Following leaflet-providers-parsed.json Geoportail France example urls, I was able to get tiles from both using querystring parameter syntax. But again, it seems that tile references are quite different for similar areas (1st one follows OSM, 2nd one does not):

I see the first one (France) has CRS entries like this: <TileMatrixSet>...<ows:SupportedCRS>EPSG:3857</ows:SupportedCRS>...</TileMatrixSet>

Whereas the 2nd one (NW Spain) has a different CRS support: <TileMatrixSet>...<ows:SupportedCRS>urn:ogc:def:crs:EPSG::25829</ows:SupportedCRS>...</TileMatrixSet>

I thought its arcgis-based WMTS implementation to be the problem. But perhaps it's just this CRS limitation what is making the 2nd server incompatible with contextily?

martinfleis commented 3 weeks ago

Contextily assumes EPSG:3857, which is the standard CRS for web tiles. I am not sure if you can make it work with EPSG 25829 without changes of the code.