Select to view content in your preferred language

GeometryService.BufferAsync doesn't accept decimal distance

1996
6
10-03-2011 10:30 AM
SteeveCouture
Emerging Contributor
Hello,

I use the GeometryService.BufferAsync class to create a buffer.  It works great but I got a exception when my buffer distance have a decimal.

Ex.
Distance = 10 meter is correct
Distance = 10.6 meter is not correct ("I got 'distances' parameter is invalid")


Is it normal?  Because the BufferParameters.Distances is a list of double.

Thanks,
Steeve
0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
I cannot reproduce with SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#BufferPoint

I did not get a failure when I updated just this line:
bufferParams.Distances.Add(5.6);
0 Kudos
SteeveCouture
Emerging Contributor
I cannot reproduce with SDK sample:   http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#BufferPoint  

I did not get a failure when I updated just this line: 
bufferParams.Distances.Add(5.6);


Hi,

If I try the same geometry service by the rest api, I got this message with a distance = 5.6 : 'distances' parameter is invalid

This is my request:

http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/buffer?geometries=-108057...

Thanks,
Steeve
0 Kudos
DominiqueBroux
Esri Frequent Contributor
What is your system decimal separator : comma or dot?
0 Kudos
SteeveCouture
Emerging Contributor
My decimal separator is comma.  I also changed my decimal separator (by regional setting) for dot but I got the same result.

Thanks,
Steeve
0 Kudos
SteeveCouture
Emerging Contributor
Hi,

It's working if I change in Internet Explorer my language setting "fr-CA" by "en-CA":

Tools\Internet Options\Languages\

Do you have an idea how use distance with decimal with the Français (Canada) [fr-CA]?  Do we need to have the same language between the IE and the ArcGIS Server?

Thanks,
Steeve

P.S. See my attachments for more information.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Hi Steeve,

It turns out that it's a server bug : "Input to operations in Geoprocessing Service and Geometry Service are not culture invariant "

This will be fixed in 10.0 SP3 (look at NIM070072 in the list of fixed bugs).

Thanks for your input.
0 Kudos