Mapas WMS (Solved)

Started by ventoux, August 28, 2020, 11:56:06 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ventoux

¡Hola!

¿Donde puedo ver el fichero donde escrive Oruxmaps cuando añado un mapa wms con  ​"el botón '+'-->Crear WMS"​ ?
Quisiera copiarlo para mandarlo a algunos amigos.

Además, intento crear un mapa WMS editando el fichero oruxmaps/mapfiles/wms_services.xml; pero no se ve en las fuentes de mapas online.
Si alguien puede explicarme como puedo hacer esto, le agradezco de antemano.

Oruxmaps 7.4.22

afgb1977

Quote from: ventoux on August 28, 2020, 11:56:06 AM
¡Hola!

¿Donde puedo ver el fichero donde escrive Oruxmaps cuando añado un mapa wms con  ​"el botón '+'-->Crear WMS"​ ?
Quisiera copiarlo para mandarlo a algunos amigos.

Además, intento crear un mapa WMS editando el fichero oruxmaps/mapfiles/wms_services.xml; pero no se ve en las fuentes de mapas online.
Si alguien puede explicarme como puedo hacer esto, le agradezco de antemano.

Oruxmaps 7.4.22

I do not know if in version 7.4.22 the following can be done:
From the maps menu you can save the WMS, wmts and composite maps by touching the floppy disk (💾) in the upper right. 3 files will be created in OruxMaps / mapfiles.

For the configuration of the WMS in "wms_services.xml", you need to be more specific. In the OruxMaps manual there is a guide to configure the URLs.

ventoux

#2
Gracias por estas informaciones, pero no es exactamente lo que estoy buscando.

¿Dónde están escritos los datos que describen los mapas wms?
Cuando creo un mapa wms con el asistente, donde se guardan las configuraciones para este mapa. Pensé que estaba en el archivo wms_services.xml, pero después de crear tres mapas no están en este archivo. Están bien en algún lugar ya que Oruxmaps los encuentra y puede mostrarlos.

Où sont écrites les données qui décrivent les cartes wms ?
Quand je crée une carte wms avec l'assistant, où sont enregistrés les paramètres de cette carte. Je pensais que c'était dans le fichier wms_services.xml , mais après avoir créé trois cartes, elles ne sont pas dans ce fichier. Elles sont bien quelque part puisque Oruxmaps les trouve et peut les afficher.  :)

Where is the data that describes the wms maps written?
When I create a wms map with the wizard, where the settings for this map are saved. I thought it was in the wms_services.xml file, but after creating three maps they are not in this file. They are well somewhere since Oruxmaps finds them and can display them.

afgb1977

Quote from: ventoux on August 30, 2020, 10:39:05 AM
Gracias por estas informaciones, pero no es exactamente lo que estoy buscando.

¿Dónde están escritos los datos que describen los mapas wms?
Cuando creo un mapa wms con el asistente, donde se guardan las configuraciones para este mapa. Pensé que estaba en el archivo wms_services.xml, pero después de crear tres mapas no están en este archivo. Están bien en algún lugar ya que Oruxmaps los encuentra y puede mostrarlos.

Où sont écrites les données qui décrivent les cartes wms ?
Quand je crée une carte wms avec l'assistant, où sont enregistrés les paramètres de cette carte. Je pensais que c'était dans le fichier wms_services.xml , mais après avoir créé trois cartes, elles ne sont pas dans ce fichier. Elles sont bien quelque part puisque Oruxmaps les trouve et peut les afficher.  :)

Where is the data that describes the wms maps written?
When I create a wms map with the wizard, where the settings for this map are saved. I thought it was in the wms_services.xml file, but after creating three maps they are not in this file. They are well somewhere since Oruxmaps finds them and can display them.

Vous devez "Exporter" ou "Enregistrer", spécifier le dossier dans lequel vous souhaitez enregistrer la configuration. Vous y trouverez les fichiers enregistrés.

ventoux

#4
Merci.
Mais cela ne dit pas où Oruxmaps eneregistre le fait que je viens de créer une carte wms avec l'asistant. En tout cas ce n'est pas dans wms_services.xml
Quote
Vous y trouverez les fichiers enregistrés.
Effectivement, j'ai bien vu ce fichier caché. Mais comment à partir de lui, créer une carte wms dans un autre Oruxmaps ? Où copier ces informations ?

El manual en el capítulo WMS (Web Map Service)
Quote
Finalmente, crear el mapa; se añadirá a las fuentes de mapas online, su nombre empezará por WMS: ​[Nombre de mapa]
Muy bien, lo hice y el mapa se muestra bien. Ahora quisiera encontrar donde Oruxmaps escribió los datos del nuevo mapa.

LaurentG

Hi guess that these data are written somewhere they cannot be read... except by OruxMaps app itself.

It is what I understand from an answer provided by Orux himself in another post, here :
https://oruxmaps.org/forum/index.php?topic=4388.msg11634#msg11634

And this new icon "save" in new "Donate" version looks like the "I will try to add that option in next versions," announced by Jose.

ventoux

#6
Thanks.
I did not find this post. I will wait.

Have you tried to create a wms map with the file oruxmaps/mapfiles/wms_services.xml ?
Did it work ?

LaurentG

I have one such map, that works (but is useless, because the map itself is useless...), but I do not remember where I found the corresponding parameters.
Personnally, I define all my "offline" maps in the onlinemapsources.xml file, and it works fine.
Here is the code relative to this (useless....) map from my wms_services.xml file :
<wms>
   <name>CTR Lombardia (IT)</name>
   <uid>1129</uid><!--unique identifier in your database cache; >1000 -->
   <desc>Lombardia Carta Tecnica Regionale 1:10.000</desc>
   <url><![CDATA[http://www.cartografia.servizirl.it/arcgis2/services/BaseMap/CTR_DBT/MapServer/WMSServer?styles=&]]></url>
   <minzoomlevel>6</minzoomlevel><!-- 0 to 20 -->
   <maxzoomlevel>20</maxzoomlevel><!-- 0 to 20 -->
   <version>1.1.1</version><!-- do not change -->
   <layers>0</layers>
   <coordinatesystem>EPSG:4326</coordinatesystem><!-- do not change -->
   <format>image/png</format>
   <cache>1</cache><!-- not in use -->
</wms>


Actually,I'm not "clear" with what are exactly WMS, WMTS and other Offline Maps. I even asked a question a little more than 1 year ago that never got any answer.
Here : https://oruxmaps.org/forum/index.php?topic=28999.msg38851#msg38851

BTW : I found another answer from Jose explaining it is not possible to export WMS parameters with current version of OruxMaps. Here:
https://oruxmaps.org/forum/index.php?topic=32854.0

ventoux

#8
Thanks for yours data.


I try to create a wms map from IGN France.
I have to use a specific "user-agent" to validate the access.

So, my wms_services.xml looks like that :

<?xml version="1.0" encoding="UTF-8"?>
<wms_services>
        <wms>
        <name>Scan25 </name>
        <uid>2238</uid><!--unique identifier in your database cache; >1000 -->
        <desc>Carte scan 25 IGN</desc>
        <url>http://wxs.ign.fr/my_key/geoportail/r/wms?</url>
        <minzoomlevel>7</minzoomlevel><!-- 0 to 20 -->
        <maxzoomlevel>18</maxzoomlevel><!-- 0 to 20 -->
        <version>1.1.1</version><!-- do not change -->
        <layers>SCAN25TOUR_PYR-JPEG_WLD_WM</layers>
        <coordinatesystem>EPSG:4326</coordinatesystem><!-- do not change -->
        <format>image/jpeg</format>
        <cache>1</cache><!-- not in use -->
        <tilesize>256</tilesize><!-- 256, 512, 768, 1024 -->
        <aditionalparameters>&amp;STYLE=</aditionalparameters>
        <httpparam name="User-Agent">my_useragent</httpparam>           
       
    </wms>
</wms_services>


And it displays nothing   :P

I can't test with the wizard because it does not allow to add the user-agent



LaurentG

Personnally, for french IGN, I do not have a WMS, but a simple "online" that works fine.

Here the content of onlinemapsources.xml

<onlinemapsource uid="2000">
<name>France Cartes IGN (FR)</name>
<url><![CDATA[http://wxs.ign.fr/MY_KEY/geoportail/wmts?Layer=GEOGRAPHICALGRIDSYSTEMS.MAPS&Style=normal&TileMatrixSet=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/jpeg&TileMatrix={$z}&TileCol={$x}&TileRow={$y}]]></url>
<minzoom>1</minzoom>
<maxzoom>18</maxzoom>
<projection>MERCATORESFERICA</projection>
<servers></servers>
<httpparam name="User-Agent">Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/70.0.3538.102 Safari/537.36</httpparam>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>


I also have a WMTS, that also works.
Its URL is https://wxs.ign.fr/pratique/geoportail/wmts?
It propose two layers : "Cartes IGN" and "Photographies aériennes".
Both work fine.

Why do you absolutely want a WMS ?

ventoux

#10
Quote from: LaurentG on September 04, 2020, 08:52:55 PM
Personnally, for french IGN, I do not have a WMS, but a simple "online" that works fine.
...
It propose two layers : "Cartes IGN" and "Photographies aériennes".
Both work fine.
I also have these two maps and they work fine.

Quote from: LaurentG on September 04, 2020, 08:52:55 PM
Why do you absolutely want a WMS ?
Yes, I am looking to have WMS for a small detail  :)
In the largest zoom levels, we keep the layer with the contour lines, while with the WMTS we go over a base map without the contour lines, closer to the cadastre.

But I am making progress. I found the good query if i paste it directly as a url in a web browser.

Edit : Now I can create a wms map offline for Oruxmaps with Mobac. It's already a good workaround.


ventoux

I tested with Oruxmaps 7.4.22, and then with beta 8.
The same file wms_services.xml which does not display anything in version 7, works perfectly on Oruxmaps beta 8  8)

The fact of creating a wms card with the wizard does not create a wms_services.xml file, but you can export the parameters of the map in the directory of your choice, as shown by afgb1977.


jespa

#12
Just to clarify...

In version Oruxmaps version 10.5 GP the WMS, WMTS and composite maps are stored in a internal database that is imported from files
oruxmaps/mapfiles/.wms_data, oruxmaps/mapfiles/.wmts_data and oruxmaps/mapfiles/.mms_data

When you export the WMS, WMTS data (using the  "💾 Save Maps" option in the menu of maps screen), oruxmaps will ask you for one directory to save the files. You can use oruxmaps/mapfiles if you want, but this does not mean making the maps permanent. You can copy these files in your computer or sdcard and use later to restore the data using the "Restore Maps" option in the same maps screen menu.

The app will save three files: wms_data , wmts_data and mms_data file format is this:

.wms_data:
#42
_id||name||descr||url||maxz||minz||addons||format||srs||cache||down||layers||version||maxtiles||minx||miny||maxx||maxy||tilesize||maxthread
16046||PNOA 2021||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||3||&styles=||image/png||EPSG:4326||1||1||PNOA2021||||-1||-19||27||5||44||256||4
16047||PNOA 2018||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||3||&styles=||image/png||EPSG:4326||1||1||PNOA2018||||-1||-19||27||5||44||256||4
16049||PNOA 2012||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||3||&styles=||image/png||EPSG:4326||1||1||PNOA2012||||-1||-19||27||5||44||256||4
16050||PNOA 2009 ||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||4||&styles=||image/png||EPSG:4326||1||1||PNOA2009||||-1||-19||27||5||44||256||4
16051||PNOA 2006||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||3||&styles=||image/png||EPSG:4326||1||1||PNOA2006||||-1||-19||27||5||44||256||4
16053||SIGPAC 1997-2003||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||3||&styles=||image/png||EPSG:4326||1||1||SIGPAC||||-1||-19||27||5||44||256||4
16054||AMSB 1956-57||||https://www.ign.es/wms/pnoa-historico?SERVICE=WMS&||19||3||&styles=||image/png||EPSG:4326||1||1||AMS_1956-1957||||-1||-19||27||5||44||256||4

.wmts_data:
#42
_id||name||user||pass||heads||url||cache||down||tsize||maxtiles||minx||miny||maxx||maxy||layer||layerid||layersetid||urltemp||format||style||srs||zids||scales||maxys||minxs||xtiles||ytiles||maxthreads
1||LIDAR ||||||User-Agent=OruxMaps v.10.5.0 GP||https://wmts-mapa-lidar.idee.es/lidar?||1||1||256||||-40||10||26||61||Modelo Digital de Superficies LiDAR||EL.GridCoverageDSM||EPSG:4326||||image/png||default||EPSG:32662||EPSG:4326:0;EPSG:4326:1;EPSG:4326:2;EPSG:4326:3;EPSG:4326:4;EPSG:4326:5;EPSG:4326:6;EPSG:4326:7;EPSG:4326:8;EPSG:4326:9;EPSG:4326:10;EPSG:4326:11;EPSG:4326:12;EPSG:4326:13;EPSG:4326:14;EPSG:4326:15;EPSG:4326:16;EPSG:4326:17;EPSG:4326:18;EPSG:4326:19;||2.795411320143589E8;1.3977056600717944E8;6.988528300358972E7;3.494264150179486E7;1.747132075089743E7;8735660.375448715;4367830.1877243575;2183915.0938621787;1091957.5469310894;545978.7734655447;272989.38673277234;136494.69336638617;68247.34668319309;34123.67334159654;17061.83667079827;8530.918335399136;4265.459167699568;2132.729583849784;1066.364791924892;533.182395962446;||1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;1.0018754171394622E7;||-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;-2.0037508342789244E7;||2;4;8;16;32;64;128;256;512;1024;2048;4096;8192;16384;32768;65536;131072;262144;524288;1048576;||1;2;4;8;16;32;64;128;256;512;1024;2048;4096;8192;16384;32768;65536;131072;262144;524288;||4

.mms_data:
#42
_id||maps||names||trasp||off||mult||zooms||type
1||4,104||OpenSeaMap & Base map||1.,1.||0||0,0||||

As you see, this is not XML but a direct dump of sqlite database. First line is a header, and next lines contains values for the database.

First number in each line is an identifier (you don't want two of these numbers repeated)

If you are brave enough, you can edit those files using a text editor and import then again, but you run the risk of breaking the oruxmaps internal database.