DEV Community

Cover image for The OGC standards that power the OS Data Hub
Charley Glynn
Charley Glynn

Posted on

The OGC standards that power the OS Data Hub

The OS Data Hub makes geospatial data available in a variety of formats, including API access and file downloads. These formats include standards published by the Open Geospatial Consortium (OGC), an international consortium of more than 530 businesses, government agencies, research organizations, and universities, driven to advance geospatial information technology at all levels of data handling, processing, sharing, and analytics.

In this post we identify and describe formats and elaborate on some of the advantages of using standards to share geospatial information.

If you are registered to the OS Map & Hack hackathon and want to extend your practical knowledge about the OGC standards supported in the OS Data Hub, you are welcome to attend the technical workshop on that event: “Accessing data using OGC Standards: a quick start guide”.

Show me the APIs!
If you navigate to the OS Data Hub API dashboard, you will see a list of the APIs which you can add to your projects.

image

os-apis-dashboard

The OS Features API gives you direct access to the detailed geometries and rich attribution of individual features. It is based on the OGC Web Feature Service (WFS) standard. You can call it to access vector data - e.g. buildings, roads, rivers, hospitals, playing fields, greenspaces - basically anything which is represented as a point, a line, a polygon or a combination of any of the above.

The OS Maps API serves pre-rendered raster tiles, available in different projections. It is based on the OGC Web Map Tile Service (WMTS) standard. You can call it to access raster data - e.g. OS MasterMap, Leisure map - and it lets you integrate tiled maps into your applications.

Both, WFS and WMTS, are mature and well established OGC standards. This means they have been used for a while, and its current state is the result of an extended discussion, taking into account a lot of different use cases.

Not only APIs...
Other than programmatic access, OS also makes (open) data available for manual download in the OS OpenData Downloads section. These downloads are actually free and do not require registration.

Among other formats, OS publishes data using the OGC GeoTIFF and GeoPackage formats.

GeoTIFF is an extension of the TIFF format, which allows georeferencing information (e.g.: projections, coordinate reference systems) to be embedded within a TIFF file. It can be used to exchange georeferenced imagery.

GeoPackage is a database container, which enables storing different types of spatial and non spatial data, and can be easily extended to support other use cases. Currently is based on an SQLite database, although there are plans to abstract it from a specific database in the future.

Find out how OS are rolling out more of these formats for Premium products too.

Why should I use these formats?
By using OGC formats you can tap into a number of existing implementations which are able to understand and interact with these standards, including libraries/SDKs and desktop clients.

For instance if you want to integrate a OS map into your web application, you can rely on libraries such as LeafLet or OpenLayers to pull that data with a simple call. Likewise, you can open your GeoTiff or GeoPackage files within QGIS, ArcGIS or any other application that uses the GDAL/OGR library.

Another strong argument is that if you write an application which retrieves data from the OS Data Hub using any of these formats, you could easily reuse your code to access data in a different server which also publishes data according to these standards (for instance the Esri Living Atlas).

What’s new in OGC?
The first version of the WFS standard was written almost twenty years ago. The web is a very different place from what it was back then, and practices such as the use of REST architectures, JSON encodings or OpenAPI descriptions are now mainstream among web developers. OGC is developing a new family of standards, which takes advantage of these modern web practices, to create standards which are easier to use and deploy. We will write more about these OGC APIs in another blog post, so stay tuned if you want to learn more about this newer generation of OGC standards.

Top comments (0)