Support Forums
Site Elevations

Is it possible to build a tag that can determine the elevation of my facility based upon the coordinantes in the parent site tag?

Or is it possible build a widget that references the Long. and Lat. of the parent site tag to determine site's elevation?

Thanks in advance!

Is it possible to build a tag that can determine the elevation of my facility based upon the coordinantes in the parent site tag? Or is it possible build a widget that references the Long. and Lat. of the parent site tag to determine site's elevation? Thanks in advance!

I'm sure it's possible. But, you'll have to do some research for an online JSON utility that will return an accurate elevation when given a latitude and longitude.
Not free, but one option is Google (search for "json return elevation given latitude and longitude" )

I'm sure it's possible. But, you'll have to do some research for an online JSON utility that will return an accurate elevation when given a latitude and longitude. Not free, but one option is Google (search for "json return elevation given latitude and longitude" )

Bing typically has much better pricing (often free) for use of their maps API and appears to offer a solution for you. Check out the following link: https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/get-elevations

Bing typically has much better pricing (often free) for use of their maps API and appears to offer a solution for you. Check out the following link: https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/get-elevations

Trihedral Engineering Ltd.

Since I'm not sure if I really described how to do this. Here is a bit of a summary.

  1. Setup A Context Tag and Add the Site Properties and enter the Latitude and Longitude for the location.
  2. As a child tag, add a JSON/XML Driver which uses the URL you configure from the link I provided above or from a similar service. If you want to parameterize the URL so the location will automatically update, you will want the URL to be a parameterized expression like:

Concat("http://dev.virtualearth.net/REST/v1/Elevation/List?points={", ..\Latitude, "," ..\Longitude, "}&heights={heights}&key={BingMapsAPIKey}" )

Note that the JSON driver should have a low polling rate of something like once per hour as you never really expect the height to change unless you update the location.

  1. As a child to the JSON/XML tag, create an I/O and Claculation tag and set it as an analog names siteHeight. In the Address field, use the address assist to select the value of the height from the JSON string received from the REST interface.

  2. You can now draw the height of the location and if you update the Lat/Long of the site, the Height will also update automatically.

Hopefully that helps at least getting you started.

Since I'm not sure if I really described how to do this. Here is a bit of a summary. 1. Setup A Context Tag and Add the Site Properties and enter the Latitude and Longitude for the location. 2. As a child tag, add a JSON/XML Driver which uses the URL you configure from the link I provided above or from a similar service. If you want to parameterize the URL so the location will automatically update, you will want the URL to be a parameterized expression like: Concat("http://dev.virtualearth.net/REST/v1/Elevation/List?points={", ..\Latitude, "," ..\Longitude, "}&heights={heights}&key={BingMapsAPIKey}" ) Note that the JSON driver should have a low polling rate of something like once per hour as you never really expect the height to change unless you update the location. 3. As a child to the JSON/XML tag, create an I/O and Claculation tag and set it as an analog names siteHeight. In the Address field, use the address assist to select the value of the height from the JSON string received from the REST interface. 4. You can now draw the height of the location and if you update the Lat/Long of the site, the Height will also update automatically. Hopefully that helps at least getting you started.

Trihedral Engineering Ltd.

edited Dec 11 '19 at 3:25 pm

Thank you for your responses.

I already have a context tag as the "parent site" which contains all the appropriate Long and Lat under the site display tab. I am playing with the JSON/XML Driver Tag like described but the value keeps turning up to 400. Which if I read correctly Bing returns the value in Meters and I'm certain my site is not 1300+ feet above sea level (I'm just north of Houston, Tx).

Here's the Parameterized Expression I have. Maybe I'm missing something.

Concat("http://dev.virtualearth.net/REST/v1/Elevation/List?points={“..\Latitude,“,“ ..\Longitude,”}&heights={heights}&key={my_key_is_typed_here}" )

Thank you for your responses. I already have a context tag as the "parent site" which contains all the appropriate Long and Lat under the site display tab. I am playing with the JSON/XML Driver Tag like described but the value keeps turning up to 400. Which if I read correctly Bing returns the value in Meters and I'm certain my site is not 1300+ feet above sea level (I'm just north of Houston, Tx). Here's the Parameterized Expression I have. Maybe I'm missing something. Concat("http://dev.virtualearth.net/REST/v1/Elevation/List?points={“..\Latitude,“,“ ..\Longitude,”}&heights={heights}&key={my_key_is_typed_here}" )

I just tested this there are a few items to note from my initial post. Firstly, the curly brackets need to be removed, secondly, the heights parameter value should have {heights} replaced by sealevel.

Please see the below sample URL and append your key to the end:

http://dev.virtualearth.net/REST/v1/Elevation/List?points=29.645200,-95.278678&heights=sealevel&key=

This should return an elevation of 13 m at William P. Hobby Airport in Houston, TX which aligns with the result I get from Open Street Map for the same location.

Therefore, try the following expression:

Concat("http://dev.virtualearth.net/REST/v1/Elevation/List?points=", ..\Latitude,",", ..\Longitude,"&heights=sealevel&key=YourKey" )

I just tested this there are a few items to note from my initial post. Firstly, the curly brackets need to be removed, secondly, the heights parameter value should have {heights} replaced by sealevel. Please see the below sample URL and append your key to the end: http://dev.virtualearth.net/REST/v1/Elevation/List?points=29.645200,-95.278678&heights=sealevel&key= This should return an elevation of 13 m at William P. Hobby Airport in Houston, TX which aligns with the result I get from Open Street Map for the same location. Therefore, try the following expression: Concat("http://dev.virtualearth.net/REST/v1/Elevation/List?points=", ..\Latitude,",", ..\Longitude,"&heights=sealevel&key=YourKey" )

Trihedral Engineering Ltd.

Got it! Thank you!

I was even able to make a calculation tag that reads the SiteHeight Tag and multiplies it by 3.28 to give me a Feet Elevation.

30 meters = 98.4Feet

Thanks again!

Got it! Thank you! I was even able to make a calculation tag that reads the SiteHeight Tag and multiplies it by 3.28 to give me a Feet Elevation. 30 meters = 98.4Feet Thanks again!

Awesome! Thanks for following up on this. Note you can also use the Tag Scaling to do the conversion from within the I/O tag.

Awesome! Thanks for following up on this. Note you can also use the Tag Scaling to do the conversion from within the I/O tag.

Trihedral Engineering Ltd.

96
7
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft