French geoplatform WMS maps

Started by ventoux, October 26, 2024, 10:54:47 AM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

ventoux

Hello,
The new IGN platform seems to have stabilized. It's time to review how to use it with Oruxmaps for wms and wmts maps.

As I understand it, you can define new personal wmts maps in the onlinemapsousrces.xml file, to be placed in the customonlinemaps directory. This works well and I've added my own, inspired by randochartreuse.free.fr.

However, to add wms maps, you need to use the wms-services.xml file in the mapfiles directory.
In this file, I'd like to add the Scan 25 resource. Has anyone done this before, and can they tell me what parameters to use?
Thanks for your help.
Translated with DeepL.com (free version)


Bonjour,
La nouvelle plateforme de l'IGN semble maintenant stabilisée. C'est le moment de faire le point sur la façon de l'utiliser avec Oruxmaps pour les cartes wms et wmts.

Si j'ai bien compris, on peut définir de nouvelles cartes wmts personnelles dans le fichier onlinemapsousrces.xml à placer dans le répertoire customonlinemaps. Cela fonctionne bien et j'ai pu ajouter les miennes en m'inspirant de randochartreuse.free.fr.

Par contre, pour ajouter des cartes wms, il faut utiliser le fichier wms-services.xml du répertoire mapfiles.
Dans ce fichier, je voudrais ajouter la ressource Scan 25. Quelqu'un a-t-il déjà fait cela et peut-il communiquer les paramètres à utiliser ?
Comment trouver les bonnes informations dans le fichier des "capabilities" et les reporter dans les balises du fichier <wms> ... </wms>

Tronpo

Quote from: ventoux on October 26, 2024, 10:54:47 AMHello,
The new IGN platform seems to have stabilized. It's time to review how to use it with Oruxmaps for wms and wmts maps.

As I understand it, you can define new personal wmts maps in the onlinemapsousrces.xml file, to be placed in the customonlinemaps directory. This works well and I've added my own, inspired by randochartreuse.free.fr.

However, to add wms maps, you need to use the wms-services.xml file in the mapfiles directory.
In this file, I'd like to add the Scan 25 resource. Has anyone done this before, and can they tell me what parameters to use?
Thanks for your help.
Translated with DeepL.com (free version)


Bonjour,
La nouvelle plateforme de l'IGN semble maintenant stabilisée. C'est le moment de faire le point sur la façon de l'utiliser avec Oruxmaps pour les cartes wms et wmts.

Si j'ai bien compris, on peut définir de nouvelles cartes wmts personnelles dans le fichier onlinemapsousrces.xml à placer dans le répertoire customonlinemaps. Cela fonctionne bien et j'ai pu ajouter les miennes en m'inspirant de randochartreuse.free.fr.

Par contre, pour ajouter des cartes wms, il faut utiliser le fichier wms-services.xml du répertoire mapfiles.
Dans ce fichier, je voudrais ajouter la ressource Scan 25. Quelqu'un a-t-il déjà fait cela et peut-il communiquer les paramètres à utiliser ?
Comment trouver les bonnes informations dans le fichier des "capabilities" et les reporter dans les balises du fichier <wms> ... </wms>

Hi, you can add wms or wmts directly in orux. You don't need to edit the file
Simply.
I give you an example with a wms from my country, I don't have any French.

Best regards

ventoux

#2
I thank you, but i tried this way too. The map does not display.
Perhaps, i forget some addons in the url ...
This is why i would like to understand capabilities for the <boundingbox>

Do you know what is the purpose of the file .wms_data ?

LaurentG

First of all, why do you want to get these maps as WMS maps ?
Maps served as WMS by IGN server are the same than those served as WMTS.
AFAIK, there is not any map served only in WMS and not in WMTS.
The only difference is that WMS server can (in some cases) serve the maps with different projection, but this is 100% useless with OM, and also that WMS service is necessarily a little bit slower than WMTS (because in WMS it has to create the tiles on the fly, while in WMTS tiles are stored predefined on the server)

ventoux

Tell me what you need, and I'll tell you how to get by without it.  :D

The difference between the two maps is in the highers zoom levels. We no longer have the same layer.

LaurentG

I'm afraid you missed something...

If the map you choose is GEOGRAPHICALGRIDSYSTEMS.MAPS, this map is a "multiscale" map, ie. that changes automatically with the zoom level.
At zooms 15 and 16, it's the same than the Scan25, but at zooms higher (17 and above), it's the same than PlanIGNV2
And at the contrary, at lower zoom levels (14 and below), it's the same than Scan100 and Scan250 (these two maps do not exist anymore as separate maps, AFAIK)

But if the map you choose is GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR, this map is at any zoom level it is defined, ie. 6 to 16, always a "pure scan25". And outside of these limits, do not exist.
And then if you go to higher levels than 16, the map do not change : it is not defined, and then is empty in OM... except if you have defined (in onlinemapsources.xml file) its zoom levels in the range 6-16, in which case OM do not try to get the (inexistent) level 17 or 18, but rather makes automatically a "digital zoom", ie. enlarges the display staying at the same zoom level.
If you have a look in such a case at the "Level of zoom" displayed by OM (in the Dashboard), you can see that you are 150@16 (ie 150% at zoom 16), then 200@16... up to 800@16 , but never 100@17 or 100@18, etc...

But maybe I'm wrong and there is something I don't know about these maps.... even if I would be surprised of that.
So, if it's the case and I'm wrong, I would be very interested that you show me a screen copy of WMTS and WMS different at high zoom level....

LaurentG

PS : You can also use the GEOGRAPHICALGRIDSYSTEMS.MAPS but limit (in onlinemapsources.xml fle) its zoom level to level 16, to get benefit of clearer map at low zoom level, but do not automatically switch map style above 16....

ventoux

#7
QuoteBut maybe I'm wrong
No, you're right. 
I'm aware that I'm only zooming in to the maximum level of the SCAN25TOUR_PYR-JPEG_WLD_WM layer in wms. But it's very useful in the field, in some cases where relief is important for orientation. In short, I prefer a blurred map, but with relief and vegetation, to a sharp map but without this informations.

Thanks for your explanations and I'll try to reduce the zoom level of GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR to wmts.

And all this doesn't say how to get the IGN's map i want in wms. But it's an excellent workaround. Thanks you very much for that.

LaurentG

#8
Quote from: ventoux on October 26, 2024, 04:53:12 PMAnd all this doesn't say how to get the IGN's map i want in wms.

Actually, I did some tests, and it seems that there is something wrong between OM and IGN WMS servers.
At the beginning, I thought it was due to the authentication system via the apikey parameter, but actually, there is the same problem with other maps that are "public" (and then do not require any authentication, nor any specific access right).
Since it works in OM with other WMS servers, I imagine that the issue is more in IGN servers, but I can't say more precisely.
Maybe a problem due to version 1.3.0 of WMS ?

But as for me there is no need to get WMS maps from IGN (since all are available also in WMTS), I stop here my investigations.

ventoux

You've already done a lot, and I'd like to thank you once again. I wish you all the best for your outings in the great outdoors.

Your tests confirm mine, there's something wrong  :P . When I looked at the contents of the .wms_data file, I saw that it contains all the parameters for the wms maps. I'll also try to modify it, for the fun !

Tronpo

#10
Good!! Could you provide one of those wms, to do some tests? And if the error is in the wms you can't contact the IGN platform and report it ?
I registered on the portal but I don't see where to get the wms
Best regards

ventoux

#11
This is the tms file I use in Qmapshack for this map.
<TMS>
<Layer idx="0">
<Title>TITLE</Title>
<Script><![CDATA[(
 function convert(z,x,y)
{function tile2lon(x, z) {return x / Math.pow(2.0, z) * 360.0 -180.;}
  function tile2lat(y, z) {
    n = Math.PI - (2.0 * Math.PI * y) / Math.pow(2.0, z);
    return (Math.atan(Math.sinh(n)))*180.0/Math.PI;
  }
  north = tile2lat(y, z);
  south = tile2lat(y + 1, z);
  west = tile2lon(x, z);
  east = tile2lon(x + 1, z);
  bbox = south + "," + west +"," + north + "," + east;
  return "https://data.geopf.fr/private/wms-r?apikey=ign_scan_ws&LAYERS=SCAN25TOUR_PYR-JPEG_WLD_WM&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&WIDTH=256&HEIGHT=256&CRS=EPSG:4326&STYLES=&BBOX=" + bbox
}
)]]></Script>
</Layer>
<Copyright>COPYRIGHT</Copyright>
</TMS>

https://geoservices.ign.fr/documentation/services/utilisation-sig/tutoriel-qgis/gpf-wms-wmts-donneesnonlibres

There are public and private maps. But privates can bee accessed by a public apikey

This map's properties in Qgis
Information du fournisseur
Emprise    -180.0000000000000000,-90.0000000000000000 : 180.0000000000000000,90.0000000000000000
Largeur    n/a
Hauteur    n/a
Type de Donnée    Impossible de déterminer le type de donnée raster.
WMS Info   
Couches sélectionnées Autres couches
Propriétés du serveur
Propriétés    Valeur
WMS Version    1.3.0
Titre    WMS/WMTS/TMS server
Résumé    This server provide WMS, WMTS and TMS raster and vector data broadcast
Mots-clés    WMS
WMTS
TMS
Ressource en ligne    -
Personne à contacter   

ROK4 Team
Tarifs    none
Contraintes d'accès    none
GetCapabilitiesUrl    https://data.geopf.fr/private/wms-r?VERSION=1.3.0&
GetMapUrl    https://data.geopf.fr/private/wms-r?
GetFeatureInfoUrl    https://data.geopf.fr/private/wms-r?
GetLegendGraphic    https://data.geopf.fr/annexes/ressources/legendes/LEGEND.jpg?
Formats d'image    image/jpeg
image/png
image/tiff
image/geotiff
image/x-bil;bits=32
Formats reconnus    text/plain
text/html
text/xml
application/xml
application/json
Nombre de couches    4


ventoux

#12
This url, in a web browser, is able to get a tile.
https://data.geopf.fr/wms-r/wms?LAYERS=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&STYLES=&SERVICE=WMS&REQUEST=GetMap&Version=1.3.0&FORMAT=image/png&CRS=EPSG:4326&BBOX=45.413876460821086,5.855712890625,45.42158812329091,5.86669921875&WIDTH=256&HEIGHT=256"  -->

But this in wms.service.xml can't get a map.
<wms>
<name>Plan test v2</name>
<uid>2001</uid>
<desc>Plan test v2</desc>
<url><![CDATA[https://data.geopf.fr/wms-r/wms?STYLES=&]]></url>
<minzoomlevel>2</minzoomlevel>
<maxzoomlevel>18</maxzoomlevel>
<version>1.3.0</version>
<layers>GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2</layers>
<coordinatesystem>EPSG:4326</coordinatesystem>
<format>image/png</format>
<cache>1</cache>
<tilesize>256</tilesize>
<boundingbox minx="-180" miny="-90" maxx="180" maxy="90"/>
</wms>

What's the right syntax?

Tronpo

Hello, with :
https://data.geopf.fr/wms-r/wms?
Oruxmaps recognizes the URL, but then I can't visualize any layer, planv2 for example.
I've tried other apps, and if I've succeeded...
The wms are not my forte, I don't know where the problem is.

ventoux

#14
QuoteI've tried other apps, and if I've succeeded...I don't know where the problem is.
This is the question.Oruxmaps or not Oruxmaps ?

I wonder how Oruxmaps writes the boundingbox to be sent to the server.
In fact, in the graphical interface for creating WMS maps, you can't choose the WMS version.
But it turns out that in version 1.3.0, for EPSG=4326, the coordinates must not be written in the same order as in version 1.1.0. This may be the reason if Oruxmaps still works in version 1.1.0.