Beta 100m Bathymetry WMS
API change historyThe beta Seabed Mapping 100m Web Map Service (WMS) is a simple HTTP interface for requesting georeferenced map images of the seabed around the UK derived from over 5,000 open bathymetric data sets which have been conflated into a single 100m resolution gridded surface. The surface represents a data point every 100m where data is available. The source data has not been interpolated this meaning that the WMS is not a continuous surface as only the tiles which contain source data are returned by the service.Why is it a beta service? The ‘beta’ label means you’re looking at the first version of the new service. During this phase, we will be continually testing and improving the service. More information on what beta means can be found here.If you think we’ve missed something, or would like to provide feedback, please let us know using the feedback email, here.
Request
Request URL
Request parameters
-
string
Indicates the service requested is WMS.
-
string
The type of the WMS request.
-
(optional)string
The format of the output map image for GetMap. Output format for service metadata for GetCapabilities.
-
(optional)string
Sets background colour to transparent.
-
(optional)string
Styles in which layers are to be rendered.
-
(optional)string
The WMS version.
-
(optional)string
List of Layers to display, for this API only 'caris:Level 2' is supported. Any other values supplied will be overridden and replaced with 'caris:Level 2'.
-
(optional)string
Output image width.
-
(optional)string
Output image Height.
-
(optional)string
Spatial Reference.
-
(optional)string
The bounding box coordinates.
Request headers
Request body
Responses
200 OK
Ok - The response returned depends on the 'REQUEST' value specified. The WMS service also returns this when it is unable to process your request due to invalid parameters specified.
400 Bad Request
Bad Request - Your REQUEST value was not recognised or not allowed.
401 Unauthorized
Token Authentication Failed
403 Forbidden
Forbidden.
This will be because:
- you have no permission to use this API
429 Too many requests
Too many requests - rate limit of 30 calls per 30 seconds exceeded
500 Internal Server Error
Internal Server Error
Code samples
@ECHO OFF
curl -v -X GET "https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}?FORMAT=image/png&TRANSPARENT={string}&STYLES={string}&VERSION=1.3.0&LAYERS={string}&WIDTH={string}&HEIGHT={string}&CRS={string}&BBOX=-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372"
-H "Ocp-Apim-Subscription-Key: {subscription key}"
--data-ascii "{body}"
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;
namespace CSHttpClientSample
{
static class Program
{
static void Main()
{
MakeRequest();
Console.WriteLine("Hit ENTER to exit...");
Console.ReadLine();
}
static async void MakeRequest()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");
// Request parameters
queryString["FORMAT"] = "image/png";
queryString["TRANSPARENT"] = "{string}";
queryString["STYLES"] = "{string}";
queryString["VERSION"] = "1.3.0";
queryString["LAYERS"] = "{string}";
queryString["WIDTH"] = "{string}";
queryString["HEIGHT"] = "{string}";
queryString["CRS"] = "{string}";
queryString["BBOX"] = "-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372";
var uri = "https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}&" + queryString;
var response = await client.GetAsync(uri);
}
}
}
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class JavaSample
{
public static void main(String[] args)
{
HttpClient httpclient = HttpClients.createDefault();
try
{
URIBuilder builder = new URIBuilder("https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}");
builder.setParameter("FORMAT", "image/png");
builder.setParameter("TRANSPARENT", "{string}");
builder.setParameter("STYLES", "{string}");
builder.setParameter("VERSION", "1.3.0");
builder.setParameter("LAYERS", "{string}");
builder.setParameter("WIDTH", "{string}");
builder.setParameter("HEIGHT", "{string}");
builder.setParameter("CRS", "{string}");
builder.setParameter("BBOX", "-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372");
URI uri = builder.build();
HttpGet request = new HttpGet(uri);
request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");
// Request body
StringEntity reqEntity = new StringEntity("{body}");
request.setEntity(reqEntity);
HttpResponse response = httpclient.execute(request);
HttpEntity entity = response.getEntity();
if (entity != null)
{
System.out.println(EntityUtils.toString(entity));
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"FORMAT": "image/png",
"TRANSPARENT": "{string}",
"STYLES": "{string}",
"VERSION": "1.3.0",
"LAYERS": "{string}",
"WIDTH": "{string}",
"HEIGHT": "{string}",
"CRS": "{string}",
"BBOX": "-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372",
};
$.ajax({
url: "https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}&" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
},
type: "GET",
// Request body
data: "{body}",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html>
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString* path = @"https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}";
NSArray* array = @[
// Request parameters
@"entities=true",
@"FORMAT=image/png",
@"TRANSPARENT={string}",
@"STYLES={string}",
@"VERSION=1.3.0",
@"LAYERS={string}",
@"WIDTH={string}",
@"HEIGHT={string}",
@"CRS={string}",
@"BBOX=-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372",
];
NSString* string = [array componentsJoinedByString:@"&"];
path = [path stringByAppendingFormat:@"?%@", string];
NSLog(@"%@", path);
NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
[_request setHTTPMethod:@"GET"];
// Request headers
[_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
// Request body
[_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
NSURLResponse *response = nil;
NSError *error = nil;
NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];
if (nil != error)
{
NSLog(@"Error: %@", error);
}
else
{
NSError* error = nil;
NSMutableDictionary* json = nil;
NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
NSLog(@"%@", dataString);
if (nil != _connectionData)
{
json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
}
if (error || !json)
{
NSLog(@"Could not parse loaded json with error:%@", error);
}
NSLog(@"%@", json);
_connectionData = nil;
}
[pool drain];
return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}');
$url = $request->getUrl();
$headers = array(
// Request headers
'Ocp-Apim-Subscription-Key' => '{subscription key}',
);
$request->setHeader($headers);
$parameters = array(
// Request parameters
'FORMAT' => 'image/png',
'TRANSPARENT' => '{string}',
'STYLES' => '{string}',
'VERSION' => '1.3.0',
'LAYERS' => '{string}',
'WIDTH' => '{string}',
'HEIGHT' => '{string}',
'CRS' => '{string}',
'BBOX' => '-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372',
);
$url->setQueryVariables($parameters);
$request->setMethod(HTTP_Request2::METHOD_GET);
// Request body
$request->setBody("{body}");
try
{
$response = $request->send();
echo $response->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>
########### Python 2.7 #############
import httplib, urllib, base64
headers = {
# Request headers
'Ocp-Apim-Subscription-Key': '{subscription key}',
}
params = urllib.urlencode({
# Request parameters
'FORMAT': 'image/png',
'TRANSPARENT': '{string}',
'STYLES': '{string}',
'VERSION': '1.3.0',
'LAYERS': '{string}',
'WIDTH': '{string}',
'HEIGHT': '{string}',
'CRS': '{string}',
'BBOX': '-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372',
})
try:
conn = httplib.HTTPSConnection('admiraltyapi.azure-api.net')
conn.request("GET", "/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}&%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64
headers = {
# Request headers
'Ocp-Apim-Subscription-Key': '{subscription key}',
}
params = urllib.parse.urlencode({
# Request parameters
'FORMAT': 'image/png',
'TRANSPARENT': '{string}',
'STYLES': '{string}',
'VERSION': '1.3.0',
'LAYERS': '{string}',
'WIDTH': '{string}',
'HEIGHT': '{string}',
'CRS': '{string}',
'BBOX': '-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372',
})
try:
conn = http.client.HTTPSConnection('admiraltyapi.azure-api.net')
conn.request("GET", "/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}&%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
require 'net/http'
uri = URI('https://admiraltyapi.azure-api.net/bathy-tile-service-100m/ows?SERVICE={SERVICE}&REQUEST={REQUEST}')
query = URI.encode_www_form({
# Request parameters
'FORMAT' => 'image/png',
'TRANSPARENT' => '{string}',
'STYLES' => '{string}',
'VERSION' => '1.3.0',
'LAYERS' => '{string}',
'WIDTH' => '{string}',
'HEIGHT' => '{string}',
'CRS' => '{string}',
'BBOX' => '-425988.3826589292,6390953.66876267,161047.99457094132,6677439.650775372'
})
if query.length > 0
if uri.query && uri.query.length > 0
uri.query += '&' + query
else
uri.query = query
end
end
request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(request)
end
puts response.body