<?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: GeometryService: Measuring area and length of a polygon in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331673#M30681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a legitimate scenario, but even the default draw tool example allows you to. &lt;/P&gt;&lt;P&gt;&lt;A href="http://developers.arcgis.com/javascript/samples/toolbar_draw/"&gt;http://developers.arcgis.com/javascript/samples/toolbar_draw/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a work around, on draw complete, if the graphic isn't an actual polygon, I cancel the draw and do not add the graphic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jan 2016 21:00:38 GMT</pubDate>
    <dc:creator>TyroneBiggums</dc:creator>
    <dc:date>2016-01-19T21:00:38Z</dc:date>
    <item>
      <title>GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331662#M30670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a GeometryService to measure the length and area of a polygon. Everything is fine unless my polygon is a single line (here me out). I start to draw a polygon by clicking the map then double click the map after just forming a line. There become two line segments and the geometry.ring has 3 coordinates ([-3184781.0569155607,5458796.020593386,1746324.5118164345,4813056.005640387,-3184781.0569155607,5458796.020593386]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results of areas-and-lengths-complete are that area and length are 0. Area, sure. Makes sense. But length is 0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, I know that no user SHOULD do that. They should just use a polyline if they want a line. But, is this a normal/expected result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 19:56:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331662#M30670</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-07T19:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331663#M30671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a wild guess is that at least 3 different points are needed since in most of Arc* world a triangle (aka 3 distinct points) needs 4 points to complete with the first and last duplicates and with the points in clockwise order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 20:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331663#M30671</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-07T20:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331664#M30672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand that is a requirement to make a polygon, but there is still something to measure in length, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 20:32:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331664#M30672</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-07T20:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331665#M30673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyrone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Ya, I would kind of figure that it would bomb on the fact that there is not a valid polygon. If it was just a polyline then you would be using GeometryService.lengths not areasAndLengths.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 20:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331665#M30673</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-12-07T20:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331666#M30674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And that's exactly the problem. I am using just lengths for a polyline. If the user intends on using that polygon as a polyline, they won't understand why there is no length. On the back end, I'm using length if the geometry.type is a polyline. And of course, fake polygon or not, the geometry.type is still polygon on this one line 'polygon'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 20:44:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331666#M30674</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-07T20:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331667#M30675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyrone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; How about using Polygon.getExtent and check for a zero width or length as a check?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 20:48:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331667#M30675</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-12-07T20:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331668#M30676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sadly Arc* stuff often defaults to 0 when either creating objects (ie a null point still has coordinates of 0,0) or measuring parameters.&amp;nbsp; Do what Robert says...check the properties of the expected geometries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 21:01:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331668#M30676</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-07T21:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331669#M30677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Polygon.getExtent().getWidth() is well over 0 and Polygon.getExtent.getHeight() is just over 0. miny and maxy are so close to being the same number, but since they are different, we don't have any 0 values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:25:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331669#M30677</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-08T13:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331670#M30678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyrone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Well that was not what I was expecting. Would that small difference in the miny and maxy (or in other cases the minx and maxx) be enough for you to setup a coding check against? Short of that you would need to report this to tech support and see if you can get someone to escalate it to the dev team to be addressed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:36:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331670#M30678</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-12-08T13:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331671#M30679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The difference in min/max is relative to the map scale, and spatial reference. It would have to be a pretty smart checker just to see if a polygon with 1 line should actually be a line. I'll have this issue brought up to someone in Esri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 14:02:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331671#M30679</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-08T14:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331672#M30680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyrone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The length operation should return a value that is not zero, but I'm not sure how useful it would be since it is expected to be twice the length of the line (the perimeter of the invalid polygon). If you simplify the geometry prior to inputting it to the lengths function then you will get a result of 0 for the length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a scenario when you would want a polygon with two vertices as opposed to a line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 20:51:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331672#M30680</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2016-01-19T20:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService: Measuring area and length of a polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331673#M30681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a legitimate scenario, but even the default draw tool example allows you to. &lt;/P&gt;&lt;P&gt;&lt;A href="http://developers.arcgis.com/javascript/samples/toolbar_draw/"&gt;http://developers.arcgis.com/javascript/samples/toolbar_draw/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a work around, on draw complete, if the graphic isn't an actual polygon, I cancel the draw and do not add the graphic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 21:00:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-measuring-area-and-length-of-a/m-p/331673#M30681</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-01-19T21:00:38Z</dc:date>
    </item>
  </channel>
</rss>

