<?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: Polyline buffer with linear distance unit in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655675#M16766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Geodesic buffering needs GCS spatial reference. So if your BufferSpatialReference is 102100, a result 18% short is due to Mercator distorsion. That's normal so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if you set the BufferSpatialreference to 4326, you are right, that seems not working with polylines (though strange that it's returning a completely wrong result instead of an error! Not sure if it's a bug:confused: ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are working with relatively small geometries (compared to the earth), a workaround might be to keep 102100 as BufferSpatialReference and to take care of the web mercator distorsion by yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Soemthing like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;const double earthRadius = 6378137; double yCenter = graphic.Geometry.Extent.GetCenter().Y; double distorsion = Math.Cosh(yCenter / earthRadius); // mercator distorsion (= 1/cos(latitude))&amp;nbsp; bufferParams.Distances.Add(distance * distorsion);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jan 2012 08:59:10 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2012-01-20T08:59:10Z</dc:date>
    <item>
      <title>Polyline buffer with linear distance unit</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655674#M16765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm designing an app that allows users to perform spatial queries in a variety of ways.&amp;nbsp; One requirement that is giving me problems is polyline buffering.&amp;nbsp; For example, a user should be able to draw a polyline and then select a buffer distance in one of the following units: feet, meters, kilometers, and miles.&amp;nbsp; My map SR is 102100.&amp;nbsp; I noticed that for both point and polyline buffers the results were about 18% short.&amp;nbsp; For some reason the following code returns a buffer with a radius of approximately 8.2 statue miles instead of 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;BufferParameters bufferParameters = new BufferParameters() { &amp;nbsp;&amp;nbsp;&amp;nbsp; BufferSpatialReference = myMap.SpatialReference, &amp;nbsp;&amp;nbsp;&amp;nbsp; OutSpatialReference = myMap.SpatialReference, &amp;nbsp;&amp;nbsp;&amp;nbsp; Unit = LinearUnit.StatuteMile }; bufferParameters.Distances.Add(10); bufferParameters.Features.Add(new Graphic() { Geometry = originPoint });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For point buffers I was able to fix this by setting &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;BufferSpatialReference = new SpatialReference(4326)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; but for polylines I have no such luck because of the notes &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; which state &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;when the bufferSR is GCS... Polylines and Polygons: unit must be angular such as decimal degrees for buffering to be performed.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I go about getting an accurate buffer around a polyline in a unit such as statute miles?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 20:13:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655674#M16765</guid>
      <dc:creator>JasonKnisley</dc:creator>
      <dc:date>2012-01-19T20:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline buffer with linear distance unit</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655675#M16766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Geodesic buffering needs GCS spatial reference. So if your BufferSpatialReference is 102100, a result 18% short is due to Mercator distorsion. That's normal so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if you set the BufferSpatialreference to 4326, you are right, that seems not working with polylines (though strange that it's returning a completely wrong result instead of an error! Not sure if it's a bug:confused: ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are working with relatively small geometries (compared to the earth), a workaround might be to keep 102100 as BufferSpatialReference and to take care of the web mercator distorsion by yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Soemthing like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;const double earthRadius = 6378137; double yCenter = graphic.Geometry.Extent.GetCenter().Y; double distorsion = Math.Cosh(yCenter / earthRadius); // mercator distorsion (= 1/cos(latitude))&amp;nbsp; bufferParams.Distances.Add(distance * distorsion);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2012 08:59:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655675#M16766</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-01-20T08:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline buffer with linear distance unit</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655676#M16767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&amp;nbsp; I had a feeling there was some sort of distortion at work since my results were always off by a consistent margin, but I didn't want to make a wrong assumption and I wasn't sure of the best way to work around it.&amp;nbsp; The distances I'm concerned with are small and the formula you posted will work for me.&amp;nbsp; Thanks again!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2012 14:49:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655676#M16767</guid>
      <dc:creator>JasonKnisley</dc:creator>
      <dc:date>2012-01-20T14:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline buffer with linear distance unit</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655677#M16768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a newer fix for this.&amp;nbsp; I am trying to buffer a polyline in silverlight arcgis api.&amp;nbsp; My buffers if using (bufferspacial reference of 4326 and geodesic=true) are comming back out of bounds.&amp;nbsp; Map Points are exactly spot on, but I have a requirement for buffering polylines and polygons on a map with a SR of 102100 (Web Mercator)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 17:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polyline-buffer-with-linear-distance-unit/m-p/655677#M16768</guid>
      <dc:creator>williambich</dc:creator>
      <dc:date>2013-09-03T17:33:01Z</dc:date>
    </item>
  </channel>
</rss>

