<?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 geometry task, measure distance in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometry-task-measure-distance/m-p/99648#M2476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my map is in WKID 102100.&amp;nbsp; the units of that spatial reference are meters, i believe.&amp;nbsp; my area of interest is the south central US.&amp;nbsp; when i measure using a Geometry Service, the returned meters seem to be off by quite a bit.&amp;nbsp; measuring a straight line from lafayette, la to baton rouge returns 101,000 meters.&amp;nbsp; it should be closer to about 87,000 meters.&amp;nbsp;&amp;nbsp; i don't project to a new spatial reference before measuring since the distance units are already meters.&amp;nbsp; is there a different step i'm missing or am i doing something else wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;btw, i'm using the old fashioned Geometry service method of measuring because customizing the persistence behavior of the Action method of measuring isn't possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Private Sub MyDrawObject_DrawComplete(ByVal sender As Object, ByVal args As DrawEventArgs)

&amp;nbsp; Dim geometryService As New Tasks.GeometryService(_ServerName &amp;amp; "/ArcGIS/rest/services/Geometry/GeometryServer")
&amp;nbsp; Dim graphic As New Graphic

&amp;nbsp; Select Case _measuremode
&amp;nbsp;&amp;nbsp; Case 2 'Polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim polyline As ESRI.ArcGIS.Client.Geometry.Polyline = TryCast(args.Geometry, ESRI.ArcGIS.Client.Geometry.Polyline)
&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline.SpatialReference = Map.SpatialReference '102100
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Symbol = DefaultLineSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Geometry = polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler geometryService.LengthsCompleted, AddressOf GeometryService_LengthsCompleted
&amp;nbsp;&amp;nbsp; Case 3 'Polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim polygon As ESRI.ArcGIS.Client.Geometry.Polygon = TryCast(args.Geometry, ESRI.ArcGIS.Client.Geometry.Polygon)
&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon.SpatialReference = Map.SpatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Symbol = DefaultFillSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Geometry = polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler geometryService.AreasAndLengthsCompleted, AddressOf GeometryService_AreasAndLengthsCompleted
&amp;nbsp; End Select

&amp;nbsp; Dim graphicsLayer As GraphicsLayer = TryCast(Map.Layers("MeasureGraphicsLayer"), GraphicsLayer)
&amp;nbsp; graphicsLayer.Graphics.Add(graphic)

&amp;nbsp; Dim graphicList As New List(Of Graphic)()
&amp;nbsp; graphicList.Add(graphic)

&amp;nbsp; Select Case _measuremode
&amp;nbsp;&amp;nbsp; Case 2 'Polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.LengthsAsync(graphicList)
&amp;nbsp;&amp;nbsp; Case 3 'Polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.AreasAndLengthsAsync(graphicList)
&amp;nbsp; End Select
 End Sub

 Private Sub GeometryService_LengthsCompleted(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.LengthsEventArgs)
&amp;nbsp; _meters = args.Results(0)
&amp;nbsp; _kms = args.Results(0) * 0.001
&amp;nbsp; DisplayLinearResult()
 End Sub&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 May 2010 11:12:30 GMT</pubDate>
    <dc:creator>LanceCrumbliss</dc:creator>
    <dc:date>2010-05-14T11:12:30Z</dc:date>
    <item>
      <title>geometry task, measure distance</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometry-task-measure-distance/m-p/99648#M2476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my map is in WKID 102100.&amp;nbsp; the units of that spatial reference are meters, i believe.&amp;nbsp; my area of interest is the south central US.&amp;nbsp; when i measure using a Geometry Service, the returned meters seem to be off by quite a bit.&amp;nbsp; measuring a straight line from lafayette, la to baton rouge returns 101,000 meters.&amp;nbsp; it should be closer to about 87,000 meters.&amp;nbsp;&amp;nbsp; i don't project to a new spatial reference before measuring since the distance units are already meters.&amp;nbsp; is there a different step i'm missing or am i doing something else wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;btw, i'm using the old fashioned Geometry service method of measuring because customizing the persistence behavior of the Action method of measuring isn't possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Private Sub MyDrawObject_DrawComplete(ByVal sender As Object, ByVal args As DrawEventArgs)

&amp;nbsp; Dim geometryService As New Tasks.GeometryService(_ServerName &amp;amp; "/ArcGIS/rest/services/Geometry/GeometryServer")
&amp;nbsp; Dim graphic As New Graphic

&amp;nbsp; Select Case _measuremode
&amp;nbsp;&amp;nbsp; Case 2 'Polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim polyline As ESRI.ArcGIS.Client.Geometry.Polyline = TryCast(args.Geometry, ESRI.ArcGIS.Client.Geometry.Polyline)
&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline.SpatialReference = Map.SpatialReference '102100
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Symbol = DefaultLineSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Geometry = polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler geometryService.LengthsCompleted, AddressOf GeometryService_LengthsCompleted
&amp;nbsp;&amp;nbsp; Case 3 'Polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim polygon As ESRI.ArcGIS.Client.Geometry.Polygon = TryCast(args.Geometry, ESRI.ArcGIS.Client.Geometry.Polygon)
&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon.SpatialReference = Map.SpatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Symbol = DefaultFillSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Geometry = polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler geometryService.AreasAndLengthsCompleted, AddressOf GeometryService_AreasAndLengthsCompleted
&amp;nbsp; End Select

&amp;nbsp; Dim graphicsLayer As GraphicsLayer = TryCast(Map.Layers("MeasureGraphicsLayer"), GraphicsLayer)
&amp;nbsp; graphicsLayer.Graphics.Add(graphic)

&amp;nbsp; Dim graphicList As New List(Of Graphic)()
&amp;nbsp; graphicList.Add(graphic)

&amp;nbsp; Select Case _measuremode
&amp;nbsp;&amp;nbsp; Case 2 'Polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.LengthsAsync(graphicList)
&amp;nbsp;&amp;nbsp; Case 3 'Polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.AreasAndLengthsAsync(graphicList)
&amp;nbsp; End Select
 End Sub

 Private Sub GeometryService_LengthsCompleted(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.LengthsEventArgs)
&amp;nbsp; _meters = args.Results(0)
&amp;nbsp; _kms = args.Results(0) * 0.001
&amp;nbsp; DisplayLinearResult()
 End Sub&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 11:12:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometry-task-measure-distance/m-p/99648#M2476</guid>
      <dc:creator>LanceCrumbliss</dc:creator>
      <dc:date>2010-05-14T11:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: geometry task, measure distance</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometry-task-measure-distance/m-p/99649#M2477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While the units in webmercator are indeed units, you must remember that projections add huge distortions to them. In other words, around Equator the scale distortion is about 1 (meaning correct scale), but as you get closer to the poles, the distortion moves towards infinity!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 18:12:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometry-task-measure-distance/m-p/99649#M2477</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-05-17T18:12:40Z</dc:date>
    </item>
  </channel>
</rss>

