Elevation Service

The Location Hub® Elevation Service processes geographic coordinates and quickly returns the elevation of the geographic location above sea level.

What does it do?

The Elevation Service allows users to determine the elevation of a property by passing a geographic coordinate of the location to the service. Input coordinates must be in Latitude and Longitude WGS84 projection.

Location Hub uses the Canadian Digital Elevation Data (CDED) as a reference source for the elevation service. The elevation returned by the service is in metres relative to Mean Seal Level (MSL) which is represented as 0. A response value of -9999 indicates that no data is available at the specified coordinate.

Accessing the Service

To access the Location Hub Elevation service you must first be authorized for use with Location Hub Web Services in order to have a valid user name and password. Please contact info@dmtispatial.com for more information on how to register for the Location Hub Elevation Web Service.

Once you have a valid user name and password, please refer to the Authentication section for information on how to access the service.

SOAP Service

SOAP Operations

There are 2 Elevation operation requests available through SOAP/XML

  • GetElevation: Returns the elevation in metres above Mean Sea Level for the given geographic coordinate location
  • GetElevations: Returns the elevation in metres above Mean Sea Level for a batch of geographic coordinate locations

Parameters

The following parameters are required by all Elevation Service Operations:

  • Lat (double): The WGS84 latitude of the location specified
  • Lon (double): The WGS84 longitude of the location specified

The following parameter is optional for the GetElevations operation only:

  • ID (string): an optional identifier for the coordinate location

Examples:

<!-- The SOAP/XML Request -->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:lh="http://lh.dmtispatial.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <lh:GetElevation>
         <!--type: double-->
         <lh:lat>47.3840580627</lh:lat>
         <!--type: double-->
         <lh:lon>-53.919928273</lh:lon>
      </lh:GetElevation>
   </soapenv:Body>
</soapenv:Envelope>
 
<!-- The SOAP/XML Response -->
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetElevationResponse xmlns="http://lh.dmtispatial.com/">
         <GetElevationResult>27</GetElevationResult>
      </GetElevationResponse>
   </s:Body>
</s:Envelope>
 
<!-- The SOAP/XML Request -->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:lh="http://lh.dmtispatial.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <lh:GetElevations>
         <lh:coords>
            <!--1 or more repetitions:-->
            <lh:Coordinate>
               <!--Optional:-->
               <!--type: string-->
               <lh:ID>1</lh:ID>
               <!--type: double-->
               <lh:Lat>47.3840580627</lh:Lat>
               <!--type: double-->
               <lh:Lon>-53.919928273</lh:Lon>
            </lh:Coordinate>
            <lh:Coordinate>
               <lh:ID>2</lh:ID>
               <lh:Lat>44.648881</lh:Lat>
               <lh:Lon>-63.575312</lh:Lon>
            </lh:Coordinate>
            <lh:Coordinate>
               <lh:ID>3</lh:ID>
               <lh:Lat>50</lh:Lat>
               <lh:Lon>-100</lh:Lon>
            </lh:Coordinate>
            <lh:Coordinate>
               <lh:ID>4</lh:ID>
               <lh:Lat>0</lh:Lat>
               <lh:Lon>0</lh:Lon>
            </lh:Coordinate>
         </lh:coords>
      </lh:GetElevations>
   </soapenv:Body>
</soapenv:Envelope>
 
<!-- The SOAP/XML Response -->
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetElevationsResponse xmlns="http://lh.dmtispatial.com/">
         <GetElevationsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Coordinate>
               <ID>1</ID>
               <Lat>47.3840580627</Lat>
               <Lon>-53.919928273</Lon>
               <Elevation>27</Elevation>
            </Coordinate>
            <Coordinate>
               <ID>2</ID>
               <Lat>44.648881</Lat>
               <Lon>-63.575312</Lon>
               <Elevation>16.923</Elevation>
            </Coordinate>
            <Coordinate>
               <ID>3</ID>
               <Lat>50</Lat>
               <Lon>-100</Lon>
               <Elevation>466</Elevation>
            </Coordinate>
            <Coordinate>
               <ID>4</ID>
               <Lat>0</Lat>
               <Lon>0</Lon>
               <Elevation>-9999</Elevation>
            </Coordinate>
         </GetElevationsResult>
      </GetElevationsResponse>
   </s:Body>
</s:Envelope>

 

REST Service

REST Operations

There is one Elevation operation request available through REST

  • elevation: Returns the elevation in metres above Mean Sea Level for the given geographic coordinate location

Parameters

The following parameters are supported by the elevation REST request:

  • coord (double,double): The WGS84 latitude and longitude pair of the location separated by a comma, i.e. (lat,lon)
  • format (optional string): the output format of the response. The options supported are json or xml. If no format is provided, the service will default to json.

Examples:

/* REST Requests with format options */
 
/rest/elevation?coord=47.3840580627,-53.919928273
/rest/elevation?coord=47.3840580627,-53.919928273&format=json
/rest/elevation?coord=47.3840580627,-53.919928273&format=xml
 
/* REST Responses with format options above */
27
27
<double xmlns="http://schemas.microsoft.com/2003/10/Serialization/">27</double>