Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TMS tile providers: negative {-y} in urls #250

Open
@abubelinha

Description

Basically all this is already described in geopandas/xyzservices#177

I found some tile servers in these pages and I was trying to use them in contextily:

https://www.ign.es/web/ide-area-nodo-ide-ign
https://idee.es/en/servicios-teselas

I am guessing there is a problem with xyz syntax since their urls end in {z}/{x}/{-y}.extension
Not sure how to implement that in my code:

import contextily as cx
# gdf is a simple geodataframe of a 10 x 10 Km square polygon inside Spain
ax = gdf.plot(figsize=(10, 10), alpha=0.05, edgecolor="k")
# this works well for my area:
tile_source = cx.providers.OpenStreetMap.Mapnik 
tile_attribution = 'OSM contributors' 
# but this fails:
tile_source='https://tms-pnoa-ma.idee.es/1.0.0/pnoa-ma/{z}/{x}/-{y}.jpeg' 
tile_attribution = 'idee.es pnoa-ma'
cx.add_basemap(ax=ax, crs='epsg:4326', source=tile_source, attribution=tile_attribution)
plt.savefig('contextily_test.png', bbox_inches='tight')

Thanks for any help
@abubelinha

EDIT: some related links?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /