How do I know I am using Geometry or SDE Binary in SQL Server

7201
8
02-17-2016 02:05 AM
YasserNooraldeen
Emerging Contributor


Hi dear,

I am using SQL server 2008R2, but I am not sure I am using geometry or binary ... would anyone tell how I can find that?

Tags (1)
8 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Yasser,

You can create/import a feature class, then right-click on the feature class > Properties.  The geometry type will be listed under the General tab.

Screen1.PNG

YasserNooraldeen
Emerging Contributor

Thanks Jake.

Is there any recommendation by ESRI to use one "preferable" than the other one?

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi Yasser

The default is always the recommendation. In this case it is geometry.

ThomasColson
MVP Frequent Contributor

There are significant differences between Geography and Geometry spatial types in SQL, and I'd by no means accept the "default" without determining what storage format best fits your data needs. Without going down the rabbit hole of this is better than that, check out Spatial Data Types Overview for a detailed description of both. It boils down to your choice of coordinate system and desired precision of  measurements. Personally, I'm a fan of geography....

VinceAngelo
Esri Esteemed Contributor

You can also look at the table from Management Studio.  If the database reports the geometry column as an integer, then it's using SDEBINARY geometry storage.

- V

JasonTipton
Frequent Contributor

Otherwise the DataType for the column will be geometry or geography for SQL Server spatial types.

You can check this from the table designer

sql_geometry.png

or

select DATA_TYPE
from INFORMATION_SCHEMA.COLUMNS
where COLUMN_name = 'shape'
AND TABLE_NAME = 'YOUR_TABLE'
YasserNooraldeen
Emerging Contributor

Thank you all.

0 Kudos
AndresCastillo
MVP Regular Contributor

I started looking into this question when reading the documentation for editing a versioned view with SQL:

An overview of editing versioned data using SQL—Help | ArcGIS Desktop 

The versioned feature classes you want to edit use a binary geometry storage type (when editing a named version)

If editing feature classes, the feature classes use SQL spatial types, not binary geometry storage (when editing the Default version)

How To: Determine which type of geometry storage is being used for a particular dataset 

0 Kudos