ArcGIS Server: Geodatabase error: Only one spatial column is supported in this operation

4130
12
Jump to solution
01-11-2017 06:18 AM
GreggRoemhildt1
Occasional Contributor

I have a layer, water_pipe. I am creating a feature layer in the arcgis javascript api, and when the feature layer loads, it give the error "cannot execute query" in the network logs.

The query string parameters look like this: 

  1. f:
    json
  2. returnGeometry:
    true
  3. spatialRel:
    esriSpatialRelIntersects
  4. maxAllowableOffset:
    1
  5. geometry:
    {"xmin":-10384451.501584552,"ymin":5510511.210446009,"xmax":-10383876.812244719,"ymax":5511085.899785845,"spatialReference":{"wkid":102100,"latestWkid":3857}}
  6. geometryType:
    esriGeometryEnvelope
  7. inSR:
    102100
  8. outFields:
    *
  9. outSR:
    102100
  10. token:
    <token>

On the server logs, the above error message is given. 

Geodatabase error: Only one spatial column is supported in this operation [gis.DBO.water_pipe][STATE_ID = 1447].

There is only one Shape column, here is a screenshot from the sql server manager:

Any suggestions on what I can do to fix this? 

1 Solution

Accepted Solutions
GreggRoemhildt1
Occasional Contributor

After talking to support, we found out there's a bug BUG-000099970 that causes this to happen. It is based on the arrangement of fields in the ArcMap Document.

The synopsis is, if you rearrange fields or add new ones, make sure the SHAPE field comes AFTER the new fields, as a safe measure, move the Shape field to the very last one. 

This happens on server version 10.4.1 as far as I know.

View solution in original post

12 Replies
George_Thompson
Esri Frequent Contributor

Do you have multiple shape types in that column? For example records 1 - 10 are points and 20-15 are polygons?

Do any records in the table have an empty shape?

https://community.esri.com/groups/geodatabase?sr=search&searchId=45a6bb71-8b8d-4f83-8c00-78a28fe1e7a...https://community.esri.com/community/gis/enterprise-gis?sr=search&searchId=aeb971e4-0302-4116-9468-6...

--- George T.
0 Kudos
GreggRoemhildt1
Occasional Contributor

I'm not sure, that is a good question. I'm fairly certain they are all polylines, but is there a simple way to check for this and for empty shapes? It looks like the check/repair geometry tools only work on file geodatabases.

EDIT: All of the features appear to have a valid Shape.STLength() value (there are no nulls when I sorted the column). 

EDIT2: 

It looks like the issue is fairly obvious actually the rest page has two Shape fields..but how did the second one get there? The sql table has only one, and the arcmap document used to publish has only one. Perhaps the issue is with Shape.STLength(). It looks like ArcGIS Server is interpreting that field as "Shape"?

George_Thompson
Esri Frequent Contributor

Try this: STGeometryType (geometry Data Type) 

ArcGIS can only read/display one spatial type in the table. You may need refine the query to only include one spatial type, i.e. Point  Database data and ArcGIS—Help | ArcGIS Desktop 

--- George T.
0 Kudos
GreggRoemhildt1
Occasional Contributor

George Thompson‌ it looks like the issue is with the Shape.STLength() field (see my edit above). 

0 Kudos
George_Thompson
Esri Frequent Contributor

Not sure on why that happened. Is the SQL Server database registered with Server? If not, it will copy over the data to the server machine.

--- George T.
0 Kudos
GreggRoemhildt1
Occasional Contributor

Yes, the data is registered with the server. But it is showing it under the "replaced" tab.

Here's a screenshot of the service workspace on the server. 

0 Kudos
GreggRoemhildt1
Occasional Contributor

The weird thing is I have another layer storm_pipe that is working correctly in the same service. That one has the same field Shape.STLength() in arcmap, but it does not display on the Rest services page. It just shows one Shape field.

I also have another layer, san_pipe that is having the same issue as the water_pipe (two Shape fields appearing). 

0 Kudos
George_Thompson
Esri Frequent Contributor

I will be honest, the server side is not something that I am super familiar or strong with. My background is in the enterprise geodatabase/database realm. Hopefully someone else would chime in with some ideas.

If you need more immediate assistance, I would recommend calling into Technical Support and talking to a Server analyst.

https://community.esri.com/groups/technical-support?sr=search&searchId=f41a4b36-3e8c-4f17-aad4-07614...

--- George T.
0 Kudos
GreggRoemhildt1
Occasional Contributor

After talking to support, we found out there's a bug BUG-000099970 that causes this to happen. It is based on the arrangement of fields in the ArcMap Document.

The synopsis is, if you rearrange fields or add new ones, make sure the SHAPE field comes AFTER the new fields, as a safe measure, move the Shape field to the very last one. 

This happens on server version 10.4.1 as far as I know.