HowTo:  Calculate the area of data stored using either the SQL Geometry or SQL Geography data type

相关信息
Article ID: 40755
Software:
ArcSDE 10, 10.1
Platforms: N/A

问题描述
The instructions provided can be used to calculate the total surface area of data stored using either the SQL Geography or the SQL Geometry data type in a SQL Server 2008 or SQL Server 2012 database. The syntax provided is executed using a query in SQL Server Management Studio (SSMS).

When used with the SQL Geography data type, the results of the STArea() are returned in squared units of the linear measure defined by the spatial reference system of the geography instance. When used with the SQL Geometry data type, the results of the STArea() are the squared units in which the coordinates were supplied.

So, if using a coordinate system where coordinate values are measured in meters, the area is measured in meters squared. If the coordinates were supplied in feet, the area is in feet squared.
已邀请:

易智瑞技术支持

赞同来自:

解决方案
  1. Execute the following syntax to capture the total surface area of a feature class stored using the SQL Geometry data type within SSMS.
    > Select shape.STArea() as Area from sde.COUNTIES
     
    Substitute the feature class to be measured for the one listed above as sde.COUNTIES.
  2. Execute the following syntax to capture a more in-depth query that displays all of the individual vertex coordinates values for each feature.
     > Select shape.STAsText() as SHAPE_REAL from sde.COUNTIES 


其它相关参考
  1. STArea (geometry Data Type)
  2. STAsText (geography Data Type)


创建及修改时间
Created: 12/19/2012

Last Modified: 1/10/2013
原文链接
http://support.esri.com/en/kno ... 40755

要回复问题请先登录注册