<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Geoprocessing results in wrong projection in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34717#M909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also, I'm somewhat new to fiddler.&amp;nbsp; What tab should I be looking at to help figure this out?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2011 12:36:17 GMT</pubDate>
    <dc:creator>DavidChevrier</dc:creator>
    <dc:date>2011-07-28T12:36:17Z</dc:date>
    <item>
      <title>Geoprocessing results in wrong projection</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34714#M906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&amp;nbsp; I've created a geoprocessing service that takes a few string inputs and creates a random point feature class (well, it's a little more complex than that, but that is basically what it does).&amp;nbsp; It works fine inside of arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then created a test page using the new beta version of the ArcGIS Viewer for Silverlight, adding the tool.&amp;nbsp; It also works perfectly and displays the results exactly where they should be.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I'm creating a custom silverlight page for the tool.&amp;nbsp; I followed all the example code I've seen and while it correctly makes the points (as I can see in the arcgisjobs folder), it displays them all around 0,0 (off of Africa).&amp;nbsp; So it seems the projection is off.&amp;nbsp; The app uses the regular web_mercator_aux, but my geoprocessing script uses a geographic coordinate system (and I need to keep it as such, gcs_north_american_1983).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried setting the task's "OutputSpatialReference" and "ProcessSpatialReference" to mymap.SpatialReference as well setting the graphics' geometry.SpatialReference to the same thing, all with no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, 2 questions.&amp;nbsp; One, since the viewer displays them correctly, any chance we could get at the outputted source code??&amp;nbsp; And two, more realistically, any idea how I can convert the points to the correct system?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private void GeoprocessorTask_GetResultDataCompleted(object sender, GPParameterEventArgs e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GraphicsLayer graphicsLayer = MyMap.Layers["StationLayer"] as GraphicsLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPFeatureRecordSetLayer gpLayer = e.Parameter as GPFeatureRecordSetLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (Graphic graphic in gpLayer.FeatureSet.Features)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Symbol = LayoutRoot.Resources["RedMarkerSymbol"] as Symbol;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer.Graphics.Add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 19:06:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34714#M906</guid>
      <dc:creator>DavidChevrier</dc:creator>
      <dc:date>2011-07-27T19:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing results in wrong projection</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34715#M907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By setting the task's 'OutputSpatialReference' to the map spatial reference i.e. a web mercator projection should be OK and your task should return features using this spatial reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using Fiddler to look at the GeoProcessing request and at the result, this may give a clue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else you might convert the coordinates (using ESRI.ArcGIS.Client.Projection.&lt;/SPAN&gt;&lt;SPAN style="color:#2b91af;"&gt;WebMercator&lt;/SPAN&gt;&lt;SPAN&gt;) in your GeoprocessorTask_GetResultDataCompleted method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 07:05:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34715#M907</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-07-28T07:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing results in wrong projection</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34716#M908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply, however I did try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_geoprocessorTask.OutputSpatialReference = MyMap.SpatialReference;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;already and it didn't work.&amp;nbsp;&amp;nbsp; I've also tried adding the geometry line here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private static WebMercator _mercator = new WebMercator();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; foreach (Graphic graphic in gpLayer.FeatureSet.Features)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Symbol = LayoutRoot.Resources["RedMarkerSymbol"] as Symbol;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Geometry = _mercator.FromGeographic(graphic.Geometry);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; graphicsLayer.Graphics.Add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But then it just gets in a loop and never outputs anything.&amp;nbsp; How does the Viewer for Silverlight handle the point results of a geoprocess?&amp;nbsp; (Since that outputs the results correctly.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 12:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34716#M908</guid>
      <dc:creator>DavidChevrier</dc:creator>
      <dc:date>2011-07-28T12:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing results in wrong projection</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34717#M909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also, I'm somewhat new to fiddler.&amp;nbsp; What tab should I be looking at to help figure this out?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 12:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34717#M909</guid>
      <dc:creator>DavidChevrier</dc:creator>
      <dc:date>2011-07-28T12:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing results in wrong projection</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34718#M910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And I figured it out...&amp;nbsp; it was dumb too.&amp;nbsp; Setting the OutputSpatialReference did work, it was WHERE I was setting it.&amp;nbsp; I was doing it in the MainPage() function (before the map was even set), so it was setting it to a null projection.&amp;nbsp; I set it after the map was drawn and it works fine.&amp;nbsp; Thanks for the help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:06:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geoprocessing-results-in-wrong-projection/m-p/34718#M910</guid>
      <dc:creator>DavidChevrier</dc:creator>
      <dc:date>2011-07-28T13:06:28Z</dc:date>
    </item>
  </channel>
</rss>

