I'm designing an app that allows users to perform spatial queries in a variety of ways. One requirement that is giving me problems is polyline buffering. 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. My map SR is 102100. I noticed that for both point and polyline buffers the results were about 18% short. For some reason the following code returns a buffer with a radius of approximately 8.2 statue miles instead of 10.BufferParameters bufferParameters = new BufferParameters() { BufferSpatialReference = myMap.SpatialReference, OutSpatialReference = myMap.SpatialReference, Unit = LinearUnit.StatuteMile }; bufferParameters.Distances.Add(10); bufferParameters.Features.Add(new Graphic() { Geometry = originPoint });
For point buffers I was able to fix this by setting BufferSpatialReference = new SpatialReference(4326)
but for polylines I have no such luck because of the notes here which state when the bufferSR is GCS... Polylines and Polygons: unit must be angular such as decimal degrees for buffering to be performed.
How can I go about getting an accurate buffer around a polyline in a unit such as statute miles?