Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How would I test this service to find what it wants? http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/MapServer/exts/ElevationsSOE/ElevationLayers/1/GetElevations

It says geometries. But does it want a polyline or a point. I tried just putting a lat/long in the dialog box but no go.

What I have is a result from a densify service

void DensifyService_DensifyCompleted(object sender, GraphicsEventArgs e)
    {
        GraphicsLayer graphicsLayerVertices = MyMap.Layers["VerticesGraphicsLayer"] as GraphicsLayer;
        foreach (Graphic graphic in e.Results)
        {
            ESRI.ArcGIS.Client.Geometry.Polyline p = graphic.Geometry as ESRI.ArcGIS.Client.Geometry.Polyline;


            foreach (ESRI.ArcGIS.Client.Geometry.PointCollection pc in (graphic.Geometry as Polyline).Paths)
            {
                foreach (MapPoint point in pc)
                {
                    Graphic vertice = new Graphic()
                    {
                        Symbol = LayoutRoot.Resources["DefaultMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol,
                        Geometry = point
                    };
                    graphicsLayerVertices.Graphics.Add(vertice);
                }
            }

        }
        DensifyButton.IsEnabled = true;
    }

So what I am wanting to do is get each MapPoint geometries from the foreach (MapPoint point in pc)

And figure out how to get that into a list or whatever format is needed by the elevation service at the top of the question. Thanks.

share|improve this question
add comment

1 Answer

Have you seen this blog post and the sample included in the SOE source code? They got me on the right track

http://blogs.esri.com/Dev/blogs/apl/archive/2010/10/07/Elevation-Server-Object-Extension.aspx

http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=87BEC705-1422-2418-34B5-308930DE323A

A typical string that I am passing from my app is: GetElevationData?Extent={"spatialReference":{"wkid":2246},"xmax":1202184.46609375,"xmin":1194752.28390625,"ymax":248223.36453125,"ymin":240791.18234375}&Rows=51&Columns=51&f=json

share|improve this answer
    
+1 Too bad Esri doesn't provide a method to publish metadata for a GP service that would reveal this sort of thing. Instead, it's buried in a word document in the sample download. –  Kirk Kuykendall Feb 8 '12 at 14:59
    
So if I append this string "?lon=-95.380854&lat=29.754591&json" to the end of the GetElevationAtLonLat, I get a returned elevation. But I can't figure out what format I need to pass the geometry to the GetElevations url. Any thoughs? Thanks. –  Justin Feb 10 '12 at 14:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.