how to create own surface profile service?

2631
19
04-30-2010 01:53 AM
Divyaprasad
New Contributor II
Hi

The GPservice used to get surface profile in ESRI samples is " http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/GPServer/P..."

How do i create my own service to get the same result with my data than ESRI sample data..

Or is it possible to get surface profile from my data using esri's profileservice? cos when i tried i ended up getting errors. im confused whether its my data or service.. im using DEM.

could somebody please give solution for this please. Im totaly messed up.
19 Replies
KarenRobine
Occasional Contributor II
I just found this:

http://www.forumsig.org/archive/index.php/t-28565.html

related to the initial question of using your own data.   I haven't delved in yet, but will be in the future...

Karen
0 Kudos
KevinHibma
Esri Regular Contributor
Im only seeing this thread now - there are a lot of solutions to this problem.

Of course everyone has seen the SOE which is available as a sample from the Applications Prototype lab:
Configurable SOE: http://www.arcgis.com/home/item.html?id=3b65b141041044ca97d83eb8264da08c
Basic Viewer to go with the SOE: http://www.arcgis.com/apps/OnePane/basicviewer/profile.html

kss has a nice script to perform this analysis above. (also using matplotlib to draw the output). This should work real well at 10.0 but be sure to install matplotlib on your server machine. At 10.1 matplotlib comes with ArcGIS (Desktop and Server)

New at 10.1 is a tool "Stack Profile". This tool produces a table of X,Y,Z and optional graph output. Please note that the graphing component is not supported in Server, so you can use the tool to produce your table of X,Y,Z.
http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#//00q9000000mm000000
I've attached a HTML file which consumes the "Stack Profile" service.
Basically it allows you to draw a line on a map, and looks for the result table. It builds up some arrays and plots the chart. (Makes use of JavaScript API 2.7)
Make use to update the references to your server.

Note, the attached web page and the one referenced above are pretty similar to each other and one could extend/modify either page to suit individual needs.
The difference is how you "draw" the profile : does the service create an image, or does the client render an image with X,Y,Z information?
KarenRobine
Occasional Contributor II
Hi Kevin:
Thanks so much for the response. That 10.1 tool looks interesting.

But back to the question at hand: 
We are looking for a way to replace the data utilized in the SOE, or the ProfileService (at http://samplesserver2.arcgisonline.com/arcgis/services   Elevation/ESRI_Elevation_World)
I also checked out:
http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/MapServer
and it looks like the data it uses for this is a Global Elevations layer, which doesn't look to be quite precise enough for my purposes.
The SOE that's at
http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=87BEC705-1422-2418-34B5-...

may handle this, but the source provided is in Java (and I haven't researched the code enough yet to see if it supports what I'm asking, or if its only a client app).  So am wondering if that's the only solution for the problem?  (ps. would be nice to get the model associated with the ProfileService?)..

Thanks again....
0 Kudos
KevinHibma
Esri Regular Contributor
Karen,

In the instructions to the SOE setup it explains you attach the SOE to a map service with a single band raster layer which will act as your elevation service.
So yes, you can and must use your own data to set it up. The SOE gets tied to that map service.


SETUP
1) Create a Map Document (mxd) with at least one elevation layer; the elevation layer must be a single band raster layer.  Other types of layers are ok to use because the SOE will only expose a resource for the single band raster layers.

2) Publish the Map Document as a Map Service and then stop the map service after it has been successfully published.

3) Right-click on the map service and select �??Service Properties�??.  In the �??Map Service Properties�?? dialog, select the �??Capabilities�?? tab. 

4) From the list of capabilities, check on the new �??Get Elevations�?? capability and click the OK button.

5) Start the map service.

6) Go to the Services Directory admin page and clear the REST cache.

7) Navigate to the Services Directory page of the Map Service and you�??ll now see the Elevations SOE listed at the bottom of the page in the �??SUPPORTED EXTENSIONS�?? section.  Follow the available links to view the available REST resources and operations for the Elevations SOE.


EDIT:
Note, the SOE is custom code: there is no "model" which produces the result. The code (I could only imagine) would be something similar to the code in the above Python script.
0 Kudos
KarenRobine
Occasional Contributor II
Thanks Kevin.. That's perfect..  Should have read those direction first before responding  (oops)...

Now I get to see if the Elevation layer can be a WCS type of layer (which is what ours will be)..
0 Kudos
KarenRobine
Occasional Contributor II
Also, is there a .NET version of that same SOE out there anywhere?  The only source for the SOE is a Java-based version. All the rest of the stuff in that .zip file are clients.
0 Kudos
DrewDowling
Occasional Contributor III
I would like to second Karen's request for .NET source code for the elevation profile SOE if it exists.
0 Kudos
nicogis
MVP Frequent Contributor
news: esri is coming out with the new version x 10.1 and the included source net and java
here you can see my preview beta http://sit.sistemigis.it/Samples/Elevations/
however you download esri version ...
0 Kudos
nicogis
MVP Frequent Contributor
news: esri is coming out with the new version x 10.1 and the included source net and java
here you can see my preview beta http://sit.sistemigis.it/Samples/Elevations/
however you download esri version ...


Now you can download new version 10.1 soe elevations:
http://www.arcgis.com/home/item.html?id=60bf17f2d59441839135adc25654a7d9
0 Kudos
PranaviGaddipati
New Contributor II
Hi.
I'm working with ArcGIS 10.1 and I'm using the stack profile tool in the python script. It is working perfectly fine but the sampling distance used to get the values is by default the raster pixel size. For me, it is 25.

But I want it to be a configurable parameter while using this stack profile tool. The python script for this tool doesn't have an input option as such for the sampling distance. The current inputs I'm using are the polyline i'm drawing and the raster.

Please let me know if there is any alternative for this through the python script?
0 Kudos