geometry parameter is invalid for QUERY but ok for BUFFER?!

3595
3
09-28-2010 12:42 PM
WillBranch
New Contributor II
I am building a C# library wrapper for REST services (GeometryServer/buffer...).  Using this library I can buffer points, lines and polygons and get valid json responses.  I have gotten it to where I can pass in properly formatted geometries in json via POST.

However.  When it comes to passing in non-simple geometries to the QUERY service I keep getting a "geometry parameter is invalid" response...

Here is a geometry being passed into my server to be buffered, and it works.
http://216.237.216.18/ArcGIS/rest/services/Geometry/GeometryServer/buffer?...

Here is the same geometry being passed into the same server to query a parcel layer, and it does not work:
http://216.237.216.18/ArcGIS/rest/services/leesburg/MapServer/3/query?...

I also have the same problems on a ver 10 server.

Any ideas on what is wrong?
0 Kudos
3 Replies
WillBranch
New Contributor II
No ideas on what could be the problem?

Thanks again
0 Kudos
RahulRavikumar
New Contributor
The Geometry service's buffer operation, takes in an array of geometries. Refer to the REST API documentation at http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/buffer.html for more information.

The Map Service query operation takes in a geometry object (as you can only specify one filter geometry at a time) and NOT an array of geometries (used for the Geometry service's buffer operation). For information on the Map Server's query operation look at http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/query.html for more information.

You should be able to use the Silverlight API, which has C# bindings for ArcGIS server's REST API, as much of this work has already been done for you. Its got a very rich client API, that you can use.
0 Kudos
WillBranch
New Contributor II
Rahul: Thanks very much!
0 Kudos