Select to view content in your preferred language

Calculate Slope and Profile

1271
2
03-02-2011 06:29 AM
dcopple
Frequent Contributor
I am trying to write some Javascript to use the ESRI profile service at http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/GPServer/P...  I cannot find any examples on using this tool in the Javascript API.  I think I found one for flex, so am trying to break that apart.  I can calculate an x, y for a point.  Want to draw two points, figure out the distance, and the z values for the points to use in a slope calculation.  I want the slope calculation for input into other functions.  Does anyone have an idea how to calculate that z value, is it at the profile service, or is there another elevation service I should try to use.  This might be a nice addition to the ESRI geometry service which currently calculates x,y values for points, maybe the addition of a z value in that geometry would be nice too.
0 Kudos
2 Replies
BillDaigle
Frequent Contributor
The response from the sample profile service is a picture, not actual elevation values. 

Here is a sample usage.

If you want to perform your own analysis (or create your own graph) you will need to access some elevation data directly. I'm not sure what the best source would be.  ESRI host a globe service at  \\fwphlncmstst001\gis  but I don't think this is queryable via javascript.  Google host elevation data, but I don't know if you use it outside of the google maps API. 

Any other suggestions?
0 Kudos
dcopple
Frequent Contributor
I've noticed that one, still not quite sure how to do the javascripting.  I think an additional geometry tool that ESRI should ad for the future is the ability to get the Z value for a point.  Much like the get x,y geometry....
0 Kudos