<?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 Reproject a Polygon in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reproject-a-polygon/m-p/10602#M256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a little confused by the output of reprojecting a polygon. I have a polygon created from a series of map points and i need to reproject the polygon from web mercator to CT State plane NAD83. I am able to get results back from the geometry service but the output is not consistent and it appears to have slightly shifted the polygon. I use the same coordinate latitude for two points, and the same longitude for two points to draw a box. The returned polygon does not have 2 coordinates with the same longitude or 2 with the same latitude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function projectPolygon(polygon:Polygon):void&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const projParam:ProjectParameters = new ProjectParameters();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projParam.geometries = [ polygon ];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projParam.outSpatialReference = new SpatialReference(2234);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.project(projParam, new AsyncResponder(project_resultHandlerPoly, project_faultHandlerPoly, polygon));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function project_resultHandlerPoly(result:Object, token:Object = null):void&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polygon:Geometry = (result as Array)[0] as Polygon;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add it to an arraycollection for later use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonResultAC[polygonResultAC.length - 1].polyState = polygon;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function project_faultHandlerPoly(fault:Fault, token:Object = null):void&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(fault.faultString + "\n\n" + fault.faultDetail, "project Fault " + fault.faultCode);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Oct 2014 19:41:18 GMT</pubDate>
    <dc:creator>AaronNash1</dc:creator>
    <dc:date>2014-10-14T19:41:18Z</dc:date>
    <item>
      <title>Reproject a Polygon</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/reproject-a-polygon/m-p/10602#M256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a little confused by the output of reprojecting a polygon. I have a polygon created from a series of map points and i need to reproject the polygon from web mercator to CT State plane NAD83. I am able to get results back from the geometry service but the output is not consistent and it appears to have slightly shifted the polygon. I use the same coordinate latitude for two points, and the same longitude for two points to draw a box. The returned polygon does not have 2 coordinates with the same longitude or 2 with the same latitude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function projectPolygon(polygon:Polygon):void&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const projParam:ProjectParameters = new ProjectParameters();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projParam.geometries = [ polygon ];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projParam.outSpatialReference = new SpatialReference(2234);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.project(projParam, new AsyncResponder(project_resultHandlerPoly, project_faultHandlerPoly, polygon));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function project_resultHandlerPoly(result:Object, token:Object = null):void&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polygon:Geometry = (result as Array)[0] as Polygon;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add it to an arraycollection for later use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonResultAC[polygonResultAC.length - 1].polyState = polygon;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function project_faultHandlerPoly(fault:Fault, token:Object = null):void&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(fault.faultString + "\n\n" + fault.faultDetail, "project Fault " + fault.faultCode);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 19:41:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/reproject-a-polygon/m-p/10602#M256</guid>
      <dc:creator>AaronNash1</dc:creator>
      <dc:date>2014-10-14T19:41:18Z</dc:date>
    </item>
  </channel>
</rss>

