https://github.com/cholmes/ogc-api-tiles-quickstart
A guide for implementors to quickly get to the meat of OGC-API-Tiles specification
https://github.com/cholmes/ogc-api-tiles-quickstart
Last synced: 6 months ago
JSON representation
A guide for implementors to quickly get to the meat of OGC-API-Tiles specification
- Host: GitHub
- URL: https://github.com/cholmes/ogc-api-tiles-quickstart
- Owner: cholmes
- Created: 2020-04-21T14:52:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-21T15:19:28.000Z (over 6 years ago)
- Last Synced: 2025-01-08T22:07:27.595Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quickstart Guide to [OGC API - Tiles](https://github.com/opengeospatial/OGC-API-Tiles)
## About
This guide is intended to communicate the key pieces of the Tiles API standard so that implementors can get started
without having to dig through the longer specification.
## Introduction
OGC API - Tiles provides a standard way to describe web map tile sets for clients to consume. It is the successor to
[WMTS](https://en.wikipedia.org/wiki/Web_Map_Tile_Service), updated to use JSON, in line with the spatial data on the web
best practices. It also is designed to be a 'building block', that can plug into the OGC API suite, but can also be used
as a standalone piece. It's also similar to [TileJSON](https://github.com/mapbox/tilejson-spec), adding the ability to
handle alternate projections and fitting into the OGC API suite of standards.
## Tiles Description Link
Any resource that is represented in JSON can provide a link to a ‘Tiles Description’ JSON object that provides the necessary
metadata to enable a client application to formulate a tile request. This could be an OGC Collection, OGC Item (from OGC API -
Features), or a custom resource (even an ‘ephemeral’ resource like a search response). But the resource must have a links
array that includes an object with a rel of ‘tiles’ and a type of ‘application/json’, and the `href` must return the Tiles
Description object specified below.
```
"links": [
...
{
"href": "http://data.example.com/collections/buildings/tiles",
"rel": "tiles",
"type": "application/json",
}
]
}
```
This communicates to any client that the link is the tiles representation of this particular resource.
The core specification [shows a link in a buildings Collection](https://github.com/opengeospatial/OGC-API-Tiles/blob/master/core/standard/clause_7_tile_core.adoc#tiles-description-link), which will be the starting point for many.
(TODO: possibly add more examples, perhaps at the bottom or in an /examples/ directory)
## Tile Description Response
The response of this link type is the JSON object that contains the information to enable a client application to formulate a
tile request that represents the resources that created the link. The current minimum response in the specification is:
```
{
"tileMatrixSetLinks": [
{
"tileMatrixSet": "WorldMercatorWGS84Quad",
"tileMatrixSetURI": "http://schemas.opengis.net/tms/1.0/json/examples/WorldMercatorWGS84Quad.json"
}
],
...
"links": [
...
{
"href": "http://data.example.com/collections/buildings/tiles/{tileMatrixSetId}/{tileMatrix}/{tileRow}/{tileCol}.png",
"templated": true,
"rel": "item",
"type": "image/png",
}
...
]
}
```
The specification provides advanced options in the `tileMatrixSetLinks` to specify your own projections and matrices. For
now just use the exact example above if your data is in WebMercator XYZ (as most web tiles are).
TODO: Add info on how to make the template match your server. And clarify if people have to include the tileMatrixSetID if
they just have one