Hello everyone,
The field "SHAPE.STLength()" does not show in the feature class when I try to create a view. Is there any function that allows to calculate in a SQL statement the length of a line form the field SHAPE?
Thanks
Found it:
SELECT [FeatureID], [SHAPE] AS Geometry, SHAPE.STLength() AS Length FROM [database].[owner].[WaterLine]
This shows how to display in a SQL Query or a SQL SDE view the length of a line.
https://tereshenkov.wordpress.com/2015/02/05/sql-server-spatial-functions-for-gis-users/
Additional info:
https://docs.microsoft.com/en-us/sql/relational-databases/spatial/create-construct-and-query-geometry-instances?view=sql-server-2017
This SQL statement displays X and Y coordinates
SELECT [PumpNumber], [SHAPE], SHAPE.STX, SHAPE.STY FROM [PUMP]
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.