User Tools

Site Tools


thinkgeo_cloud_elevation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
thinkgeo_cloud_elevation [2019/02/15 17:05]
benbai [Consume From Client Side SDKs]
thinkgeo_cloud_elevation [2019/03/31 16:38] (current)
brianr [Related Links]
Line 1: Line 1:
 ====== ThinkGeo Cloud Elevation ====== ====== ThinkGeo Cloud Elevation ======
-ThinkGeo Cloud Elevation provides ​the way to get elevation data from ThinkGeo ​GIS Server. Check out [[https://​samples.thinkgeo.com/​cloud/#​GetElevationAlongPath|Get Elevation Along Path]] for a quick look.+ThinkGeo Cloud Elevation provides ​way to get elevation data from the ThinkGeo ​Cloud service. Check out [[https://​samples.thinkgeo.com/​cloud/#​GetElevationAlongPath|Get Elevation Along Path]] for a quick look.
  
-The Elevation ​SDK support query elevation data by points, ​line and polygon based on SRTM and Ned13 elevation source data. And it return 3 types data+The Elevation ​service supports querying of elevation data by points, ​lines and polygons and uses SRTM and NED13 as its underlying ​elevation source data. It accepts three basic types of input
-  * For point Create a buffer and aggregate all points within buffer to create average for the elevation ​of the point+  * **Points** ​Returns ​the elevation ​at the specific coordinate requested, interpolated if necessary between the nearest values in the source data
-  * For line There are two ways to get the elevation data of the line. First, get the points on the line by setting the interval distanceThe otheris to take the points by setting the number of points ​to be fetched. Then query the elevation data of the point+  * **Lines** ​Returns ​the result ​of dividing ​the line into segments and getting the elevation of each division pointCan also return ​the slope grade in degrees of each segment To fine-tuneyou can specify either how many segments ​to divide ​the line into, or how long you want each segment ​to be. 
-  * For polygon ​By setting ​the interval distance, clip the polygon ​to the grids and get all the center of the grids where the polygon is locatedNow, determine whether ​the center points are within the surface or inside the surface (use improved arc-length method).+  * **Polygons** ​Returns ​the result of dividing ​the polygon ​into a grid and getting the elevation of the center ​point of each grid cell You can specify an interval distance to control how far apart each point will be from the others.
  
 ===== RESTful APIs ===== ===== RESTful APIs =====
  
-* //**Try it Online**:// All the ThinkGeo Cloud RESTful APIs can be tested online following the instructions below:  +* //**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 [[https://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_client_keys_guideline|ThinkGeo Cloud Client Keys Guideline]] see how to apply one. It's free for 60 days.   +  * Get a ThinkGeo Cloud Client Key. Check out [[https://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_client_keys_guideline|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 [[https://​cloud.thinkgeo.com/​help/​|ThinkGeo Cloud APIs]] and you are then free to play with all the APIs online. ​+  * Visit our [[https://​cloud.thinkgeo.com/​help/​|ThinkGeo Cloud API Explorer]], click the "​Authorize"​ button at the top and enter your client credentials. You are then free to play with all the APIs online. ​
  
 //​**ThinkGeo Cloud Elevation provides the following RESTful APIs**:// //​**ThinkGeo Cloud Elevation provides the following RESTful APIs**://
 +
 +==== Get Elevation of Point ====
 +Get the elevation at a single coordinate.
 +
 <code html> <code html>
-<!-- Get the elevation of a point --> 
 HTTP GET HTTP GET
 https://​cloud.thinkgeo.com/​api/​v1/​elevation/​{pointY},​{pointX} https://​cloud.thinkgeo.com/​api/​v1/​elevation/​{pointY},​{pointX}
 </​code>​ </​code>​
  
-//​**Parameters**//​ +//**URL Parameters**//​ 
-  * //**pointY**//: __Required__. ​The Y coordinate of the point. +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​pointY</span>: The Y coordinate of the point.</​span></​html>​ 
-  * //**pointX**//: __Required__. ​The X coordinate of the point.+  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​pointX</span>: The X coordinate of the point.</​span></​html>​
  
 +Visit [[https://​cloud.thinkgeo.com/​help/#/​Elevation/​GetElevationOfPointV1|GetElevationOfPoint]] and click "Try It Out" to test this API online. ​
  
-  ​*  ​Hit //​**Try ​it Out**// ​button below [[https://​cloud.thinkgeo.com/​help/#/​Elevation/​GetElevationOfPointV1|GetElevationOfPoint]] to test it online. ​+==== Get Elevation of Points (Batch Request) ==== 
 +Get the elevation for each point in a batch of points (up to 1,000 points maximum per batch). 
 + 
 +<code html> 
 +HTTP POST 
 +https://​cloud.thinkgeo.com/​api/​v1/​elevation/​point/​multi 
 +</​code>​ 
 +//**POST Body (Content-Type:​ application/​json)**//​ 
 +<code javascript>​ 
 +
 +  
 +    "​coord":​ "​string",​ // The coordinates of the point. The format is: y,x. 
 +    "​elevationUnit":​ "​string"​ // Optional. The measurement unit in which the elevation result is expressed. Defaults to "​Feet"​. 
 +    "​srid":​ int, // Optional. The SRID of the input feature'​s coordinate system. Defaults to 4326. 
 +    "​proj4String":​ "​string",​ // Optional. The Proj4 string of the input feature'​s coordinate system. 
 +  } 
 +]</​code>​ 
 +Each item in the batch can locally override a parameter specified on the request URL (for instance, if you have a batch of points that use multiple coordinate systems). 
 + 
 +//**URL Parameters**//​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​srid:</​span>​ <​em>​Optional.</​em>​ The SRID of the input feature'​s coordinate system. Defaults to 4326.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​proj4String:</​span>​ <​em>​Optional.</​em>​ The Proj4 string of the input feature'​s coordinate system.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​ElevationUnit:</​span>​ <​em>​Optional.</​em>​ The measurement unit in which the elevation result is expressed. Defaults to "​Feet"​.</​span></​html>​ 
 + 
 +Visit [[https://​cloud.thinkgeo.com/​help/#/​Elevation/​GetElevationsOfPointsBatchV1|GetElevationsOfPointsBatch]] and click "Try It Out" to explore this API online.  
 + 
 +==== Get Elevation of Line ==== 
 +Get the elevation of each sample point along a line. 
 + 
 +<code html> 
 +HTTP GET 
 +https://​cloud.thinkgeo.com/​api/​v1/​elevation/​line 
 +</​code>​ 
 + 
 +//**URL Parameters**//​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​wkt:</​span>​ The Well Known Text (WKT) of a line feature to get the elevation.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​srid:</​span>​ <​em>​Optional.</​em>​ The SRID of the input feature'​s coordinate system. Defaults to 4326.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​proj4String:</​span>​ <​em>​Optional.</​em>​ The Proj4 string of the input feature'​s coordinate system.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​NumberOfSegments:</​span>​ <​em>​Optional.</​em>​ Splits the requested line into this many segments, then calculates elevation of each point joining the segments.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​ElevationUnit:</​span>​ <​em>​Optional.</​em>​ The unit of measure in which the elevation result is expressed. Defaults to "​Feet"​.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​IntervalDistance:</​span>​ <​em>​Optional.</​em>​ Splits the requested line into intervals of this length. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​IntervalDistanceUnit:</​span>​ <​em>​Optional.</​em>​ The unit of measure in which the IntervalDistance is expressed. Defaults to "​Feet"​.<​/span><​/html> 
 + 
 + 
 +Visit [[https://​cloud.thinkgeo.com/​help/#/​Elevation/​GetElevationOfLineV1|GetElevationOfLine]] and click "Try It Out" to explore this API online.  
 + 
 +==== Get Elevation of Area ==== 
 +Get the elevation of a matrix of points within an area. 
 +   
 +<code html> 
 +HTTP GET 
 +https://​cloud.thinkgeo.com/​api/​v1/​elevation/​area 
 +</​code>​ 
 + 
 +//**URL Parameters**//​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​wkt:</​span>​ The Well Known Text (WKT) of a polygon feature to get the elevation.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​srid:</​span>​ <​em>​Optional.</​em>​ The SRID of the input feature'​s coordinate system. Defaults to 4326.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​proj4String:</​span>​ <​em>​Optional.</​em>​ The Proj4 string of the input feature'​s coordinate system.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​ElevationUnit:</​span>​ <​em>​Optional.</​em>​ The unit of measure in which the elevation result is expressed. Defaults to "​Feet"​.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​IntervalDistance:</​span>​ <​em>​Optional.</​em>​ 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.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​IntervalDistanceUnit:</​span>​ <​em>​Optional.</​em>​ The unit of measure in which the IntervalDistance is expressed. Defaults to "​Feet"​.</​span></​html>​ 
 + 
 + 
 +Visit [[https://​cloud.thinkgeo.com/​help/#/​Elevation/​GetElevationOfAreaV1|GetElevationOfArea]] and click "Try It Out" to explore this API online.  
 + 
 +==== Get Grade of Line ==== 
 +Get the grade (slope) in degrees of a line, optionally split into segments. 
 + 
 +<code html> 
 +HTTP GET 
 +https://​cloud.thinkgeo.com/​api/​v1/​elevation/​grade/​line 
 +</​code>​ 
 + 
 +//**URL Parameters**//​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​wkt:</​span>​ The Well Known Text(WKT) of the line feature to get the grade.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​srid:</​span>​ <​em>​Optional.</​em>​ The SRID of the input feature'​s coordinate system. Defaults to 4326.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​proj4String:</​span>​ <​em>​Optional.</​em>​ The Proj4 string of the input feature'​s coordinate system.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​NumberOfSegments:</​span>​ <​em>​Optional.</​em>​ Splits the requested line into this many segments, then calculates elevation of each point joining the segments.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​ElevationUnit:</​span>​ <​em>​Optional.</​em>​ The unit of measure in which the elevation result is expressed. Defaults to "​Feet"​.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​IntervalDistance:</​span>​ <​em>​Optional.</​em>​ Splits the requested line into intervals of this length. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter.</​span></​html>​ 
 +  * <​html><​span class="​api-parameter"><​span class="​api-parameter-name">​IntervalDistanceUnit:</​span>​ <​em>​Optional.</​em>​ The unit of measure in which the IntervalDistance is expressed. Defaults to "​Feet"​.</​span></​html>​ 
 + 
 + 
 +Visit [[https://​cloud.thinkgeo.com/​help/#/​Elevation/​GetGradeOfLineV1|GetGradeOfLine]] and click "Try It Out" ​to explore this API online. ​
  
 ===== Consume From Client Side SDKs ===== ===== Consume From Client Side SDKs =====
  
-.Net SDK //ThinkGeo Cloud Client// ​is provided ​to consume the ThinkGeo Cloud Service as well. It's available on [[https://​www.nuget.org/​packages/​ThinkGeo.GisServer.Client|NuGet]], ​here is the complete ​[[thinkgeo_cloud_.net_client_apis|API ​List]]. +Our .NET SDK //ThinkGeo Cloud Client// ​makes it easy to consume ​all of the ThinkGeo Cloud services in your applications. It's available on [[https://​www.nuget.org/​packages/​ThinkGeo.Cloud.Client|NuGet]].  IntelliSense hints will help you get startedand you can also refer to the [[thinkgeo_cloud_.net_client_apis|ThinkGeo Cloud Client ​API list]] for details. 
 + 
 +At the NuGet Package Manager terminal, you can install this package by running the command: ''​Install-Package ThinkGeo.Cloud.Client -Version VERSION_TO_BE_INSTALLED''​. ​ You can also check out ThinkGeo on GitHub for [[https://​github.com/​ThinkGeo?​utf8=%E2%9C%93&​q=cloud&​type=&​language=|samples utilizing the ThinkGeo Cloud Client]]. 
 + 
 +**Sample Code** 
 + 
 +This snippet uses the .NET ThinkGeo Cloud Client SDK to get the elevation of a line by dividing it into 15 segments and taking samples at each segment point. The response is expressed in meters.
  
-Sample Code:  
 <code csharp> <code csharp>
-ElevationClient elevationClient = new ElevationClient(clientIdclientSecret); +using ThinkGeo.Cloud;​ 
-elevationClient.BaseUris.Add(new Uri(GisServerUri)); +using ThinkGeo.MapSuite.Shapes;​ 
-var response = elevationClient.GetElevationOfLineAsync(line, 3857, numberOfSegments: ​pointNumber, elevationUnit:​ DistanceUnit.Meter);​+ 
 +LineShape line = new LineShape("​LINESTRING(-12359831.643855993 4167388.583607652,​-12358190.636404995 4167794.6553204176)"​);​ 
 +ElevationClient elevationClient = new ElevationClient("Your Client ID""Your Client Secret"​); 
 +elevationClient.BaseUris.Add(new Uri("​https://​cloud.thinkgeo.com"​)); 
 +var response = elevationClient.GetElevationOfLine(line, 3857, numberOfSegments: ​15, elevationUnit:​ DistanceUnit.Meter);​
 </​code>​ </​code>​
  
Line 47: Line 143:
 Desktop Sample: Desktop Sample:
   * [[https://​github.com/​ThinkGeo/​ElevationStatisticsSample-ForWpf]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]   * [[https://​github.com/​ThinkGeo/​ElevationStatisticsSample-ForWpf]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
 +
 +Web Sample:
 +
 +<code csharp>
 +
 +Coming soon
 +
 +</​code>​
 +
 +
 +Mobile Sample: ​
 +<code csharp>
 +
 +Coming soon
 +
 +</​code>​
 +
 +===== Related Links =====
 +  * [[thinkgeo_cloud_geocoding|ThinkGeo Cloud Geocoding]]
 +  * [[thinkgeo_cloud_maps_wms|ThinkGeo Cloud Maps WMS]]
 +  * [[thinkgeo_cloud_maps_vector_tiles|ThinkGeo Cloud Maps Vector Tiles]]
 +  * [[thinkgeo_cloud_maps_raster_tiles|ThinkGeo Cloud Maps Raster Tiles]]
 +  * [[thinkgeo_cloud_reverse_geocoding|ThinkGeo Cloud Reverse Geocoding]]
 +  * [[thinkgeo_cloud_projection|ThinkGeo Cloud Projection]]
 +  * [[thinkgeo_cloud_colors|ThinkGeo Cloud Colors]]
 +  * [[thinkgeo_cloud_timezone|ThinkGeo Cloud Time Zones]]
  
thinkgeo_cloud_elevation.1550250317.txt.gz · Last modified: 2019/02/15 17:05 by benbai