# Seamlines WMTS

## Overview[​](#overview "Direct link to Overview")

The Web Map Tile Service (WMTS) returns image tiles divided on a pre-defined grid matrix. These tile matrix sets are available in Geographic (EPSG:4326) and Web Mercator (EPSG:3857 and EPSG:900913) systems in standard and 2X (Retina) resolutions. See the list of [supported tile matrix sets](#supported-tile-matrix-sets).

Each tile within the set is identified by a numeric row and column value. The zoom level the tile column and tile row apply to must also be specified. Zoom levels 0 (lowest) to 21 (highest, fully zoomed in) are supported.

Other than returning tiles, the WMTS service functions similarly to the WMS service to render the `Maxar:seamline` layer.

## Authentication[​](#authentication "Direct link to Authentication")

All OGC services accept an API key or a bearer token for authentication.

#### Bearer tokens[​](#bearer-tokens "Direct link to Bearer tokens")

Oauth bearer tokens can also be used to authenticate API requests. Bearer tokens have a brief duration and must be refreshed frequently.

To authenticate with a bearer token, use the `Authorization` header:

`Authorization: Bearer <Oauth2 token>`

Learn about [OAuth2 bearer tokens](/docs/authentication/guides/get-a-token.md)

#### API keys[​](#api-keys "Direct link to API keys")

API keys can be passed using query parameters or in a custom header. No `Authorization` header is needed when using API keys.

To use the query parameter method, include this query parameter in your request:

`maxar_api_key=<your API key>`

The custom header takes the form of:

`maxar-api-key: <your API key>`

API keys expire 180 days from creation by default. A custom expiration date can be set but cannot exceed 180 days.

Learn about [API keys](/docs/authentication/guides/api-key.md)

## Services[​](#services "Direct link to Services")

| Name                                       | Description                                | Request URL                                                                                                       |
| ------------------------------------------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| [Get Capabilities](#wmts-get-capabilities) | Describes the Get Tile service and layers. | `https://api.maxar.com/basemaps/v1/seamlines/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0` |
| [GetTile](#wmts-get-tile)                  | Returns a seamless image tile              | `https://api.maxar.com/basemaps/v1/seamlines/gwc/service/wmts?request=GetTile`                                    |

## WMTS Get Capabilities[​](#wmts-get-capabilities "Direct link to WMTS Get Capabilities")

Returns a list of services and operations supported by WMTS.

### Request URL[​](#request-url "Direct link to Request URL")

```text
https://api.maxar.com/basemaps/v1/seamlines/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0

```

### Query parameters[​](#query-parameters "Direct link to Query parameters")

| Name    | Required/Optional | Description                       | Value             |
| ------- | ----------------- | --------------------------------- | ----------------- |
| service | required          | The requested OGC service.        | `wmts`            |
| request | required          | The name of the request type      | `GetCapabilities` |
| version | required          | The version number of the service | Use 1.0.0         |

### Response[​](#response "Direct link to Response")

Successful status code: `200 OK`

Response output format: XML

Exceptions may also return a 200 OK, with an error in the response body.

The response body is returned in XML format and describes the supported services and imagery layers.

## WMTS Get Tile[​](#wmts-get-tile "Direct link to WMTS Get Tile")

Returns a map tile based on the input query parameters.

> WMTS GetTile request parameters are explained in this section. You can also make a [WMTS Get Capabilities](#wmts-get-capabilities) request to see the details of the WMTS service.

### Request URL[​](#request-url-1 "Direct link to Request URL")

Example:

```text
https://api.maxar.com/basemaps/v1/seamlines/gwc/service/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=Maxar:seamline&format=image/jpeg&tileMatrixSet=EPSG:4326&tileMatrix=EPSG:4326:14&tileCol=6831&tileRow=4574&cql_filter=product_name='VIVD_STANDARD_30'

```

### Query parameters[​](#query-parameters-1 "Direct link to Query parameters")

| Name          | Required/Optional | Description                                                                                                           | Value                |
| ------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------- |
| service       | required          | The name of the OGC service.                                                                                          | `wmts`               |
| request       | required          | The name of the WMTS request type.                                                                                    | `GetTile`            |
| version       | required          | The version number of the service.                                                                                    | `1.0.0`              |
| layer         | required          | The name of the imagery layer to query.                                                                               | Use `Maxar:seamline` |
| tileMatrixSet | required          | A pre-defined set of tiles for the spatial reference system.[Supported tile matrix sets](#supported-tile-matrix-sets) | `EPSG:4326`          |
| tileMatrix    | required          | The tile matrix set and and zoom level, from 0 (lowest) to 21 (highest).                                              | `EPSG:4326:14`       |
| tileCol       | required          | The column index of a tile matrix.                                                                                    | `1709`               |
| tileRow       | required          | The row index of a tile matrix.                                                                                       | `3100`               |
| format        | required          | The output file format of the response. See [Supported Output Formats](#supported-output-formats).                    | `image/jpeg`         |
| styles        | optional          | Renders the layers in the selected style.                                                                             | `raster`             |

### Supported tile matrix sets[​](#supported-tile-matrix-sets "Direct link to Supported tile matrix sets")

Supported tile matrix sets

<!-- -->

```text
 EPSG:4326
 EPSG:900913

```

### Supported output formats[​](#supported-output-formats "Direct link to Supported output formats")

By default, a map tile is returned in PNG format. The JPEG format will return the fastest service response. PNG is required for tiles with transparent backgrounds.

Supported output formats

<!-- -->

```text
image/png
image/jpeg

```

### Response[​](#response-1 "Direct link to Response")

Successful response code: `200 OK`

The response is an image of the requested map tile.
