Connecting Mapping APIs (Ordnance Survey UK)

161 views
Skip to first unread message

Owen James

unread,
Sep 24, 2020, 6:33:52 AM9/24/20
to mapstore-users
Hello,

Our national mapping agency, Ordnance Survey, have recently introduced APIs for their data.  I have successfully connected a catalog to the APIs and MapStore recognises the layers available, however the WMTS connection to the data fails to load the data on the map due to lack of authorisation (status 401).  The URL includes an authorisation key, would this issue be related to this?

Regards
Owen

Simone Giannecchini

unread,
Sep 25, 2020, 3:15:47 PM9/25/20
to mapstor...@googlegroups.com
Hi Owen,
can you provide us with an endpoint to do some tests?

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.


--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/5cd76779-b903-41b9-becd-9a15e7866cb3n%40googlegroups.com.

Owen James

unread,
Sep 30, 2020, 11:44:06 AM9/30/20
to mapstore-users
Hi Simone,

Thank you for your reply.

The endpoint URL used to connect to the APIs is https://api.os.uk/maps/raster/v1/wmts?key=XXXXXXXXXXX

The APIs are for free data offered by Ordnance Survey and you can sign up for access to the APIs at:

https://osdatahub.os.uk/

You then obtain your own key for the endpoint URL.

I hope this is useful for you.

Regards

Owen

Paul Shapley

unread,
Jan 13, 2021, 9:49:47 AM1/13/21
to mapstore-users
Hi,

Also having the above issue. Did you resolve the authorisation key issue?

Owen James

unread,
Feb 4, 2021, 6:12:22 AM2/4/21
to mapstore-users
Hi there, I am afraid this issue is still outstanding, though I haven't chased.  I believe access to Bing Maps API is also an issue in MapStore and coincidentally this uses an authorisation key, so I am not sure if this may be related

Paul Shapley

unread,
Feb 4, 2021, 6:54:38 AM2/4/21
to mapstor...@googlegroups.com
Hi Owen,

I managed to get this working with O'S mapping by using the {z} {x} {y} API url's instead of the WMS url. It should then work. If not get back to me.

Paul Shapley

You received this message because you are subscribed to a topic in the Google Groups "mapstore-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapstore-users/vWyuSZdCZXg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/a4b220cf-da0c-4557-a5fb-6838619a7a47n%40googlegroups.com.


--
Paul J. Shapley MSc CGeog (GIS) FRGS

Owen James

unread,
Feb 4, 2021, 9:58:27 AM2/4/21
to mapstore-users
Thanks Paul, I'll give that a go!

Owen James

unread,
Feb 28, 2021, 8:38:15 AM2/28/21
to mapstore-users
Hi Paul, would appreciate some pointers, I have connected using the TMS connection type and, as with WMTS, it finds the layer.  Loading the layer is initially very slow but eventually a blue rectangle appears, so there is an issue!  I have also tried to connect using QGIS as well, and I am getting the same result, just a blue rectangle.  Am I missing something??

Paul Shapley

unread,
Feb 28, 2021, 11:08:31 AM2/28/21
to mapstor...@googlegroups.com
Hi Owen,
One thing that came to me was the projection, It only likes EPSG:3857 with the O'S Maps API. I didn't have any other issue with {z} {y} {x} The only issue left for me is the printing module. Still won't work when using the 'standard' build.
Update: The maps are updating slower today i've noticed (just made a new build). https://api.os.uk/maps/raster/v1/zxy/Road_3857/{z}/{x}/{y}.png?key=################# (use TMS). I've set up each O'S map as a separate layer. Hope this helps. Let me know if not.

osmapsapi.png

Owen James

unread,
Mar 3, 2021, 12:20:31 PM3/3/21
to mapstore-users
Thanks Paul, got it working now, also able to load the ZXY API into QGIS too using 3857, so it looks like the APIs are a bit hit-and-miss.  Unfortunately with MapStore I can't say it is production-ready as it takes extremely long to initially load the maps, though performance is acceptable once loaded.  I've also managed to play with the OS code examples and these work very nicely, so the initial loading of the map seems to be MapStore related.  I will keep exploring the options.  What are your intensions with MapStore? I aim to deploy it as our web GIS in my authority

Paul Shapley

unread,
Mar 3, 2021, 3:00:38 PM3/3/21
to mapstor...@googlegroups.com
Hi Owen,

Glad you've got the O'S Maps working. I think this would work well for non-gis users (non-QGIS) users who just want to share layers with colleagues outside the authority. My intention is to simply connect up a geoserver wms. It has already been adopted to serve Welsh Gov data out to other Authorities. Will be using this in conjunction with other open source tools such as 'gisquick' (qgis-server) and QField.

Simone Giannecchini

unread,
Mar 4, 2021, 5:13:45 AM3/4/21
to mapstor...@googlegroups.com
Dear Paul,
having this many layers in a single map with 256x256 tiling coming from a single domain will make the map very slow.
I'd suggest configuring it as a background (TMS should be supported as well) because that is what these maps are made for anyway, I believe.

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Paul Shapley

unread,
Mar 4, 2021, 11:19:40 AM3/4/21
to mapstor...@googlegroups.com
Thanks Simone,
Yes, it was for testing the performance of each map not running them all in a single session.

Owen James

unread,
Mar 5, 2021, 10:52:46 AM3/5/21
to mapstore-users
Hi Simone,

Yes, I am using the connection as background mapping.  I have configured a context that has OS maps as a background mapping option, but initially OSM loads.  Even if the OS maps don't initially load, but are configured as a background mapping option, the map takes a long time to open (about 1 minute).  It seems that there is a delay in making the connection to the OS maps even if they don't load at first, but once the map is open and the OS maps chosen as background mapping, they load quickly and performance is good.

Would you have any thoughts why the map takes so long to open?

Many thanks

Owen

Simone Giannecchini

unread,
Mar 5, 2021, 12:55:02 PM3/5/21
to mapstor...@googlegroups.com
Hi Owen,
I would need to have a look at one map to see what is going on.
Can you share it somehow?

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Owen James

unread,
Mar 10, 2021, 10:34:17 AM3/10/21
to mapstore-users
Hi Simone,
I am currently testing locally, but you may want to test the APIs yourselves, Ordnance Survey have Open Data APIs that you can register for for free:
https://osdatahub.os.uk/
I have tested with the free APIs as well, getting the same issues, it will be interesting to see how you get on too.
The API I am testing is:
Regards
Owen
Message has been deleted

Owen James

unread,
Aug 25, 2022, 3:38:10 PM8/25/22
to mapstore-users
It's been a while, but I have found a good solution for using the APIs.
I was able to connect using EPSG:3857 and the ZXY API, loading into MapStore configured with EPSG:27700.  Initially I thought it worked perfectly, automatically transforming to EPSG:27700, but then I overlayed some layers and noticed a 2m offset.  Doing some research, there seemed to be an inherent inaccuracy with EPSG:3857 of 2m, not sure if that is related!
Then I realised WMTS APIs can be fed through GeoServer, so I tried this and the EPSG:27700 APIs feed perfectly through into MapStore - problem solved!
Reply all
Reply to author
Forward
0 new messages