This object is in archive! 

Swedish Lantmäteriet opens free API for their data!

Carl Berner shared this idea 9 years ago
Completed

Swedish Lantmäteriet are opening some of their data with API and for free download.

One of the databades is Fjällkartan - maps of the Swedish mountains (Fjäll).

It would be great!! if you could integrate theses map sources!

Informaton their webpage: http://www.lantmateriet.se/sv/Nyheter-pa-Lantmateriet/pressmeddelande-lantmateriet-slapper-smaskalig-kartinformation-fri/

Best Answer
photo

Hello Kristoffer, guyes,

in the latest Locus version 3.17.x is possible to add new online Lantmäteriet topo map. Wait for update on 3.17.0 (versioin available in next hours) and then add map via Menu > Locus store > Sweden > Lantmäteriet topo map > ADD button.

Enjoy it

Petr

Replies (24)

photo
1

Hello Carl,

these maps looks great. However I hope that I've translated correctly mentioned post. Does it mean that map will be available from January 1th 2016?

Thank you

photo
2

Hello Petr,


Yes that is right.


The Översiktskarta ( overview map) will be made available the 1:st of July 2015.

The others on the 1:st of january 2016.


The geodata will be made available as downloadable vector maps and through an open API under the creative commons license.


Best regards!

/Carl

photo
1

The thread was already started, thanks Carl and +1 from me.

Lantmäteriets maps is the best we have in sweden.

This is the one that dont need a license from first of July this year: http://www.lantmateriet.se/en/Maps-and-geographic-information/Maps/Oversiktskartan/

This is one of the map that will be avalible from 1 of januari 2016:

https://www.lantmateriet.se/en/Maps-and-geographic-information/Maps/Fjallkartan/

Here is something of the service DGNSS, its actually over my head but its some kind of position service.

https://swepos.lantmateriet.se/tjanster/realtid/natverksdgnss/natverksdgnss.aspx

Best regards jocke

photo
1

OKi guys ... please come back later and remind the topic :)

photo
1

Here comes the reminder Petr. :)


I think this is the place to start: https://www.lantmateriet.se/en/Maps-and-geographic-information/Maps/oversiktskartan1/


best regards Jocke

photo
1

I was going to post this link: https://www.lantmateriet.se/en/Maps-and-geographic-information/Maps/oppna-data/hamta-oppna-geodata/#faq:gsd-oversiktskartan-vektor


But I think you'd quickly find it from Joakim's link. :)

photo
1

Uff thanks for reminder :) Well I have to say that I didn't read old blogs carefully (when you started this topic). I thought that http://www.lantmateriet.se/ would offer their maps via some web map service. But they offer raw data :) I'm worry that we don't have enough time, experiences to use raw data for creation own maps. I hope that you don't want to implement raw Lantmateriet data into Locus but only the "graphic" maps.


So I'll try to contact the Lantmateriet office if they have any public map server that we would add into Locus.

Thanks for udnerstanding

photo
1

I have tried the wmts api service in Qgis with my embedded token and it works perfectly. This is the syntax in Qgis but it doesn't work in Locus:

https://api.lantmateriet.se/open/topowebb-ccby/v1/wmts/token/<api-key>/?

request=GetCapabilities&version=1.0.0&service=wmts


The api-key was received after free account registration on this link.

https://opendata.lantmateriet.se/#register

photo
1

For your information - Locus do not support WMTS system, just WMS.

photo
1

This made me think that there should be a traditional web map service too, but it leaves specifics of the API open of course..."The map data is made accessible both as downloadable files in vector format and in the form of an open geodatatjänst in the form of an open API (a programmable machine interface) to which a user can connect their own user interface."


https://www.lantmateriet.se/en/Pressrum/Pressmeddelande/lantmateriet-slapper-smaskalig-kartinformation-fri/

photo
1

("geodatatjänst" is Swedish for GIS and apparently too difficult for their autotranslation service)

photo
1

And here is information on topographic map available through their API with CC BY licensing(!), though I'm not sure if this is actually new:

http://www.lantmateriet.se/en/Maps-and-geographic-information/Geodata-services/Visningstjanster/topografisk-webbkarta-visning-brcc-by1/

photo
1

Really sorry for the message spam, but yes, this is new, you used to have to pay for licensing this map before.

The maps that are now getting CC-BY licensing for downloadable data are part of the "Topografisk webbkarta Visning" product, and therefore that gets a CC-BY license, and in 6 months even more content (highly demanded, like "Fjällkartan") will be added.


Details are here: http://www.lantmateriet.se/globalassets/kartor-och-geografisk-information/nyhetsbrev/nyhetsbrev_avgifter_och_produkter_infor_2016.pdf

photo
2

Thanks to the work of Bengt Noläng the Fjällkartan map is now available as 10x10 m resolution 10x10 km tiles in KMZ format, they work fine with Locus when used as data items. Files are available from here (scroll down) http://bengt.nolang.se/kartor/fjallkartan/. I would prefer a method to use the data as a personal map in Locus but until then this is a good solution for me.

photo
1

Just a picture to show a KML tile.

(Also I note that with an increasing number of KMZ files in mapitems folder, Locus becomes unresponsive when entering Data->Items tab, it just stays on "Loading..." forever. Not sure if there is some solution to this.)

photo
4

Hello Kristoffer, guyes,

in the latest Locus version 3.17.x is possible to add new online Lantmäteriet topo map. Wait for update on 3.17.0 (versioin available in next hours) and then add map via Menu > Locus store > Sweden > Lantmäteriet topo map > ADD button.

Enjoy it

Petr

photo
1

Sound great. ☺

photo
1

Thanks, very happy to hear this!

Just an added note to inform that both Lantmäteriverket's maps Fjällkartan and Terrängkartan are since recently also available as proper SQlite slippy tile format offline maps for Locus, provided by Bengt Noläng with downloads at http://bengt.nolang.se/kartor/fjallkartan/ and http://www.bengt.nolang.se/kartor/terrangkartan/ .

photo
1

Is someone working on a swedish translation?

photo
1

69% transalated: https://crowdin.com/project/menion


All translations are done by volunteers, so you may improve it as you want ;).

photo
1

Is it possible to use that now or must the translation be 100% before it can be used? In language setting you can select some but not swedish. some of the have not 100%


If I like to help with the translation do I just log in?


regards Magnus

photo
1

Good evening Magnus,

I'm usually adding translations into Locus when they are at 100%. Some of them of course stops to be actual ( missed less or more of translations ) over time as people stops to update them. So As I see for example Estonian has just 51% now, but some time ago it was also 100% ...


And yes, just login and feel free to update. Thanks!

photo
1

Hi,

I just tested this and must say that you have made a great job. Thanks for listening to us in the community!

Best regards,

Mvh Göran

Den 16 maj 2016 15:10 skrev "Locus Map" <locus.map@asamm.com>:

photo
2

Just out of curiosity, how did you go about getting the map into the app? So far I have only been able to add online maps in Spherical/Web/Global Mercator projection (EPSG 3857/900913) through providers.xml, mostly using Mapproxy to reproject from EPSG 3006. This one is in EPSG 3006, which I didn't think Locus supported, and seems to be implemented through a small .lb file under /Locus/data/config as far as I can see. Good job anyway!

photo
1

Put the files in locus\maps

photo
1

Well no, off-line maps go into Locus/maps but this is an online map which downloads tiles from a tile server.


One small glitch with this map is that the zoom is off by one step compared to the other maps on my phone, so when I select e.g. zoom level 11 in Locus this map is actually displayed in zoom level 10. It's a minor flaw, but if I knew where the configuration files for the map were located I might be able to correct it. The small .lb file (wmts_maps.lb) basically just contains a URL to the server, so there must be other files involved as well.

photo
1

Just to clarify: I am specifically referring to Lantmäteriets Topo WMTS map which was added in Locus 3.17.0.

photo
1

Ah, sorry. I thought you were talking about Bengts offline version. As for the online version I just followed the instructions from Petr, "add map via Menu > Locus store > Sweden > Lantmäteriet topo map > ADD button". Works great for me.

photo
2

Maps are really one step wrong? Have to check it, thanks!


*.lb files just contains unlock key for a maps. Whole configuration for maps is hardcoded in Locus.


And how they are added ... well :), Locus now (for a few months already) contains full WMTS support, but this feature is not yet public and for now I'm not sure about next steps, We will see. Anyway for now, I should be able to add WMTS based online maps directly into Locus.

photo
1

@Menion: At least the zoom level is off on my phone for this map.

The more support Locus has for non-standard projections the better, I think. And it's great that you have enabled full WMTS support. :-)


@Martin: No problem, I was unclear. I didn't see all the posts in this thread at first, they were hidden, so I thought this WMTS map was the only topic.

photo
1

Zoom level off confirmed here too, clearly visible if you overlay with another topo or satellite map, especially if you do panning you see that they pan at different speeds.

photo
1

Also, there is some glitchiness with the shading / tiles in certain areas (these screenshots from Kebnekaise region, approximately 67°54′00″N 18°31′00″E).

2b2128cfdf4f0019ab2e0650971c0b52476bad4906eadada56faa8aad923b055a5d5803cc7ea9270bbe0e6ebae485d067d0194d39176d9b8a702a3faafee126957e7fb305b5a07ca51ba1b3c347edbc3

photo
1

I still don't know how to take screenshots on my phone but my display is similar to yours around Kebnekaise. At first it looks like the tiles don't fit together although they actually do. In your first screenshot it might just be a case where all the tiles for the zoom level haven't been downloaded yet, but on your other screenshots, and on my phone, it seems more like a problem with the hillshade layer. It could also be that adjacent tiles have been downloaded at different zoom levels, then shrunk or expanded to fit correctly on the map, but I am not sure...

photo
2

Hi guys,


thanks for a support here. I'm testing it and I realized that problem is not in incorrect zoom. Problem is that Locus allows to place overlay over this map, that has completely different map projection compare to MapQuest or other common online maps.


If map is placed incorrect - simply draw some navigation line computed by online service - does it match to map? What about your own location on a map or location of points? Does it match? Then everything is OK!


Till now, all online maps used same map system, so it was possible to use them for overlays without limits. I have to improve this.


Anyway shading is a problem, confirmed on own device. How to fix it - no idea for now and I

m really surprised that something like this happen. Have to check it, thanks for now!

photo
1

Hi again,


There is actually nothing wrong with this map, apart from the zoom being one step off. My own location and all POIs are displayed correctly. The problem in the screenshots above are due to Locus' inbuilt hillshading being activated. If you disable it (Settings > Map - advanced > Map shading) the map looks good. In the first screenshot above the inbuilt shading must have been lagging a bit as well.


Another thing: It's not possible to zoom this map below level 14 = level 13 in reality. This is by design perhaps, to avoid excessive tile downloads? I understand that the zoom levels of this WMTS service are different than the OSM/Google zoom levels, but I know that the WMTS server in question offers deeper zoom levels.

photo
1

I confirm that it looks all fine with shading turned off. Probably related to the different map projection? Not a very big issue for me, though hill shading is a nice thing when it works (which it always did before).


I can also confirm that what Menion says seems right to me, locations map to the right places on the map.

photo
1

Please forget what I said about the WMTS server offering deeper zoom levels. Apparently you cannot zoom in any deeper using this open URL ("https://api.lantmateriet.se/open/topowebb-ccby/v1/wmts/token/<private token>/"). I just checked it using OpenLayers and my own token in a web browser.

Lantmäteriet offers this WMTS map with deeper zoom levels e.g. on https://kso.etjanster.lantmateriet.se, but the URL used on that page is probably not allowed in Locus.

photo
1

Good day guys,

thanks for reports and support.


I've finally fixed shading so it should work correctly in next version. Map overlays will be still enabled for this map, but they won't work, sorry. I have to improve mechanism that test if map may be used for overlays or not. For now it's really stupid, so I have to this bug be there. Just be aware of it.


@Magnus Eriksson2: I also think that it's not possible in Locus. Mainly because Locus now really use all parameters directly from WMTS configuration! So other then visible levels are not available (except case, that there is an issue in Locus, but I've checked it and it seems to be correct).

photo
1

Hi,

I understand that this map service differs a lot from standard tile servers, being based on another projection and a smaller coverage. Of course it would be good if the zoom levels were in line with other maps, but if it is difficult to achieve it is not that serious.


In the release notes for version 3.17.1 it says that the problem with the hill shading is solved. I installed version 3.17.1 and deleted the cached tiles for Lantmäteriets Topo map, but on my phone the area we talked about above (Kebnekaise) still looks the same, jagged and strange. Whereas other areas of the mountains look good. Is that because Locus caches the hill shade tiles? If so, how can I empty the hill shade cache?

photo
1

Hi Magnus,

menion is on holiday in next three days. I'm not sure what was cause of your issue. However to delete the cache for hill-shading overlay: Menu > Maps > Online > Overlays > H&B Hillshade > tap on layer submenu (three dots) and choose "Clear Cache"

Regards

Petr

photo
2

Hi guys,

ehm sorry Petr, no :). Hillshaded tiles are cached in Locus private directory. Cache may contain just a limited number of tiles, so play with it a while in different areas and old cached values will be removed.


Anyway if you wanna do it manually, just delete /sdcard/Android/data/menion.android.locus(.pro)/cache/map/shader/ directory.

photo
1

Thanks! I would never have found that folder on my own. I don't know your definition of "a limited number" but it contained 40 MB of old hillshade tiles and when they were gone everything looked just fine around Kebnekaise. All that's left now is to visit the place in real life. :-)

Regards,

Magnus

photo
1

Would it be possible to allow lower zoom levels than 11?

I frequently find that I would like to use levels 6-10 for orientation when planning trips.

Also, if it is possible to use these maps as overlay or use them with other maps for overlay it would be highly useful.

photo
1

Sorry, forget all that, I stumbled upon the installation of offline Lantmäteriet maps I have and confused things. :)

photo
1

Good day Kristoffer,

for you works zoom only in range 11 - 14? Really interesting because I'm testing it and it should work (and works for me) in range 5 - 14. When you at zoom 11 tap on "zoom out", you get 11 / 50%?


And overlay is currently not possible. This map has a different projection and Locus is currently unable to handle them correctly (re-projecting on the fly).

Replies have been locked on this page!