Multimap Open API V1.2 Web Services Documentation - Coordinate Transformation
Many of the more widely-used online mapping APIs, including the Multimap Open API and the Microsoft Bing Maps API, do not support the Ordnance Survey (OS) grid references, Ordnance Survey National Grid (OSNG) coordinate system or Mercator coordinates internally but do support latitude and longitude. The commonly-available algorithmic conversion methods from OS grid references or OSNG eastings and northings or Mercator to World Geodetic System 84 (WGS84) latitude and longitude are too inaccurate to use for street-level placement of locations (and are often out of alignment by more than 100 meters).
Multimap's REST API supports single or multiple eastings and northings pairs (x and y coordinates), pairs of WGS84 latitude and longitude coordinates and OS grid references. It offers a choice of JSON and XML output formats.
This document explains the conversion between OSNG coordinates and WGS84 coordinates via the REST API. You can also convert between Mercator coordinates and WGS84 coordinates. Additionally, the Multimap REST API enables you to convert the OS grid references to WGS84 coordinates.
The Multimap API now enables you to convert between OSNG coordinates and Mercator coordinates and WGS84 coordinates. For details, please see the Multimap Open API V1.2 JavaScript Coordinate Transformation documentation.
The Coordinate Transformation parameters, description and values are as follows:
| Parameter | Description | Valid values | Example | Mandatory |
|---|---|---|---|---|
grid_[COUNTER] | This parameter allows you to specify OSNG coordinates in their 'grid' format. | String | grid_3=TQ309811 | No |
lat_[COUNTER] | This is the WGS84 system latitude parameter that you wish to convert to a Mercator or OSNG coordinate. | Float (-90 to 90) | lat_1=51.79605 | No |
lon_[COUNTER] | This is the WGS84 system longitude parameter that you wish to convert to a Mercator or OSNG coordinate. | Float (-180 to 180) | lon_1=0.217777 | No |
system | This parameter refers to the system to or from which the coordinates are being converted, which can be either Mercator or OSNG. Please note that you must use the system parameter with the x and y coordinate pair or lat and lon coordinate pair. However, this is not the case when using the grid reference parameter. | String | system=mercator | No |
x_[COUNTER] | This is the OSNG system x parameter that you wish to convert to a WGS84 lon coordinate. | Integer (0 to 700,000) | x_1=523000 | No |
y_[COUNTER] | This is the OSNG system y parameter that you wish to convert to a WGS84 lat coordinate. | Integer (0 to 1,300,000) | y_1=212324 | No |
x_[COUNTER] | This is the Mercator system easting parameter that you wish to convert to a WGS84 lon coordinate. | Integer (-20,037,508 to 20,037,508) | x_1=20037508 | No |
y_[COUNTER] | This is the Mercator system northing parameter that you wish to convert to a WGS84 lat coordinate. | Integer (20,037,508 to -20,037,508) | y_1=-20037508 | No |
[Note: Please replace "parameter_[COUNTER]" by incremental numbers such as parameter_1 or parameter_2.]
x and y coordinate pair to a WGS84 lat and lon coordinate pairIn the following example, the Multimap REST API converts three Mercator coordinate pairs to WGS84 coordinates of latitude and longitude and gives the result in JSON output format.
http://developer.multimap.com/API/convert/1.2/[api_key]?output=json&system=mercator&x_1=523000&y_1=212324&x_2=323000
&y_2=212324&x_3=423000&y_3=212324
The URL returns the following response:
{"result_set":[{"point":{"lat":"1.90699","lon":"4.69819"}},
{"point":{"lat":"1.90699","lon":"2.90156"}},
{"point":{"lat":"1.90699","lon":"3.79987"}}]}
lat and lon coordinate pair to a Mercator x and y coordinate pairIn the following example, the Multimap REST API converts three WGS84 coordinate pairs of latitude and longitude to Mercator x and y coordinate pairs and gives the result in XML output format.
http://developer.multimap.com/API/convert/1.2/[api_key]?output=xml&system=mercator&lat_1=51.79605&lon_1=0.217777
&lat_2=51.80424&lon_2=3.11815&lat_3=51.80909&lon_3=1.66779
The URL returns the following response:
<?xml version="1.0" encoding="UTF-8" ?>
<Results xmlns="http://developer.multimap.com/API" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://developer.multimap.com/API http://developer.multimap.com/Schema/convert_1.2.xsd">
<Point>
<X>24243</X>
<Y>6763332</Y>
</Point>
<Point>
<X>347111</X>
<Y>6764807</Y>
</Point>
<Point>
<X>185658</X>
<Y>6765680</Y>
</Point>
</Results>
x and y coordinate pair to a WGS84 lat and lon coordinate pairIn the following example, the Multimap REST API converts three OSNG x and y coordinate pairs to WGS84 coordinate pairs of latitude and longitude and gives the result in JSON and XML output formats.
http://developer.multimap.com/API/convert/1.2/[api_key]?output=json&system=osng&x_1=523000&y_1=212324&x_2=323000&y_2=212324
&x_3=423000&y_3=212324
The URL returns the following response:
{"result_set":[{"point":{"lat":"51.79605","lon":"-0.21777"}},
{"point":{"lat":"51.80424","lon":"-3.11815"}},
{"point":{"lat":"51.80909","lon":"-1.66779"}}]}
http://developer.multimap.com/API/convert/1.2/[api_key]?output=xml&system=osng&x_1=523000&y_1=212324&x_2=323000&y_2=212324
&x_3=423000&y_3=212324
The URL returns the following response:
<?xml version="1.0" encoding="UTF-8"?>
<Results xmlns="http://developer.multimap.com/API" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://developer.multimap.com/API http://developer.multimap.com/Schema/convert_1.2.xsd">
<Point7>
<Lat>51.79605</Lat>
<Lon>-0.21777</Lon>
</Point>
<Point>
<Lat>51.80424</Lat>
<Lon>-3.11815</Lon>
</Point>
<Point>
<Lat>51.80909</Lat>
<Lon>-1.66779</Lon>
</Point>
</Results>
x and y coordinate pair and a grid reference to a WGS84 lat and lon coordinate pairIn the following example, the Multimap REST API converts two OSNG x and y coordinate pairs and a grid reference to WGS84 coordinate pairs of latitude and longitude and gives the result in XML output format.
http://developer.multimap.com/API/convert/1.2/[api_key]?output=xml&system=osng&x_1=523000&y_1=212324&x_2=323000&y_2=212324
&grid_3=NN166712
The URL returns the following response:
<?xml version="1.0" encoding="UTF-8" ?>
<Results xmlns="http://developer.multimap.com/API" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://developer.multimap.com/API http://developer.multimap.com/Schema/convert_1.2.xsd">
<Point>
<Lat>51.79605</Lat>
<Lon>-0.21777</Lon>
</Point>
<Point>
<Lat>51.80424</Lat>
<Lon>-3.11815</Lon>
</Point>
<Point>
<Lat>56.79607</Lat>
<Lon>-5.00470</Lon>
</Point>
</Results>
If you require further help with your Multimap Open API implementation, please visit the Multimap Developer Forums.
For Open API news, announcements and other information, please see our blog.
For enquiries about further Multimap services, please contact the Multimap Sales team:
| Great Britain, London | +44 (0)20 7632 7800 |
| email: | sales@multimap.com |