Shape.STLength() does not get published to feature service

3229
3
10-29-2015 12:17 PM
AndreaB
Occasional Contributor III

Hello,

When I publish my feature service to my ArcGIS Server, the Shape.STLength field does not get published. Why not?? I literally have to make another field and maintain it by calculating the field every so often from the actual Shape.STLength() field?

Ugh.

Thanks,

Andrea

0 Kudos
3 Replies
ThomasColson
MVP Frequent Contributor

Can you post more details of your environment? There are many hundreds of permutations of database, GIS software, and OS versions, each with their own quirks and configuration requiremetns.

What version of operating system is the GIS Server, Database Server, and the client installed on (where client is either a web browser or desktop ArcMa)?

Are you using GIS or Web Tier Authentication? Are you using a Web Adaptor? If so, what flavor of web server? IIS or Apache? If Web Tier, are you using Windows Active Directory for security? LDAP? SAML? If so, are you enforcing PIV credentials? HTTPS (hope you are)?

What flavor of database? Oracle? SQL? Is a domain service account starting the database? Have the right permissions been assigned to the feature class in question? Has the right group (role) been assigned to the rest service? Or is this a service based of a hosted service (FGDB in the server data store)?

It would be very helpful if you could post exact steps to reproduce....think like you're instructing a robot to make a jelly sandwich. I say this tongue in cheek, I probably still won't know what your problem is, but including specific and environment details will likely get your question answered quickly.

0 Kudos
AndreaB
Occasional Contributor III

GIS Server and Database Server: Windows Server 2012 R2.

Client: Windows 7 Pro SP 1

GIS Authentication

Web Adaptors 10.3

IIS

https

ArcGIS for Server 10.3

SQL Server 2008 R2 Express with Advanced Services

Right permissions

Not hosted service

Open ArcMap, Share as Service, Publish Service, choose admin connection to server, Capabilities: Mapping and Feature Access, Publish.

Look at Service in ArcGIS Rest Services Directory - scroll down to Fields in one of the line feature classes. No Shape.STLength() listed.

I read a few forums about this and it might be by Esri design that these fields are hidden. Looking for confirmation from Esri?

0 Kudos
ThomasColson
MVP Frequent Contributor

I believe that is the correct behavior, and your workaround is the correct solution. Shape_STLength is a product of SDE, and is dynamical based upon the feature geometry. Since you're using M$ SQL, and you "could" be using Geometry or Geography Storage type, you could add another field and use a trigger or a constraint and auto-calculate the length: https://msdn.microsoft.com/en-us/library/bb933895.aspx