Select to view content in your preferred language

How to retrieve the geodatabase storage type

1143
4
Jump to solution
03-03-2021 02:04 AM
Marie-ChristineNicolle
Emerging Contributor

Hi,

I would like to retrieve the geodatabase storage type from a specified FeatureClass or Geodatabase.

In ArcGIS Desktop, this was done with the Geodatabase.IFeatureClassStorage. The GeometryStorage property returned a esriGeometryStorage value.

Do we have any equivalent in ArcGIS Pro SDK ?

Any help would be appreciated.

 

0 Kudos
1 Solution

Accepted Solutions
KirkKuykendall1
Frequent Contributor

Just a guess: the storage_type column in the SDE_geometry_columns table.

Maybe whatever value is there can be cast to an esriGeometryStorage enum.

Even though SDE_ and GDB_ tables don't get listed, last time I checked they can still be opened and read using Pro SDK methods.

 

 

View solution in original post

0 Kudos
4 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

You can check geodatabase connection  string:

FeatureClass fc = ...
var gdb = fc.GetDatastore() as Geodatabase;
string connection = gdb.GetConnectionString();

string workspaceName = connection.Split('=')[1];

string ext = Path.GetExtension(workspaceName);
if (string.Compare(ext, ".gdb", true) != 0 ) {
}
else if(string.Compare(ext, ".sde", true) != 0) {
}

 

0 Kudos
Marie-ChristineNicolle
Emerging Contributor

Hi,

This gives the GeodatabaseType not the GeodatabaseStorageType. 

Thanks,

0 Kudos
KirkKuykendall1
Frequent Contributor

Just a guess: the storage_type column in the SDE_geometry_columns table.

Maybe whatever value is there can be cast to an esriGeometryStorage enum.

Even though SDE_ and GDB_ tables don't get listed, last time I checked they can still be opened and read using Pro SDK methods.

 

 
0 Kudos
Aashis
by Esri Contributor
Esri Contributor

Hi @Marie-ChristineNicolle ,

It doesn't look like Pro provide access to the value. I am curious to know what are you trying to achieve with this storage types? Would you mind sharing few details / code snippets that will help us to understand the issue and recommend an approach?

0 Kudos