Language

Streaming from API

This section details how to use the WMTS protocol to stream the Basemap. The Basemap server exposes the Basemap endpoint https://view-bm.api.oneatlas.airbus.com/basemap/wmts with 2 request types defined by the standard and described in the following sections:

  • GetCapabilities
  • GetTile

If you are not familiar with WMTS protocols, you can read the ‘WMTS basics’ section.

GetCapabilities API

To retrieve the Basemap WMTS information, user authorized layer(s) and the tiling scheme used for Basemap streaming, you should use the GetCapabilities request. The characteristics of the endpoint to access to the GetCapabilities are:


Request

API Endpointhttps://view-bm.api.oneatlas.airbus.com/basemap/wmts?SERVICE=WMTS&REQUEST=GetCapabilities
REST verbGET
AuthorizationBasic or Bearer token (see Authenticate section)

cURL examples:
The following cURL example sends a GetCapabilities request to the ‘https://view-bm.api.oneatlas.airbus.com/basemap/wmts’ Basemap endpoint, passing <username:password> value as basic authentication:

> curl --request GET 'https://view-bm.api.oneatlas.airbus.com/basemap/wmts?SERVICE=WMTS&REQUEST=GetCapabilities' --user APIKEY:<API Key value>

See Authenticate section for <API Key value> retrieval
The following cURL example sends a GetCapabilities request to the ‘https://view-bm.api.oneatlas.airbus.com/basemap/wmts’ basemap endpoint, passing <Access Token> in bearer token authentication:

> curl --request GET 'https://view-bm.api.oneatlas.airbus.com/basemap/wmts?SERVICE=WMTS&REQUEST=GetCapabilities' --header 'Authorization: Bearer <Access Token>'

See Authenticate section for <Access Token> retrieval
As an answer, it returns an XML file with tiles. Below is an extract of the answer:

<?xml version="1.0" encoding="UTF-8" ?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <!-- Service Identification -->
    <ows:ServiceIdentification>
        <ows:Title>One Atlas Basemap Streamer</ows:Title>
        <ows:Abstract>One Atlas - The world's freshest basemap at your fingertips</ows:Abstract>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
    </ows:ServiceIdentification>
    <ows:ServiceProvider>
        [...]
    </ows:ServiceProvider>
    <!-- Operations Metadata -->
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="https://view-bm.api.oneatlas.airbus.com/basemap/wmts?">
                        [...]
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            [...]
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer xmlns:ows="http://www.opengis.net/ows/1.1">
            <ows:Title>advancedBasemap</ows:Title>
            <ows:Abstract>Top quality, never ageing basemap.</ows:Abstract>
            <ows:Identifier>advancedBasemap</ows:Identifier>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>-180 -90</ows:LowerCorner>
                <ows:UpperCorner>180 90</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <Style isDefault="true">
                <ows:Title>Default Style</ows:Title>
                <ows:Identifier>default</ows:Identifier>
            </Style>
            <Format>image/unknown</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>3857</TileMatrixSet>
            </TileMatrixSetLink>
        </Layer>
        <!--TileMatrixSet-->
        <TileMatrixSet xmlns:ows="http://www.opengis.net/ows/1.1">
            <ows:Identifier>3857</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.3:3857</ows:SupportedCRS>
            <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>559082264.02871788</ScaleDenominator>
                <TopLeftCorner>-20037508.3427892 20037508.3427892</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
            [...]
            <TileMatrix>
                <ows:Identifier>19</ows:Identifier>
                <ScaleDenominator>1066.3647919248922</ScaleDenominator>
                <TopLeftCorner>-20037508.3427892 20037508.3427892</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>524288</MatrixWidth>
                <MatrixHeight>524288</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
</Capabilities>

Note: The <Layer> tag returns the streaming layer authorized for the user. There can be several layer per user. The <Layer>/<Identifier> tag returns the name of the layer to be used to retrieve the Basemap tiles.

GetTile API

To retrieve a Basemap tile, you should use the GetTile request. The characteristics of the endpoint to access to the GetTile are:


Request

API Endpointhttps://view-bm.api.oneatlas.airbus.com/basemap/wmts?style=default&tilematrixset=3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/unknown&layer=<BasemapLayerName>&TileMatrix=<WmtsZoomLevel>&TileCol=<WmtsAbscissa>&TileRow=<WmtsOrdinates>
REST verbGET
AuthorizationBasic or Bearer token (see Authenticate section)

<BasemapLayerName> is the layer you want to get a tile from. <WmtsZoomLevel>/<WmtsAbscissa>/<WmtsOrdinates> is the triplet identifying the tile to be retrieved

cURL examples:
The following cURL example sends a GetTile request to the ‘https://view-bm.api.oneatlas.airbus.com/basemap/wmts’ basemap endpoint, passing <username:password> value as basic authentication:

> curl --request GET 'https://view-bm.api.oneatlas.airbus.com/basemap/wmts?style=default&tilematrixset=3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/unknown&layer=advancedBasemap&TileMatrix=19&TileCol=264129&TileRow=191412' --user APIKEY:<API Key value>

See Authenticate section for <API Key value> retrieval

The following cURL example sends a GetTile request to the ‘https://view-bm.api.oneatlas.airbus.com/basemap/wmts’ basemap endpoint, passing <Access Token> in bearer token authentication:

> curl --request GET 'https://view-bm.api.oneatlas.airbus.com/basemap/wmts?style=default&tilematrixset=3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/unknown&layer=advancedBasemap&TileMatrix=19&TileCol=264129&TileRow=191412' --header 'Authorization: Bearer <Access Token>'

See Authenticate section for <Access Token> retrieval The request answer is the Zoom level 19 tile located in X=264129 Y=191412:

wmts tile sample

Contact Us