The OGC standards that power the OS Data Hub
Tags: ordnancesurvey, webdev, programming, geospatial
Published: 2021-10-07 14:37:55

The [OS Data Hub](https://osdatahub.os.uk/?utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards) 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)](https://www.ogc.org/), 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](https://www.ordnancesurvey.co.uk/newsroom/insights/why-do-geospatial-data-standards-matter?utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards).

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](https://osdatahub.os.uk/products?utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards), you will see a list of the APIs which you can add to your projects.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/426cs4fey9k40maze5bl.png)
>*os-apis-dashboard*

The [OS Features API](https://osdatahub.os.uk/docs/wfs/overview?utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards) gives you direct access to the detailed geometries and rich attribution of individual [features](https://en.wikipedia.org/wiki/Geographical_feature). It is based on the OGC [Web Feature Service](https://en.wikipedia.org/wiki/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](https://osdatahub.os.uk/docs/wmts/overview?utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards) serves pre-rendered raster tiles, available in different projections. It is based on the [OGC Web Map Tile Service](https://en.wikipedia.org/wiki/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](https://osdatahub.os.uk/downloads/open?_ga=2.83225686.1722133459.1633615564-1648783599.1627306224&utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards) 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](https://en.wikipedia.org/wiki/GeoTIFF) is an extension of the [TIFF](https://en.wikipedia.org/wiki/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](http://www.geopackage.org/) 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](https://www.sqlite.org/index.html) 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](https://www.ordnancesurvey.co.uk/newsroom/blog/new-data-formats-coming-this-year?utm_source=devto&utm_campaign=devrel&utm_content=ogc-standards) 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](https://en.wikipedia.org/wiki/GDAL#Software_using_GDAL/OGR).

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](https://livingatlas.arcgis.com/en/browse/#d=2)).

**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](https://en.wikipedia.org/wiki/Representational_state_transfer) architectures, [JSON](https://www.json.org/json-en.html) encodings or [OpenAPI](https://en.wikipedia.org/wiki/Open_API) descriptions are now mainstream among web developers. OGC is developing a [new family of standards](https://ogcapi.ogc.org/), 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.