AnsweredAssumed Answered

Buffer distance not correct

Question asked by PinnGIS on Jan 27, 2014
Latest reply on Jan 28, 2014 by PinnGIS
Hello,

I'm having difficulty creating an accurate buffer of a polygon.  I can request the buffered geometry and display the respective graphic just fine, but when I measure the distance of the buffer to the original polygon (using the esri measure dijit) the distance is not the same as my input distance.

When in ArcMap, I buffer the same polygon by the same distance and I get a different buffer than I get from the js Geometry Service so I'm fairly certain that my problem lies with the Geometry Service not the Measurement dijit.

var buffDist = dom.byId("BuffDist").value; var gph = graphicArray[0]; var gs = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); var params = new BufferParameters(); params.distances = [buffDist]; params.unit = GeometryService.UNIT_KILOMETER; params.bufferSpatialReference = map.spatialReference; params.outSpatialReference = map.spatialReference; params.geometries = [gph.geometry]; gs.buffer(params, function (result) {});


My workflow is quite standard.  My input geometries are from a graphic that I received from a user click on the map.  The map spatial reference is web mercator (102100), which I thought might be causing the problem so I have been experimenting with converting web mercator to geographic but I have not had any luck getting a successful return from the Geometry Service.

Anyone have any ideas what is causing the buffer to be wrong?

Outcomes