Not able to get Geometry info.

849
4
06-29-2011 05:53 PM
SPACETIME
New Contributor
Hi, I have hosted a REST service and I when I try to query the data. I do not get the geometry information in the result. I am making sure the GEOMETRY is set to true in the where clause.

Any help???
0 Kudos
4 Replies
SrinivasVinnakota
Esri Contributor
Is the shape field visible on the layer? Check the layer info for a field of type esriFieldTypeGeometry. If you do not see this field then it means the layer would not return its geometry.
0 Kudos
ChadWilcomb
New Contributor III
Some of my REST map services contain feature layers with a valid esriFieldTypeGeometry and some have no esriFieldTypeGeometry specified at all. In the REST services withno esriFieldTypeGeometry if I turn on feature access, I can get the geometry returned in my JSON by using the .../FeatureServer/ URL (rather than .../MapServer/) but I am still confused about why some of my map services do not have an esriFieldTypeGeometry specified.

Could it have anything to do with using a SDE View as my data source?
0 Kudos
RaviNarayanan
Esri Contributor
Chad,

MapServices requires the SHAPE field to be visible to return geometry in results. Feature services do not depend on the visibility of the SHAPE field to return geometry in result.

You can enable visibility of the SHAPE field using ArcMap.
0 Kudos
ChadWilcomb
New Contributor III
Thanks Ravi, this answered my question.
0 Kudos