<?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: Geometry Service Project a point in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207589#M4811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Casey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; When ever I needed to use a WKT in a geometry service projection it has always worked fine. I do this in my Shapefile widget as there is now way to compare if a WKT from the shapes .prj file is the same as the maps WKID. This is what I am doing. Nothing real different from yours just less lines and if I don't have a WKTstr then just use the maps WKID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;const shpSpatialRef:SpatialReference = (WKTstr) ? new SpatialReference(Number.NaN, WKTstr) : map.spatialReference;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 22:09:18 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2014-02-11T22:09:18Z</dc:date>
    <item>
      <title>Geometry Service Project a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207586#M4808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to project an array of points from a custom coordinate system the web mercator.&amp;nbsp; I am using the geometry service project method and am coming up blank with how to set the input spatial reference for the geometries. The rest endpoint has a property for input spatial reference and output spatial reference, but the project parameters support class does not. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
private function gpResult(event:GeoprocessorEvent):void{
 var geometriesToProject:Array = new Array();
&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; 
 for each(var result:ParameterValue in event.executeResult.results){
&amp;nbsp; for each(var g:Graphic in result.value.features){
&amp;nbsp;&amp;nbsp; geometriesToProject.push(g.geometry);&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;&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;&amp;nbsp; 
&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 }
 if(geometriesToProject.length &amp;gt; 0){
&amp;nbsp; var wkid:Number = 102100; 
&amp;nbsp; var projectionSR:SpatialReference = new SpatialReference(wkid);
&amp;nbsp; var projectParams:ProjectParameters = new ProjectParameters();
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; projectParams.geometries = geometriesToProject;
&amp;nbsp; projectParams.outSpatialReference = projectionSR;
&amp;nbsp; geometryService.project(projectParams);
 }
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 19:12:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207586#M4808</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2014-02-11T19:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry Service Project a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207587#M4809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Casey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The input spatial reference is automatically obtained from the SR of the input geometries, thus no need to specify.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 19:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207587#M4809</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-02-11T19:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry Service Project a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207588#M4810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert, but it appears that since I am using a non well-known spatial reference, it was not coming across with the geoprocessing results.&amp;nbsp; I made a change to my result processing and was able to get it to work.&amp;nbsp; But the real problem remains, my geoprocessing service will not return the results in the desired spatial reference.&amp;nbsp; I have a ticket open with Esri, but they don't seem to understand the issue.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private function gpResult(event:GeoprocessorEvent):void{
 var geometriesToProject:Array = new Array();
 
 &lt;SPAN style="color: #FF0000; font-style: italic;"&gt;var wkid:Number = NaN; 
 var wkt:String = 'PROJCS["IPTM",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.000,298.25722210],TOWGS84[0.0000,0.0000,0.0000,0.000000,0.000000,0.000000,0.00000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640416.667],PARAMETER["False_Northing",328083.333],PARAMETER["Scale_Factor",0.999600000000],PARAMETER["Central_Meridian",-115.50000000000000],PARAMETER["Latitude_Of_Origin",42.00000000000000],UNIT["Foot_US",0.30480060960122]]';
 var projectionSR:SpatialReference = new SpatialReference(wkid, wkt);&lt;/SPAN&gt;
 
 for each(var result:ParameterValue in event.executeResult.results){
&amp;nbsp; for each(var g:Graphic in result.value.features){
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #FF0000; font-style: italic;"&gt;g&lt;SPAN style="font-style:italic;"&gt;.&lt;/SPAN&gt;geometry.spatialReference = projectionSR;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; geometriesToProject.push(g.geometry);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; } 
 }
 if(geometriesToProject.length &amp;gt; 0){
&amp;nbsp; var projectParams:ProjectParameters = new ProjectParameters();
&amp;nbsp; 
&amp;nbsp; projectParams.geometries = geometriesToProject;
&amp;nbsp; projectParams.outSpatialReference = myMap.spatialReference;
&amp;nbsp; 
&amp;nbsp; geometryService.project(projectParams);
 }
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:15:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207588#M4810</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2021-12-11T10:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry Service Project a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207589#M4811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Casey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; When ever I needed to use a WKT in a geometry service projection it has always worked fine. I do this in my Shapefile widget as there is now way to compare if a WKT from the shapes .prj file is the same as the maps WKID. This is what I am doing. Nothing real different from yours just less lines and if I don't have a WKTstr then just use the maps WKID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;const shpSpatialRef:SpatialReference = (WKTstr) ? new SpatialReference(Number.NaN, WKTstr) : map.spatialReference;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 22:09:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/geometry-service-project-a-point/m-p/207589#M4811</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-02-11T22:09:18Z</dc:date>
    </item>
  </channel>
</rss>

