osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

Add IGN France tiles #11307

Closed DavidLibeau closed 8 months ago

DavidLibeau commented 3 years ago

πŸš€ feature request

Description

IGN France released its data in open data the 1st January 2021. The tiles are sometimes better than OSM (more detailed, etc.). You can try the vector tiles here.

Describe the solution you'd like

It would be nice to be able to have them in OsmAnd+.

Describe alternatives you've considered

I tried to seen if the data from https://geoservices.ign.fr/documentation/diffusion/telechargement-donnees-libres.html could be added to the app, but I think it needs some dev. Maybe the API here https://geoservices.ign.fr/documentation/geoservices/wmts.html or https://geoservices.ign.fr/documentation/geoservices/vecteur-tuile.html are easy to implement.

xmd5a2 commented 3 years ago

Unfortunately server gives 403 error

https://wxs.ign.fr/CLEF/geoportail/wmts?SERVICE=WMTS&REQUEST=GetTile
&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&TILEMATRIXSET=PM
&TILEMATRIX=14&TILECOL=8180&TILEROW=5905&STYLE=normal&FORMAT=image/jpeg
DavidLibeau commented 3 years ago

According to this, it seems like we need to use these url for free data:

Example:

https://wxs.ign.fr/choisirgeoportail/geoportail/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&TILEMATRIXSET=PM&TILEMATRIX=14&TILECOL=8180&TILEROW=5905&STYLE=normal&FORMAT=image/jpeg

And according to this, it is free for 2 000 000 requests per year, so arround 90 000 tiles per day.

They also say here that the availability will be progressive Q1 2021, so maybe we would need to wait a bit.

xmd5a2 commented 3 years ago

Server doesn't allow to change zoom level TILEMATRIX=14. Looks like it is useless for now.

DavidLibeau commented 3 years ago

Some part of the docs seems not so up to date, but you have different layers.

This is an working example for png tiles: https://wxs.ign.fr/choisirgeoportail/geoportail/wmts?layer=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=11&TileCol=1037&TileRow=704.

And here is a working example for vector tiles: https://wxs.ign.fr/choisirgeoportail/geoportail/wmts?layer=PLAN.IGN&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=application%2Fx-protobuf&TileMatrix=11&TileCol=1037&TileRow=704.

xmd5a2 commented 3 years ago

And again, TileMatrix parameter can't be changed. In this case server returns No data found error.

DavidLibeau commented 3 years ago

I think it is now available: https://geoservices.ign.fr/documentation/services/utilisation-web (doc still only in french).

DavidLibeau commented 3 years ago

Here is a working example with Leaflet: https://dav.li/leaflet-ign/

https://wxs.ign.fr/choisirgeoportail/geoportail/wmts?layer=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&tilematrix={z}&tilecol={x}&tilerow={y}
DavidLibeau commented 3 years ago

Note that at a certain point, you don't have any data when you are zooming not in France…

Screenshot 2021-08-16 at 20-11-53 Leaflet IGN

Ujilon commented 1 year ago

Hi,

I've added a few more details in another issue #16956

If you don't have enough time to work on it, it would be very nice if you could at least manually add the Certificate Authority into the app, so that we could keep using the webservices to download the maps, even on older versions of Android.

mollotof commented 1 year ago

is there any tip on how to add the Certificate Authority ? I'm on Android 9 and there's no further version for my old Samsung S5.

Ujilon commented 1 year ago

Same for me, unfortunately.

As far as I know, there is no way to add the CA ourselves, without an OSMAND update, and I don't know the code well enough to push a commit...

It's really sad, because it wouldn't take more than a few minutes for someone who is familiar with the project, and it would be a serious improvement for us in France to be able to use IGN maps.

Ladduro commented 8 months ago

3 years later and this really easy implementation is still not done... really sad to see as a paid user of the OsmAnd services

vshcherb commented 8 months ago

This issue needs to be merge to https://github.com/osmandapp/Osmand/issues/4201

Ujilon commented 8 months ago

This issue needs to be merge to #4201

No, they are not related at all. All it needs to solve our issue here is to add the Certificate Authority to the app. This isn't what the issue you mentioned is about.

Once this is done, it won't be hard to identify the proper URL to send the tiles requests to the server.

vshcherb commented 8 months ago

You are right. Though we probably not going to do this Certificate Authority as external online tiles are less important for us

Ujilon commented 8 months ago

You are right. Though we probably not going to do this Certificate Authority as external online tiles are less important for us

I understand that they are not what OpenStreetMap is about, and they are not a development goal for Osmand.

And yet, they would be extremely valuable for the users. After all, there already are external online tiles (hello Microsoft maps ;) ), so why not add this single tiny file to the app, for older Android versions ?

vshcherb commented 8 months ago

Oh I see... Well because > 60-70% is already on Android 13 and higher it's just too late to add to code base something. So I don't see any elegant solution and I don't see that it has impact on many current users. Situation now and 2 years ago is totally different and in 1 year it will be even less important CA issue

Ujilon commented 8 months ago

I'm sure you understand how frustrating it is for the few of us stuck on Android 9, even more when we are planning on keeping our courrent phones for as long as possible, but sure, this should have been dones a few years ago, now there is maybe a handful of us, in France, with a need for these tiles on Android < 10 Hopefully, this number will reach zero soon enough πŸ‘