User Tools

Site Tools


thinkgeo_cloud_elevation

This is an old revision of the document!


ThinkGeo Cloud Elevation

ThinkGeo Cloud Elevation provides the way to get elevation data from ThinkGeo's Cloud Server. Check out Get Elevation Along Path for a quick look.

The Elevation SDK supports querying of elevation data by points, line and polygon based on SRTM and Ned13 elevation source data. It returns 3 types of data:

  • For points - Creates a buffer and aggregates all points within buffer to create averages for the elevation of the point.
  • For lines - There are two ways to get the elevation data of the line. First, get the points on the line by setting the interval distance. The other, is to take the points by setting the number of points to be fetched. Then querying the elevation data of the point.
  • For polygons - By setting the interval distance, clip the polygon to the grids and get all the center of the grids where the polygon is located. Now, determine whether the center points are within the surface or inside the surface (use improved arc-length method).

RESTful APIs

* Try it Online: All of the ThinkGeo Cloud RESTful APIs can be tested online by following the instructions below:

  • Get a ThinkGeo Cloud Client Key. Check out ThinkGeo Cloud Client Keys Guideline to see how to acquire and apply one. All ThinkGeo Cloud evaluations are FREE for 60 days.
  • Authorize with the key at the top of ThinkGeo Cloud APIs and you are then free to play with all the APIs online.

ThinkGeo Cloud Elevation provides the following RESTful APIs:

<!-- Get the elevation of a point -->
HTTP GET
https://cloud.thinkgeo.com/api/v1/elevation/{pointY},{pointX}

Parameters

  • pointY: Required. The Y coordinate of the point.
  • pointX: Required. The X coordinate of the point.
<!-- Get the elevation of points along a line -->
HTTP GET
https://cloud.thinkgeo.com/api/v1/elevation/line

Parameters

  • wkt: The Well Known Text (WKT) of a line feature to get the elevation.
  • srid: Optional. The SRID (coordinate system) of the input feature.
  • proj4String: Optional. The Proj4String (coordinate system) of the input feature.
  • NumberOfSegments: Optional. Splits the requested line into this many segments, then calculates elevation of each point joining the segments.
  • ElevationUnit: Optional. The unit of measure in which the elevation result is expressed. Defaults to “Feet”.
  • IntervalDistance: Optional. Splits the requested line into intervals of this length. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter.
  • IntervalDistanceUnit: Optional. The unit of measure in which the IntervalDistance is expressed. Defaults to “Feet”.
<!-- Get the elevation of a matrix of points within an area. -->
HTTP GET
https://cloud.thinkgeo.com/api/v1/elevation/area

Parameters

  • wkt: The Well Known Text (WKT) of a polygon feature to get the elevation.
  • srid: Optional. The SRID (coordinate system) of the input feature.
  • proj4String: Optional. The Proj4String (coordinate system) of the input feature.
  • ElevationUnit: Optional. The unit of measure in which the elevation result is expressed. Defaults to “Feet”.
  • IntervalDistance: Optional. The distance between every two points in the area matrix. Elevation of each point will be calculated and returned. Defaults to 1000.0. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter.
  • IntervalDistanceUnit: Optional. The unit of measure in which the IntervalDistance is expressed. Defaults to “Feet”.
<!-- Get reverse geocoding for points -->
HTTP POST
https://cloud.thinkgeo.com/api/v1/location/reverse-geocode/multi

Parameters

/* POST parameters, if a parameter specified in both POST and GET, the value from POST parameter will be applied. */
[
  {
    "coord": "string", // The coordinates of the point. The format is: y,x.
    "srid": int, // The SRID (coordinate system) of the input feature. Defaults to 4326.
    "proj4String": "string", // The Proj4 (coordinate system) of the input feature.
    "elevationUnit": "string", // The unit of measure in which the elevation result is expressed. Defaults to "Feet".
  }
]
  • srid: Optional. The SRID (coordinate system) of the input feature. Defaults to 4326.
  • proj4String: Optional. The Proj4 (coordinate system) of the input feature.
  • ElevationUnit: Optional. The unit of measure in which the elevation result is expressed. Defaults to “Feet”.
<!--  Get the grade (slope) of a line, optionally split into segments -->
HTTP GET
https://cloud.thinkgeo.com/api/v1/elevation/grade/line

Parameters

  • wkt: The Well Known Text(WKT) of the line feature to get the grade.
  • srid: Optional. The SRID (coordinate system) of the input feature.
  • proj4String: Optional. The Proj4String (coordinate system) of the input feature.
  • NumberOfSegments: Optional. Splits the requested line into this many segments, then calculates elevation of each point joining the segments.
  • ElevationUnit: Optional. The unit of measure in which the elevation result is expressed. Defaults to “Feet”.
  • IntervalDistance: Optional. Splits the requested line into intervals of this length. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter.
  • IntervalDistanceUnit: Optional. The unit of measure in which the IntervalDistance is expressed. Defaults to “Feet”.

Consume From Client Side SDKs

A .Net SDK ThinkGeo Cloud Client is provided to consume the ThinkGeo Cloud Service as well. It's available on NuGet, here is the complete API List.

Sample Code:

ElevationClient elevationClient = new ElevationClient(clientId, clientSecret);
elevationClient.BaseUris.Add(new Uri(GisServerUri));
var response = elevationClient.GetElevationOfLineAsync(line, 3857, numberOfSegments: pointNumber, elevationUnit: DistanceUnit.Meter);

Native SDKs for Python, iOS and Android are coming soon.

Samples

thinkgeo_cloud_elevation.1551839301.txt.gz · Last modified: 2019/03/06 02:28 by tgwikiupdate