Select to view content in your preferred language

Spatial Index Grid Size Is Invalid

5083
4
03-15-2016 11:05 AM
MikeWinsor
Occasional Contributor


I'm using the 10.2.6 runtime for .NET, and due to a bug in the API, I had to use the REST API to add features to a layer (this bug causing custom M values to throw an exception, see here).

The code to access this functionality via the REST API was working great right up until a few weeks ago when we added a rather large polyline to the layer. When this line was added I get an exception from the local server. Viewing the logs from the server I see this:

2016-03-15 11:30:19,867 ERROR rid=24  'worker-1976' Core - GraphicFeatureServer.HandleREST_AddFeaturesOperation (code=17000): Database error: The spatial index grid size is invalid. [CustomLineLayer01].  The spatial index grid size is invalid.

Now here's the weird thing. If I add this feature via a REST call individually from a list of lines, it fails. But, if I add it as part of a group of features in the same REST call, it works just fine (all other lines are very small in comparison to this one).


Furthermore, if I just add this long line by itself, it works fine, but, if I add the smaller lines prior to this, it fails with that exception.

The only help I've seen online is about setting the "LoadOnly" property to true on the table. However, this is no good to me as that advice was for ArcObjects.

So my question is this: Can I disable the spatial index grid via REST prior to adding lines? Or is there another, easier way to get around this problem?

It is very difficult to duplicate this problem with a sample, but if required, I'll do what I can to make one.

0 Kudos
4 Replies
MikeWinsor
Occasional Contributor

I've gone ahead and created a sample to illustrate the error.  It is attached to this comment.

To replicate the error:

  1. Draw a small line at the default extent.
  2. Scale out to a much larger distance
  3. Draw another line.

An error message about Error code 500 addFeature failing should appear.  If it does not, try zooming out further.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi Mike,

Do you have access to an ArcGIS Server instance?

Cheers

Mike

0 Kudos
MikeWinsor
Occasional Contributor

No, I'm afraid I don't. Also, our customers are not guaranteed to have access to one either.

0 Kudos
ShaneBrennan
Emerging Contributor

We are having the same issue.

0 Kudos