Language
Using Your Own Code
DELETED
You can can download our new streaming process user guide here while the documentation update on this portal is in progress
As an example, we will use the following area of San Francisco International Airport:
The coordinates of the bounding box are:
Longitude | Latitude | |
---|---|---|
Upper left corner | -122,385946512222 | 37,6203332456312 |
Bottom right corner | -122,382202148437 | 37,6176733171484 |
Using WMS Protocol
OneAtlas Basemap follows the OGC standard defining the WMS protocol: https://www.opengeospatial.org/standards/wms.
Using the WMS endpoint, the GetCapabilities
service request is invoked to retrieve the WMS streaming endpoint:
curl -X GET -H "Authorization: Bearer <API_KEY>" "https://view.geoapi-airbusds.com/api/v1/map/imagery.wms?version=1.1.1&request=GetCapabilities&service=WMS"
The response should look like:
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd" [
<!ELEMENT VendorSpecificCapabilities EMPTY>
]>
<WMT_MS_Capabilities version="1.1.1" updateSequence="0">
<Service>
<Name>cf11e122-4f20-11e6-b6b4-3fb4985d5498</Name>
<Title>OneAtlas Internal Team Worldwide</Title>
<Abstract>One Atlas - The world's freshest basemap at your fingertips</Abstract>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://view.geoapi-airbusds.com/mugg/wms/cf11e122-4f20-11e6-b6b4-3fb4985d5498?"/>
<ContactInformation>
<ContactPersonPrimary>
<ContactPerson>One Atlas Support</ContactPerson>
<ContactOrganization>Airbus DS Intelligence</ContactOrganization>
</ContactPersonPrimary>
<ContactPosition>One Atlas Support</ContactPosition>
<ContactAddress>
<AddressType>mailing and physical</AddressType>
<Address>5, rue des Satellites</Address>
<City>Toulouse</City>
<StateOrProvince>-</StateOrProvince>
<PostCode>31030</PostCode>
<Country>France</Country>
</ContactAddress>
<ContactVoiceTelephone>-</ContactVoiceTelephone>
<ContactFacsimileTelephone>-</ContactFacsimileTelephone>
<ContactElectronicMailAddress>oneatlas_helpdesk_gccc@airbus.com</ContactElectronicMailAddress>
</ContactInformation>
</Service>
<Capability>
<Request>
<GetCapabilities>
<Format>application/vnd.ogc.wms_xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://view.geoapi-airbusds.com/mugg/wms/cf11e122-4f20-11e6-b6b4-3fb4985d5498?"/>
</Get>
</HTTP>
</DCPType>
</GetCapabilities>
<GetMap>
<Format>image/jpeg</Format>
<Format>image/png</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://view.geoapi-airbusds.com/mugg/wms/cf11e122-4f20-11e6-b6b4-3fb4985d5498?"/>
</Get>
</HTTP>
</DCPType>
</GetMap>
</Request>
<Exception>
<Format>application/vnd.ogc.se_xml</Format>
</Exception>
<Layer>
<Title>OneAtlas Internal Team Worldwide</Title>
<Abstract>One Atlas - The world's freshest basemap at your fingertips</Abstract>
<SRS>EPSG:3857</SRS>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-180" miny="-85.05113" maxx="180" maxy="85.05113" />
<Layer queryable="0" opaque="0" cascaded="0">
<Name>0</Name>
<Title>OneLive</Title>
<Abstract>Top quality, never ageing basemap.</Abstract>
<LatLonBoundingBox minx="-180" miny="-85.05113" maxx="180" maxy="85.05113" />
</Layer>
</Layer>
</Capability>
</WMT_MS_Capabilities>
The WMS streaming endpoint can be found under the /Capability/request/GetMap/DCPType/HTTP/Get
path. In our example, the endpoint is https://view.geoapi-airbusds.com/api/v1/map/imagery.wms?
.
<WMT_MS_Capabilities version="1.1.1" updateSequence="0">
...
<Capability>
<Request>
...
<GetMap>
...
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://view.geoapi-airbusds.com/mugg/wms/cf11e122-4f20-11e6-b6b4-3fb4985d5498?"/>
</Get>
</HTTP>
</DCPType>
</GetMap>
</Request>
...
</Capability>
</WMT_MS_Capabilities>
Afterwards, you can use the WMS protocol to access the image of the bounding box. In this example we show a number of parameters needed to make a successful GetMap request:
curl -X GET -H "Authorization: Bearer <API_KEY>" "https://view.geoapi-airbusds.com/api/v1/map/imagery.wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-122.385946512222,37.6176733171484,-122.382202148437,37.6203332456312&SRS=EPSG:4326&WIDTH=600&HEIGHT=400&LAYERS=0&STYLES=&FORMAT=image/png"
API endpoint | WMS endpoint (see Manage Subscriptions) |
VERSION=1.1.1 | This is the WMS version supported by the basemap |
REQUEST=GetMap | This is the request name. |
SRS | This is the spatial reference value. The value could be EPSG:4326 or EPSG:3857 |
BBOX | This is the ounding box for map extent. The value is 'minX, minY, maxX, maxY' in units of the SRS. |
WIDTH / HEIGHT | This is the width or height of the requested image in pixels. |
FORMAT=image/png | This is the requested image format. |
Here we can see the PNG result of the request above for the requested pixel size (600 × 400) satisfying our bounding box:
Using WMTS Protocol
This section details how to use the WMTS protocol from your own code. To do so, you will need to convert geographic coordinates into tiles coordinates.
GetCapabilities
To retrieve the basemap WMTS information and the tiles detailed schema used, you should use the GetCapabilities
service:
The characteristics of the endpoint to access to the GetCapabilities
are:
API Endpoint | WMS endpoint (see Manage Subscriptions) |
REST verb | GET |
Authentication | Bearer access token |
Here is an example of a GetCapabilities
request:
curl -X GET -H "Authorization: Bearer <API_KEY>" "https://view.geoapi-airbusds.com/api/v1/map/imagery.wmts?request=GetCapabilities"
This will return an XML file with tiles. Below you can see an extract the XML file:
<TileMatrix>
<ows:Identifier>12</ows:Identifier>
<ScaleDenominator>68247.34668319309</ScaleDenominator>
<TopLeftCorner>90.000000 -180.000000</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8192</MatrixWidth>
<MatrixHeight>4096</MatrixHeight>
</TileMatrix>
Get Tiles for a Geographic Tile Matrix Set
If you intend to get the tiles coordinates for the Geographic tile matrix set, you should use the formula below:
- x = [ (longitude + π) / (2 × π) ] × MatrixWidth
- y = [1 - [ (latitude + π/2 ) / π ] ] × MatrixHeight
Note: latitude and longitude should be in radians.
The Geographic tile matrix set is described as follows:
- CRS Name: urn:ogc:def:crs:OGC:1.3:CRS84 CRS84
- Top left corner: [ -180 , 90 ]
- Tile size: 256 × 256 pixels
Zoom level id | Scale Denominator | Pixel Size (degrees) | Pixel Size (m)* | Matrix Width | Matrix Height |
---|---|---|---|---|---|
0 | 279541132.0143589 | 0.703125 | 70312.5 | 2 | 1 |
1 | 139770566.0071794 | 0.351562500 | 35156.25 | 4 | 2 |
2 | 69885283.00358972 | 0.175781250 | 17578.125 | 8 | 4 |
3 | 34942641.50179486 | 8.78906250 × 10-2 | 8789.063 | 16 | 8 |
4 | 17471320.75089743 | 4.39453125 × 10-2 | 4394.531 | 32 | 16 |
5 | 8735660.375448715 | 2.19726562500 × 10-2 | 2197.266 | 64 | 32 |
6 | 4367830.187724357 | 1.09863281250 × 10-2 | 1098.633 | 128 | 64 |
7 | 2183915.093862179 | 5.49316406250 × 10-3 | 549.316 | 256 | 128 |
8 | 1091957.546931089 | 2.74658203125 × 10-3 | 274.658 | 512 | 256 |
9 | 545978.7734655447 | 1.37329101562500 × 10-3 | 137.329 | 1024 | 512 |
10 | 272989.3867327723 | 6.86645507812500 × 10-4 | 68.665 | 2048 | 1024 |
11 | 136494.6933663862 | 3.43322753906250 × 10-4 | 34.332 | 4096 | 2048 |
12 | 68247.34668319309 | 1.71661376953125 × 10-4 | 17.166 | 8192 | 4096 |
13 | 34123.67334159654 | 8.58306884765625 × 10-5 | 8.5831 | 16384 | 8192 |
14 | 17061.83667079827 | 4.29153442382812 × 10-5 | 4.2915 | 32768 | 16384 |
15 | 8530.918335399136 | 2.14576721191406 × 10-5 | 2.1458 | 65536 | 32768 |
16 | 4265.459167699568 | 1.07288360595703 × 10-5 | 1.0729 | 131072 | 65536 |
17 | 2132.729583849784 | 5.36441802978516 × 10-6 | 0.53644 | 262144 | 131072 |
* Approximation at the equator
The matrix width and height depends on the zoom level. You can pick the correct value using the table provided above. Be aware that the size of the tile matrix differs between the Geographic and the Web Mercator tile matrix set.
The request returns an XML response which is conformed to the OGC specification. By aggregating different elements such as the style, the tile matrix set with the ResourceURL value and integrating the tiles coordinates, you can access a single tile.
The below example contains the following elements which make up the url to retrieve a tile:
- EPSG - in this example it is “EPSG4326”
- Zoom level - in this example this is “17”
- Upper left tile - in this example it is “41955”
- Bottom right tile - in this example it is “38143”
curl -X GET -H "Authorization: Bearer <API_KEY>" \
"https://view.geoapi-airbusds.com/api/v1/map/imagery.wmts?tilematrixset=4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=17&TileCol=41955&TileRow=38143"
Not available.
Not available.
Here you can see the result displaying one tile:
For this example the result is made up of 9 tiles. The overall size of the composite image is 728 (3 × 256) pixels per 728 pixels (3 × 256 pixels) and the returned BBOX exceeded the initial BBOX requested.
Get Tiles for a Web Mercator Tile Matrix Set
If you intend to get the tiles coordinates for the Web Mercator tile matrix set, you will have to first reproject the coordinates to the Mercator projection (from EPSG:4326 to EPSG:3857). Then you will be required to transform the range of latitude and longitude to 0 - 1 and shift origin to top left corner:
- n = 2 ^zoom
- xtile = n × ((longitude + π) / (2 × π))
- ytile = (1 - (log(tan(latitude) + sec(latitude)) / π)) / (2 × n)
Note: latitude and longitude are required in radians.
The Web Mercator tile matrix set is described as follows:
- CRS Name: urn:ogc:def:crs:EPSG:6.18:3:3857
- Top left corner: [ -20037508.3427892 , 20037508.3427892 ]
- Tile size: 256 × 256 pixels
Zoom level id | Scale Denominator | Pixel Size (m) | Matrix Width | Matrix Height |
---|---|---|---|---|
0 | 559082264.0287178 | 156543.0339280410 | 1 | 1 |
1 | 279541132.0143589 | 78271.51696402048 | 2 | 2 |
2 | 139770566.0071794 | 39135.75848201023 | 4 | 4 |
3 | 69885283.00358972 | 19567.87924100512 | 8 | 8 |
4 | 34942641.50179486 | 9783.939620502561 | 16 | 16 |
5 | 17471320.75089743 | 4891.969810251280 | 32 | 32 |
6 | 8735660.375448715 | 2445.984905125640 | 64 | 64 |
7 | 4367830.187724357 | 1222.992452562820 | 128 | 128 |
8 | 2183915.093862179 | 611.4962262814100 | 256 | 256 |
9 | 1091957.546931089 | 305.7481131407048 | 512 | 512 |
10 | 545978.7734655447 | 152.8740565703525 | 1024 | 1024 |
11 | 272989.3867327723 | 76.43702828517624 | 2048 | 2048 |
12 | 136494.6933663862 | 38.21851414258813 | 4096 | 4096 |
13 | 68247.34668319309 | 19.10925707129406 | 8192 | 8192 |
14 | 34123.67334159654 | 9.554628535647032 | 16384 | 16384 |
15 | 17061.83667079827 | 4.777314267823516 | 32768 | 32768 |
16 | 8530.918335399136 | 2.388657133911758 | 65536 | 65536 |
17 | 4265.459167699568 | 1.194328566955879 | 131072 | 131072 |
18 | 2132.729583849784 | 0.5971642834779395 | 262144 | 262144 |
You can use the same principle explained for the geographic tile grid. You must include the following elements within the url:
- EPSG - in this example it is “EPSG3857”
- Zoom level - in this example this is “17”
- Upper left tile - in this example it is “41955”
- Bottom right tile - in this example it is “38143”
curl -X GET -H "Authorization: Bearer <API_KEY>" \
"https://view.geoapi-airbusds.com/api/v1/map/imagery.wmts?tilematrixset=3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=18&TileCol=41955&TileRow=101468"
Not available.
Not available.
Here you can see the result displaying all the 3 tiles:
© Airbus Defence and Space 2022. All rights reserved. Privacy Policy | Legal Information