Select to view content in your preferred language

Real size in Buffers

688
2
Jump to solution
04-18-2013 10:06 AM
EnriqueIbarra
Deactivated User
I'm using the Geometry Service to create Buffers:

gmtrySrvcBuffers = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");                 gmtrySrvcBuffers.BufferCompleted += gmtrySrvcBuffers_BufferCompleted;                 BufferParameters bufferParams = new BufferParameters() { BufferSpatialReference = Variables.Mapa.SpatialReference, OutSpatialReference = Variables.Mapa.SpatialReference, Unit = LinearUnit.Meter };

Note that the spatial references are defined from the base Map.

And the MeasureAction to display the radio of a circle:

<esri:MeasureAction AreaUnit="SquareMeters" DisplayTotals="True" DistanceUnit="Meters" MapUnits="Meters" MeasureMode="Radius" FillSymbol="{StaticResource DefaultFillSymbol}" TargetName="MyMap" />


in both cases the units are Meters.

Once buffer created (with a value of 1000, from a text of a TextBox converted to Double, for the radio), I use the MeasureAction and the result is:

[ATTACH=CONFIG]23608[/ATTACH]

What I'm doing wrong? why the measures aren't equals?'
0 Kudos
1 Solution

Accepted Solutions
EnriqueIbarra
Deactivated User
Thanks Dominique! I've solved the problem. Just used the Spatial Reference of the sample http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#BufferQuery

View solution in original post

0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
With these buffer params, the geometry service is doing euclidian 2D calculation.
So it's not taking care of the Web Mercator distorsion (about cos(latitude)).

From 3.1, the Geometry Service has a new geodesic parameter  in order to generate a buffer polygon using a geodesic distance (but your coordinates have also to be in GCS)
0 Kudos
EnriqueIbarra
Deactivated User
Thanks Dominique! I've solved the problem. Just used the Spatial Reference of the sample http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#BufferQuery
0 Kudos