REST API Query Geojson Format Error

2966
5
04-02-2018 10:18 AM
MaryEllen_Perko
Occasional Contributor II

Hi.  I’m looking for some help with an error I get using the geojson query format when querying a particular map service layer hosted in AGS.  The error returned is “{"error":{"code":400,"message":"Failed to execute query.","details":[]}}” and seems to only occur on certain features. 

 

If you are interested, you can see what I mean here:

 

https://gis11.services.ncdot.gov/arcgis/rest/services/NCDOT_STIP/MapServer/1/query

 

In the WHERE clause, you’ll get a returned feature if you enter OBJECTID=284.  If you enter OBJECTID=285, you’ll get the error.

 

Any ideas on what’s going on or where to look is much appreciated.

 

Thanks.

Tags (3)
5 Replies
MarieAlexander
New Contributor

Have you ever figured out the cause of this?  We are having the exact same problem!  Some polygons return the error, some don't...

0 Kudos
BrianCollins
Occasional Contributor

We have this problem as well. Our issue seems to be related to polygons with complex (multipart or donut) geometry. We get a successful response with all other formats but geoJSON throws an error. I'm going to open a support case on the issue.

0 Kudos
MalcolmMeyer2
Occasional Contributor II

Did you ever solve this issue? I am getting rendering errors on complex polygons from a GeoJSON pulled from a feature service query. GeoJSON that is pulled from my open data site does not result in rendering errors. In the image below the brighter area is not there. I prefer the query method as it is slightly faster and it guarantees access to the latest data.

0 Kudos
MarieAlexander
New Contributor

We ended up using a different format other than GeoJSON – I believe we just used JSON

0 Kudos
LeithBritt1
New Contributor

I was just able to resolve the issue by tracing the bad feature, which was a polyline, attributing the new one and then deleting the old bad one.

0 Kudos