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

Italian Cadastre WMS don't render well #1883

Closed
agronomofiorentini opened this issue Feb 23, 2024 · 1 comment
Closed

Italian Cadastre WMS don't render well #1883

agronomofiorentini opened this issue Feb 23, 2024 · 1 comment

Comments

@agronomofiorentini
Copy link

Describe the bug

I would like to add the Italian Cadastre WMS service to folium.

The Italian cadastre releases this service wms under by License CC-BY 4.0.

The following is the code that i am using, but the map is displaying wrong.

I have checked the documentation of the Italian Cadastre WMS and the coordinate reference system by default EPSG:6706.

To Reproduce

import folium

m = folium.Map(location=[47.46901, 9.36688], zoom_start=13)

folium.raster_layers.WmsTileLayer(url = 'https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap',
                                  layers = 'Cartografia_Catastale',
                                  transparent = True, 
                                  control = True,
                                  fmt="image/png",
                                  name = 'wms',
                                  overlay = True,
                                  show = True,
                                  ).add_to(m)
folium.LayerControl().add_to(m)

m

Environment:

  • Browse: chrome
  • Jupyter Notebook
  • Python version Python 3.10.4
  • folium version 0.14.0
  • branca version 0.6.0

Additional context
I think it's related to the CRS.

Possible solutions
Maybe adding the argument crs to set a costum projection to the WmsTileLayer could be the solution?

@Conengmo
Copy link
Member

Here on page 5 it says something about the CRS: https://www.agenziaentrate.gov.it/portale/documents/20143/260417/Manuale+consultazione+cartografia_Documentazione+descrittiva+del+servizio+di+consultazione+della+cartografia+catastale+20180611.pdf/35e955f7-2344-56c8-1157-8f7567531660, though I don't read Italian. It seems it uses ETRF2000?

You can pass the CRS as an additional keyword argument to the WMSTileLayer class.

folium.raster_layers.WmsTileLayer(
    url='https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap',
    layers='Cartografia_Catastale',
    transparent=True,
    control=True,
    fmt="image/png",
    name='wms',
    overlay=True,
    show=True,
    crs="ETRF2000",
).add_to(m)

Hope that helps!

I'll close the issue since there doesn't seem to be anything to do with Folium. But feel free to share your further findings here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants