mjia

Request length/size constrain on Query API??

Discussion created by mjia on Mar 5, 2013
Latest reply on Oct 8, 2013 by gchen13
Hi,

I am having problems in using the query API. I need to use a polygon geometry to query a point layer so it returns all the intersecting points.
The formatted query looks something like:

http://myarcgisservice/MapServer/0/query?geometryType=esriGeometryPolygon&geometry={%22spatialReference%22:{wkid:xxx},%22rings%22:[[[x1,y1],[x2,y2],[x3,y3],...,[xn, yn],[x1,y1]]]}&f=json

It works fine when the geometry is not complex, but as the number of vertices is getting bigger, it starts to return me "400 Bad request" and "404" error. For example, if I have a polygon of more than 50 vertices, the query will return me "400" error...

I am wondering if there is a constraint/threshold on number of vertices of a polygon? Or there is a length constraint on the request (say, 255 characters)? I can't seem to find documentations on this...

Thanks!

Outcomes