This object is in archive! 

Support for Swedish Lantmäteriet's "Min Karta" - WMS

Kristoffer Björkman shared this question 4 years ago
Answered

Lantmäteriet is a part of the Swedish government that does a lot of map related work. Locus has experience with them since before and supports accessing some of their maps.

Lantmäteriet has a new(?) free online map service kalled "Min Karta" (= "My Map") with excellent quality maps for many purposes. It can e accessed with a web browser at https://minkarta.lantmateriet.se/.

It seems to be WMS based so I added it to Locus as a WMS server with the URL https://minkarta.lantmateriet.se/map/topowebb/ and it was detected as version 1.1.1 which seems right.

It supports a main layer(?) "Visningstjänst Topografiska Webbkartan" and two sublayers, "Topografiska Webbkartan" and "Topografiska Webbkartan Nedtonad". (for non-Swedish speakers: "Visningstjänst" = "Viewing Service", "Topografiska" = "Topographic", "Webbkartan" = "Web Map", "Nedtonad" = "Toned Down")


You can choose between a large number of CRS values: 3006-3018, 3021, 3034-3035, 3044-3047, 3857, 4258, 4326, 4619, 25832-25835, 32632-32635. (But shouldn't it be SRS with WMS v1.1.1?)

My problem is that no matter which layer(s) I select I don't see any visible result in Locus. I've tried with different CRS values, but I'm not sure what would be more right. The web service on Min Karta seems to use SRS=EPSG:3006 (eg: https://minkarta.lantmateriet.se/map/topowebb/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=false&LAYERS=topowebbkartan&TILED=true&STYLES=&WIDTH=256&HEIGHT=256&SRS=EPSG%3A3006&BBOX=316928%2C6399136%2C317056%2C6399264) but that doesn't work any better for me. (EPSG:3006 is a format much used in Sweden also referred to as SWEREF99 TM.)


Can I do anything better? Is it a temporary problem in Locus? Is it something that might work in the future?

Replies (2)

photo
1

Hi,

thank you for the question. I'd only mention that Locus already supports the Lantmäteriet topo layer: Please open Menu - Maps - Online - PLUS button - add online map - navigate to Sweden - open Lantmäteriet topo map and tap on "Add" button. After that select map in the list of the online maps.

Anyway, I quickly test the mentioned WMS and it seems that there is some issue. We'll check it. BTW: is the WMS service public or is login required?

Thanks, Petr

photo
1

Thanks for your response!

I actually use the standard topo map of Lantmäteriet a lot since it first was introduced in Locus. But this would be a very nice addition.

The map is for public use AFAIK, with no login, but must say I have not reviewed the license text.

You can use it by just going to https://minkarta.lantmateriet.se/ .

edit: Ah, you mean the WMS service specifically of course. I can't say for certain, I have never met a WMS service that requires login, though I'm sure there are many, but I would expect Locus to throw some kind of informative error in such a case.

photo
1

Does not function by Gpx Viewer either.

a6ad29db4e3130c28524099da5a1dfec


By the way: the lantmateriet.se wms (free) services do expect (free!) login by a token in the wms link.

Receive your personal token by registering.


https://www.lantmateriet.se/sv/Kartor-och-geografisk-information/oppna-data/

photo
1

Thanks 0709 for your sleuthing!

I just want to add that the page with information about the use of Lantmäteriet's map data is available in English also: https://www.lantmateriet.se/en/maps-and-geographic-information/open-geodata/

photo
1

A bit strange though is that when I continue into the details about their OpenData services I can't find any information about the WMS based "Min Karta" map. Only about the WMTS service: https://opendata.lantmateriet.se/#apis?api=OpenDataWMTS&version=v1

photo
1

This FAQ might be useful and has a lot WMS-implementation-specific information: https://www.lantmateriet.se/en/maps-and-geographic-information/geodataprodukter/fragor-och-svar/visningstjanster2/

photo
1

I messed around a bit with the OpenData services. Using the token provided there you can get access to four main services at api.lantmateriet.se:

1. "Stompunkt" - WMS server of measurement points information. Works with Locus.

2. "Tyngdkraft" - WMS server of gravity information. Works with Locus.

3. "Historiska kartfoton" - WMS server with two very interesting layers of historical aerial photos (1960 and 1975), nice find that I wasn't expecting! Works fine with Locus.

4. WMTS(!) server of topographical web map tiles, which Locus still does not really support AFAIK.

So none of this does really seem related to the WMS topographical map at minkarta.lantmateriet.se, which makes me think the registered-user-token at OpenData might be a red herring for the original question.

photo
1

Hi,

the initial issue is really caused due to missing login information. Please login and provide the token in the request URL. WMTS Topoweb layer is already supported in Locus and you can add it into the list of online maps as I described in my previous post.

Thanks, Petr

photo
1

Unfortunately the WMTS topoweb layer that I get through the officially supported way in Locus does not give anything close to the quality of Lantmäteriet's Min Karta information. That is the main reason why I am trying to add the WMS service. A secondary reason would be that it also supports the property borders layer.

Since the tile examples above seem to work without any login, and since Locus does not give the "unauthorized" response I get for similar services when trying without proper credentials I don't really see why it should be a login problem, but maybe it is anyway?

I've tried using my Lantmäteriet API credentials for login/password, it does not help, I've tried adding token=<my token> parameter to the URL and it does not help either, but maybe I'm doing it wrong.

photo
1

Dear Kristoffer,

could I ask you for help? Would you please contact the administrators of this WMS service and ask them for more info, please?

The request below works fine:

https://minkarta.lantmateriet.se/map/topowebb/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=false&LAYERS=topowebbkartan&TILED=true&STYLES=&WIDTH=256&HEIGHT=256&SRS=EPSG%3A3006&BBOX=317824%2C6396832%2C317952%2C6396960


But the same layer and area requires login

http://maps.lantmateriet.se/topowebb/wms/v1?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=false&LAYERS=topowebbkartan&TILED=true&STYLES=&WIDTH=256&HEIGHT=256&SRS=EPSG%3A3006&BBOX=317824%2C6396832%2C317952%2C6396960


So the problem is in server that process the request. Unfortunatelly the "GetCapabilities" request on https://minkarta.lantmateriet.se/map/topowebb/ defines that client should use the URL http://maps.lantmateriet.se/topowebb/wms/v1. But the 'http://maps.lantmateriet.se' requires the login.

Please ask them why login is required on 'http://maps.lantmateriet.se'


Thank you

Petr

photo
1

Thanks for your analysis Petr, I'll try to get an answer!

photo
1

Answer: That service is not for free access with other clients. Use other services at https://www.lantmateriet.se/en/maps-and-geographic-information/open-geodata/ . Case closed for "Min Karta". Though I also asked if they might have any open WMS access to the topographical map, since I only can find WMTS access to it on the linked page.

photo
1

Thank you for your help with this topic and explanation of this issue.

Thanks, Petr

photo
1

A question regarding the same map (Lantmateriet Topo). Why is the download limit set to 1000. This is a free map. Sees that the limit is higher or even unlimited for other maps. A higher limit would be desirable.

photo
1

The limit is set due to Lantmateriet restrictions. Locus app (all users together) is limited to 6000 requests per minute. To avoid high traffic is the daily limit set to 1000 tiles.

Thanks for understadning

Petr

photo
1

6000 request per minute is about 8,5 miljon request per dag. I think it is a litle to limited. I think it could be set to at least 10000 per day?

photo
1

well during downloading can user download about 200 - 300 tiles per minute. So only 20 simultaneous downloads can drain the limit. Please consider the maximal zoom-level you need to download and we can also think about increasing the limit to 2000 per day

photo
1

Maybe we then could throttle the download rate per minute rather than have a very low per day limit? 

60 tiles/minute would mean 100 simultaneous downloads from the same source without exceeding the restrictions. It would take 5x longer time, but users could download a more reasonable amount of tiles per day.

I suspect more than 100 simultaneous downloads from Lantmäteriet would be very rare for Locus users, but maybe I'm all wrong. Anyway, my point is that I'd much rather be able to download 15 000 tiles/day (≈10/minute for the whole day, = more than 5000 simultaneous downloaders without exceeding restrictions) at trickle speed than 1000 tiles per day at max speed.

On Mon, 28 Sep 2020, 20:00 Locus Map, <locus.map@asamm.com> wrote:

photo
1

Sounds great.

Replies have been locked on this page!