<?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 - Factor issue while plotting a circle on map with a distance in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462744#M42776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am experiencing the same problem.&amp;nbsp; Using the BufferParameters with the public geometry service in both spatial reference 4326 and 102100 the radius of the circle appears to be too small.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using venkatap's example code below, when I place a circle with radius of 1 mile on the intersection of Chainbridge Rd and Old Courthosue Rd in Tysons Corner, VA the circle edge runs directly through the intersection of International Drive and Westpark Drive.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11559[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I measure the distance between these two intersections in Google Earth, I get 0.78 miles.&amp;nbsp; What am I not understanding?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11560[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jan 2012 13:41:23 GMT</pubDate>
    <dc:creator>DavidErickson</dc:creator>
    <dc:date>2012-01-31T13:41:23Z</dc:date>
    <item>
      <title>GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462743#M42775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to plot a map in Esri Maps using the ArcGIS JavaScript API. I am using Geometry Service to plot a circle on the map. For example if I plot a circle with a radius of &lt;/SPAN&gt;&lt;STRONG&gt;1 mile&lt;/STRONG&gt;&lt;SPAN&gt;. When I measure a &lt;/SPAN&gt;&lt;STRONG&gt;1 mile&lt;/STRONG&gt;&lt;SPAN&gt; distance in&amp;nbsp; Google maps I am just short with the radius by a factor of &lt;/SPAN&gt;&lt;STRONG&gt;1.3&lt;/STRONG&gt;&lt;SPAN&gt;. Did anyone observe this pattern or am I doing any mistake? Please refer to the code I used from the sample &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/util/util_buffer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/demos/util/util_buffer.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&amp;gt;
&amp;lt;html&amp;gt;
&amp;nbsp; &amp;lt;head&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on iOS devices--&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/&amp;gt;
&amp;nbsp; &amp;lt;title&amp;gt;Buffer&amp;lt;/title&amp;gt;
 
&amp;nbsp; &amp;lt;link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/claro/claro.css"&amp;gt;
&amp;nbsp; &amp;lt;script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;

&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.map");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.tasks.geometry");

&amp;nbsp;&amp;nbsp;&amp;nbsp; var map = null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var gsvc = null;

&amp;nbsp;&amp;nbsp;&amp;nbsp; function initialize() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(layer);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(esri.geometry.geographicToWebMercator(new esri.geometry.Extent(-77.550, 38.600, -77.020, 39.070, new esri.SpatialReference({wkid: 4326}))));

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gsvc = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map, "onClick", doBuffer);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; function doBuffer(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new esri.tasks.BufferParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.geometries = [ evt.mapPoint ];

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //buffer in linear units such as meters, km, miles etc.
&lt;STRONG&gt;&amp;nbsp; params.distances = [ 1 ];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.unit = esri.tasks.GeometryService.UNIT_STATUTE_MILE;&lt;/STRONG&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.outSpatialReference = map.spatialReference;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gsvc.buffer(params, showBuffer);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; function showBuffer(geometries) {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleFillSymbol(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.symbol.SimpleFillSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new esri.symbol.SimpleLineSymbol(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.symbol.SimpleLineSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new dojo.Color([0,0,255,0.65]), 2
&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; new dojo.Color([0,0,255,0.15])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(geometries, function(geometry) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = new esri.Graphic(geometry,symbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.addOnLoad(initialize);
&amp;nbsp; &amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body class="claro"&amp;gt;
&amp;nbsp; &amp;lt;b&amp;gt;Click a location on the map to buffer. Click again on another location to buffer again.&amp;lt;/b&amp;gt;
&amp;nbsp; &amp;lt;div id="map" style="width:800px; height:600px; border:1px solid #000;"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt; 

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:33:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462743#M42775</guid>
      <dc:creator>PraveenTipirneni</dc:creator>
      <dc:date>2021-12-11T20:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462744#M42776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am experiencing the same problem.&amp;nbsp; Using the BufferParameters with the public geometry service in both spatial reference 4326 and 102100 the radius of the circle appears to be too small.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using venkatap's example code below, when I place a circle with radius of 1 mile on the intersection of Chainbridge Rd and Old Courthosue Rd in Tysons Corner, VA the circle edge runs directly through the intersection of International Drive and Westpark Drive.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11559[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I measure the distance between these two intersections in Google Earth, I get 0.78 miles.&amp;nbsp; What am I not understanding?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11560[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 13:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462744#M42776</guid>
      <dc:creator>DavidErickson</dc:creator>
      <dc:date>2012-01-31T13:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462745#M42777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting the 'esri.tasks.BufferParameters.bufferSpatialReference' to a Spatial Reference with an equal area projection that is appropriate to your location.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 15:16:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462745#M42777</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2012-01-31T15:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462746#M42778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the suggestion. I'm afraid the behavior is the same. In my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
map = new esri.Map("map");
var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");&amp;nbsp; 
map.addLayer(layer);
var initialExtent = new esri.geometry.Extent({
&amp;nbsp; "xmin":-8673921.42,
&amp;nbsp; "ymin":4654250.49,
&amp;nbsp; "xmax":-8536334.77,
&amp;nbsp; "ymax":4745974.92,
&amp;nbsp; "spatialReference":{"wkid":102100}});
map.setExtent(initialExtent);

...

var params = new esri.tasks.BufferParameters();
params.geometries = [ evt.mapPoint ];

params.distances = [ 1 ];
params.unit = esri.tasks.GeometryService.UNIT_STATUTE_MILE;
params.outSpatialReference = new esri.SpatialReference({wkid : 102100});
params.bufferSpatialReference = new esri.SpatialReference({wkid : 102100});


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:33:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462746#M42778</guid>
      <dc:creator>DavidErickson</dc:creator>
      <dc:date>2021-12-11T20:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462747#M42779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe 102100 is based on Mercator which is a conformal projection so it does not maintain areas or distances.&amp;nbsp; Try using a Spatial Reference which uses an equal area projection which is appropriate to the location.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 16:43:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462747#M42779</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2012-01-31T16:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462748#M42780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I ran into this same problem.&amp;nbsp; You can replicate in ArcMAP with the measure tool by switching between planar and geodesic measurement &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The fastest (read, not easiest) way I found to handle this was converting all my locations to State Plane (my reference coord system) prior to doing calculations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for our home built "make a circle" method it would be&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Get centroid in webmerc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Convert centroid back to state plane&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Create circle in state plane with given (accurate) diameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. project circle back to webmerc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. draw circle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise you have to do the math to compensate for the geodesic measurements, which is very ugly calculus.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 15:14:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462748#M42780</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-02-01T15:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462749#M42781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From ArcGIS Server 10.1, buffer operation will support geodesic(true/false) parameter. bufferSR input parameter will be ignored when geodesic is set to true, which means you don't have to worry about the spatial reference any more.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JavaScript API 2.7 will support this along with server 10.1 beta2 or pre-release.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a sample service running on beta2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://servicesbeta4.esri.com/arcgis/rest/services/Geometry/GeometryServer/buffer"&gt;http://servicesbeta4.esri.com/arcgis/rest/services/Geometry/GeometryServer/buffer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 20:33:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462749#M42781</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2012-02-01T20:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService - Factor issue while plotting a circle on map with a distance</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462750#M42782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you all for the replies.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 18:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservice-factor-issue-while-plotting-a/m-p/462750#M42782</guid>
      <dc:creator>PraveenTipirneni</dc:creator>
      <dc:date>2012-02-07T18:15:31Z</dc:date>
    </item>
  </channel>
</rss>

