Trying to add a custom layer WMS

kxmlab's Avatar

kxmlab

12 Aug, 2019 07:57 PM

Hi there,

I'd like to display maps from the French Government online tool "Geoportail" into SARTopo.

I subscribed to their "Geoservice" WMS resource and was given the following URL:

https://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?

and tried this one as well:

http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE...

Nothing happens when I create the layer.

Could you tell me if I'm missing something?

Thanks,
Kevin

  1. Support Staff 1 Posted by rmarcucci on 13 Aug, 2019 02:33 PM

    rmarcucci's Avatar

    Hi Kevin,

    I've forwarded this along to our developer as I'm not sure whats going on here. He's unavailable currently and will likely get back to you in a few days.

    Thank you for reaching out,
    Rom

  2. Support Staff 2 Posted by matt on 15 Aug, 2019 09:52 PM

    matt's Avatar

    Neither of those URLs are what you would enter directly into the URL template field, but the first should work if you put it in the "auto-configure URL" box and click GO, and loading the second directly in a browser should give you an XML file listing the available layers etc.

    However I can't load either of those URLs in my browser - it just waits endlessly without a response. I'd need valid URLs that will actually load without being signed into a particular website in order to provide additional help.

  3. 3 Posted by kxmlab on 19 Aug, 2019 07:10 PM

    kxmlab's Avatar

    Hi Matt,

    Thanks a lot for your quick response!

    The URLs I'm trying to use are provided on my Geoportail/IGN account.

    When I load
    http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE...
    <http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities>
    in my browser, without being logged into the website, I do see an XML File,
    which I have saved and attached to this email.

    Besides that, the website requires me to choose one "securing" method:

    - HTTP referer, the one i've been trying to use, with the URL "sartopo.com"
    - IP
    - Login/Password (using an HTTPS referer)
    - User-Agent

    I've also attached a screenshot of this page, in French however.

    Hopefully, all this will help you figure out what's wrong.

    Best,
    Kevin

  4. Support Staff 4 Posted by matt on 20 Aug, 2019 04:24 AM

    matt's Avatar

    For various technical reasons, custom tiles are actually routed through the SARTopo server rather than directly requested by your browser, which is why the referer isn't working.

    The SARTopo user-agent is currently "SARTopo//Linux", although that will be changed in the near future to at least remove the second /, and possibly drop the "Linux" OS suffix.

    You should also be able to specify the sartopo.com IP address, it changes very infrequently.

  5. 5 Posted by kxmlab on 22 Aug, 2019 01:50 PM

    kxmlab's Avatar

    Hi Matt,

    No luck with the user-agent method.

    I got it to "work" once after switching to the IP securing method and the
    following IP I found online for Sartopo: 54.67.32.1.

    I had an error message about projection compatibility, see the screenshot
    attached.

    Problem is, I have been unable to get to this point again.

    I'm sorry to insist so much to find a solution, but we'd like to use
    Sartopo for important purposes, Search and Rescue operations in French
    Guiana.

    I've tried to reach out to Geoportail, but their customer service is
    terrible. I'm still waiting for their answer.

    Would you have any lead to get this to work?

    Best,
    Kevin

  6. Support Staff 6 Posted by matt on 26 Aug, 2019 11:56 PM

    matt's Avatar

    That was a little difficult. Sorry the auto-configure tool doesn't work but it only handles common WMS configurations.

    Try the following as the URL template for a custom WMS layer:
    http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE...

    See https://sartopo.com/l/NER3

    You would have to look at http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE... to figure out which layer you want. There are 12 Layer tags n the XML file, plug the layer's name into the URL template above in place of SCAN100_PYR-JPEG_WLD_WM.

  7. 7 Posted by kxmlab on 29 Aug, 2019 06:58 PM

    kxmlab's Avatar

    Hi Matt,

    It works! Thanks a bunch!

    I've tried replacing "SCAN100_PYR-JPEG_WLD_WM" with both
    "SCAN25TOPO_PYR-JPEG_WLD_WM"
    and "SCAN1000_PYR-JPEG_WLD_WM" as follows:

    http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&SRS=EPSG:3857&BBOX={left},{bottom},{right},{top}&WIDTH={tilesize}&HEIGHT={tilesize}&LAYERS=SCAN25TOPO_PYR-JPEG_WLD_WM
    &STYLES=normal

    and

    http://wxs.ign.fr/7z6dl8qn42oreb98ru9mpbxp/geoportail/r/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&SRS=EPSG:3857&BBOX={left},{bottom},{right},{top}&WIDTH={tilesize}&HEIGHT={tilesize}&LAYERS=
    SCAN1000_PYR-JPEG_WLD_WM &STYLES=normal
    Grey screen is all I get for both URLs.

    We're thinking of getting a Desktop subscription, would these layers be
    accessible offline if we did so?

    Regards,
    Kevin

  8. Support Staff 8 Posted by matt on 30 Aug, 2019 06:50 PM

    matt's Avatar

    You wouldn't be able to download them for offline use through the CalTopo desktop app. If you downloaded them yourself as an MBTiles file, you could supply that file to CalTopo and use them offline. There are scripts out there to help you crawl a tile sever and download tiles into the MBTiles format, but it's probably an open question how long it would take with that server, or if there are usage limits in place that would prevent you from doing so.

    What coverage area would you want offline data for? Maybe give me a lat/long bounding box?

  9. 9 Posted by kxmlab on 03 Sep, 2019 03:37 PM

    kxmlab's Avatar

    Hi Matt,

    Using the "BBox Finder" website, here are the coordinates (EPSG 3857 - WGS
    84) for the coverage area we'd need, French Guiana and Suriname:

    Box -6476968.0288,173664.9283,-5717489.7157,848756.7621

    We'd use the Google, OSM and TF Outdoors layers.

    I am looking into the possibility of downloading the IGN layers directly
    from their website. It might be possible to get .ecw files for those maps.

    Is this file format usable with a desktop version of SARTopo? If it isn't,
    what formats could be compatible?

    Thanks,
    Kevin

  10. Support Staff 10 Posted by Ben Lantow on 05 Sep, 2019 10:08 PM

    Ben Lantow's Avatar

    Kevin.
    I'm going to let Matt weigh in on offline incorporation of custom layers, you should hear back from him this week. However I do know we work primarily with MBTiles though there is a free app called GDAL (https://gdal.org/) that can do a lot of conversions.

    As for offline we don't offer Google Maps, OSM or TF offline at this point due to licensing restrictions.

    Best,
    Ben

  11. Support Staff 11 Posted by matt on 05 Sep, 2019 11:02 PM

    matt's Avatar

    The Google layers aren't available for offline use.

    For any of ThunderForest's layers, that would probably be doable for a small fee. My first option would be to check with ThunderForest directly, but it's a small enough area I could script a tile downloader against it and let it run for a while. You can't script tile downloads against OpenStreetMap's servers, I'd have to do a big to research to figure out about OpenStreetMap.

    You could probably download the IGN maps directly, but the time it would take depends on how fast their tile server is. I can give you some Python scripts that would help, but it's a large enough area that you'd want a reliable fast internet connection, and would want to verify with them in advance so that you don't cause any problems for their servers or run into automatic request rate-limiting part way through.

    I'm not familiar with ECW files, but it looks like they're a raster format, so from those you would still have to create a tileset using something like gdal2tiles or maptiler. The tool those are based on (GDAL) supports ECW but it's not available out of the box (https://trac.osgeo.org/gdal/wiki/ECW).

    Turning raster data into tiles covering that large of a footprint is doable, but not nearly as simple as downloading prebuilt tiles from the IGN site. I'd try as hard as possible to see if you can get permission to download those tiles directly, before re-tiling everything from ECW files.

  12. System closed this discussion on 02 Oct, 2019 04:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac