I have a silverlight application that allows the user to select points to make a polyline. The polyline is densified per the users input (say every two feet). The new points are sent to an esri elevation service to get the elevations at those points. I have the lat/long/elevation in a c# dictionary with a incremented number as the key.
What is the best way to send this over to a geoprocessing service and what should I have my gp service take? I want to send something lightweight like json but I haven't fused with json much (except for trying to deserialize it with c# and failing so I just parsed the return string myself using c#). If I call the gp service (similar to how my code is calling the densify and elevation services, what does the gp service need to take? Are there alternatives?
What we will be doing is finding the average percent slope across the polyine. Once the average percent slope is found, we need to generate a polyline shapefile or feature class with the associated percent slope attributed and we'll send this over to autocad folks.
EDIT: Here's my code..!
//This is defined as a constant string at the top of the Densify class
Densify.SUMBITGEOMETRY = "http://gis.mustangeng.com/ArcGIS/rest/services/Geoprocessing/gpServiceTest/GPServer/gpService/submitJob?Input=";
string dog = string.Join(",", colorList.ToArray());
//String.Join(",", dictElevat.Keys.Select(o => o.ToString()).ToArray());
//HtmlPage.Window.Alert(string.Format("Count: {0}", dog));
HtmlPage.Window.Alert(String.Join(",", dictElevat.Keys.Select(o => o.ToString()).ToArray()));
//UriBuilder builder1 = new UriBuilder(Densify.SUBMITGEOMETRY);
//builder1.Query = string.Format(String.Join(",", dictElevat.Keys.Select(o => o.ToString()).ToArray()));
WebClient webClient1 = new WebClient();
webClient1.Headers["Content-Type"] = "text/plain";
Uri serviceUri = new Uri(Densify.SUBMITGEOMETRY);
string s = String.Join(",", dictElevat.Keys.Select(o => o.ToString()).ToArray());
webClient1.UploadStringAsync(serviceUri, "POST", s);
HtmlPage.Window.Alert(serviceUri.ToString());